Changeset 5394
- Timestamp:
- May 2, 2015, 2:31:12 AM (9 years ago)
- Location:
- nanovis/branches/1.2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
nanovis/branches/1.2
- Property svn:mergeinfo changed
/trunk/packages/vizservers/nanovis merged: 3631,3875-3876,3914,3916,3936,4164,4167,4353,4364,4422,4424
- Property svn:mergeinfo changed
-
nanovis/branches/1.2/Makefile.in
r5047 r5394 312 312 RegularVolumeShader.o: RegularVolumeShader.cpp RegularVolumeShader.h VolumeShader.h Shader.h 313 313 RenderVertexArray.o: RenderVertexArray.cpp RenderVertexArray.h 314 Shader.o: Shader.cpp Shader.h 314 Shader.o: Shader.cpp Shader.h config.h 315 315 StdVertexShader.o: StdVertexShader.cpp StdVertexShader.h Shader.h 316 316 Switch.o: Switch.cpp Switch.h -
nanovis/branches/1.2/Shader.cpp
r4904 r5394 12 12 #include <util/FilePath.h> 13 13 14 #include "config.h" 14 15 #include "Shader.h" 15 16 #include "Trace.h" … … 18 19 using namespace nv::util; 19 20 21 /** 22 * These correspond to NV_vertex_program3 and NV_fragment_program2: 23 * CG_PROFILE_VP40 24 * CG_PROFILE_FP40 25 * 26 * These correspond to ARB_vertex_program and ARB_fragment_program: 27 * CG_PROFILE_ARBVP1 28 * CG_PROFILE_ARBFP1 29 * 30 * Generic GLSL targets: 31 * CG_PROFILE_GLSLV 32 * CG_PROFILE_GLSLF 33 */ 34 #ifdef USE_ARB_PROGRAMS 35 CGprofile Shader::_defaultVertexProfile = CG_PROFILE_ARBVP1; 36 CGprofile Shader::_defaultFragmentProfile = CG_PROFILE_ARBFP1; 37 #else 20 38 CGprofile Shader::_defaultVertexProfile = CG_PROFILE_VP40; 21 39 CGprofile Shader::_defaultFragmentProfile = CG_PROFILE_FP40; 40 #endif 22 41 CGcontext Shader::_cgContext = NULL; 23 42 -
nanovis/branches/1.2/VelocityArrowsSlice.cpp
r4904 r5394 63 63 _queryVelocityFP.loadFragmentProgram("queryvelocity.cg"); 64 64 65 _particleShader.loadVertexProgram("velocityslicevp.cg"); 66 _particleShader.loadFragmentProgram("velocityslicefp.cg"); 65 // Delay loading of shaders only required for glyph style rendering 66 if (_renderMode == GLYPHS) { 67 _particleShader.loadVertexProgram("velocityslicevp.cg"); 68 _particleShader.loadFragmentProgram("velocityslicefp.cg"); 69 } 67 70 68 71 createRenderTarget(); … … 412 415 glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE); 413 416 417 // FIXME: This vertex shader won't compile with ARB_vertex_program, 418 // so it should use GLSL 419 if (!_particleShader.isVertexProgramLoaded()) { 420 _particleShader.loadVertexProgram("velocityslicevp.cg"); 421 } 422 if (!_particleShader.isFragmentProgramLoaded()) { 423 _particleShader.loadFragmentProgram("velocityslicefp.cg"); 424 } 425 414 426 _particleShader.bind(); 415 427 _particleShader.setVPTextureParameter("vfield", _vectorFieldGraphicsID); -
nanovis/branches/1.2/config.h
r4874 r5394 38 38 39 39 /* 40 * If defined, use ARB_vertex_program and ARB_fragment_program as Cg 41 * profile target, otherwise NV_vertex_program3 and NV_fragment_program2 42 * are required 43 */ 44 //#define USE_ARB_PROGRAMS 45 46 /* 40 47 * Keep statistics 41 48 */ -
nanovis/branches/1.2/nanovis.cpp
r4937 r5394 518 518 } 519 519 #endif 520 // FIXME: should use ARB programs or (preferably) a GLSL profile for portability 520 // FIXME: should use GLSL for portability 521 #ifdef USE_ARB_PROGRAMS 522 if (!GLEW_ARB_vertex_program || 523 !GLEW_ARB_fragment_program) { 524 ERROR("ARB_vertex_program and ARB_fragment_program extensions are required"); 525 return false; 526 } 527 #else 521 528 if (!GLEW_NV_vertex_program3 || 522 529 !GLEW_NV_fragment_program2) { … … 524 531 return false; 525 532 } 533 #endif 526 534 527 535 if (!FilePath::getInstance()->setPath(path)) {
Note: See TracChangeset
for help on using the changeset viewer.