Changeset 4167
- Timestamp:
- Feb 1, 2014, 11:38:35 PM (11 years ago)
- Location:
- trunk/packages/vizservers/nanovis
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/LIC.cpp
r3630 r4167 56 56 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); 57 57 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); 58 glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);59 60 58 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, NPN, NPN, 0, 61 59 GL_RGBA, GL_UNSIGNED_BYTE, NULL); … … 64 62 //render buffer for projecting 3D velocity onto a 2D plane 65 63 glGenFramebuffersEXT(1, &_velFbo); 64 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, _velFbo); 65 66 66 glGenTextures(1, &_sliceVectorTex); 67 68 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, _velFbo);69 70 67 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, _sliceVectorTex); 71 68 glTexParameterf(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST); … … 73 70 glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 74 71 glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 75 76 72 glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA32F_ARB, _size, _size, 77 73 0, GL_RGBA, GL_FLOAT, NULL); … … 82 78 //render buffer for the convolution 83 79 glGenFramebuffersEXT(1, &_fbo); 80 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, _fbo); 81 82 //initialize color texture for lic 84 83 glGenTextures(1, &_colorTex); 85 86 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, _fbo);87 88 //initialize color texture for lic89 84 glBindTexture(GL_TEXTURE_2D, _colorTex); 90 85 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 91 86 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 92 glTex Envf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);93 87 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 88 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 94 89 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, _width, _height, 0, 95 90 GL_RGB, GL_UNSIGNED_BYTE, NULL); … … 209 204 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 210 205 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 211 //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND);212 206 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, NMESH, NMESH, 0, GL_RGBA, 213 207 GL_UNSIGNED_BYTE, mag); … … 328 322 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, _fbo); 329 323 330 glPushAttrib(GL_VIEWPORT_BIT | GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );324 glPushAttrib(GL_VIEWPORT_BIT | GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_TEXTURE_BIT); 331 325 332 326 glMatrixMode(GL_PROJECTION); … … 352 346 glEnable(GL_TEXTURE_2D); 353 347 glBindTexture(GL_TEXTURE_2D, _patternTex); 348 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); 354 349 _sa = 0.01; 355 350 … … 435 430 //draw line integral convolution quad 436 431 437 glPushAttrib(GL_ENABLE_BIT | GL_LIGHTING_BIT );432 glPushAttrib(GL_ENABLE_BIT | GL_LIGHTING_BIT | GL_TEXTURE_BIT); 438 433 glBindTexture(GL_TEXTURE_2D, _colorTex); 434 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); 439 435 glEnable(GL_TEXTURE_2D); 440 436 //glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); -
trunk/packages/vizservers/nanovis/ParticleSystem.cpp
r3618 r4167 1628 1628 glPointParameterfARB(GL_POINT_SIZE_MIN_ARB, 1.0f); 1629 1629 glPointParameterfARB(GL_POINT_SIZE_MAX_ARB, 100.0f); 1630 glTexEnv f(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);1630 glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE); 1631 1631 1632 1632 cgGLBindProgram(_particleVP); … … 1683 1683 glBindTexture(GL_TEXTURE_2D, ::SpotTexID); 1684 1684 glEnable(GL_TEXTURE_2D); 1685 //glPointParameterfARB( GL_POINT_FADE_THRESHOLD_SIZE_ARB, 60.0f);1686 glPointParameterfARB( GL_POINT_FADE_THRESHOLD_SIZE_ARB, 0.0f);1687 1688 glPointParameterfARB( 1689 glPointParameterfARB( 1690 glTexEnv f( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);1685 //glPointParameterfARB(GL_POINT_FADE_THRESHOLD_SIZE_ARB, 60.0f); 1686 glPointParameterfARB(GL_POINT_FADE_THRESHOLD_SIZE_ARB, 0.0f); 1687 1688 glPointParameterfARB(GL_POINT_SIZE_MIN_ARB, 1.0f); 1689 glPointParameterfARB(GL_POINT_SIZE_MAX_ARB, 100.0f); 1690 glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE); 1691 1691 1692 1692 glEnableClientState(GL_VERTEX_ARRAY); -
trunk/packages/vizservers/nanovis/PointSetRenderer.cpp
r3627 r4167 79 79 glPointParameterfARB(GL_POINT_SIZE_MAX_ARB, 100); 80 80 #ifdef USE_TEXTURE 81 glTexEnv f(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);81 glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE); 82 82 #endif 83 83 … … 120 120 #ifdef USE_TEXTURE 121 121 _pointTexture->activate(); 122 glTexEnv f(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);122 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); 123 123 #endif 124 124 … … 158 158 159 159 #ifdef USE_TEXTURE 160 glTexEnv f(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);160 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); 161 161 _pointTexture->deactivate(); 162 162 #endif -
trunk/packages/vizservers/nanovis/VelocityArrowsSlice.cpp
r3875 r4167 408 408 _arrowsTex->activate(); 409 409 glEnable(GL_TEXTURE_2D); 410 glTexEnv f(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);410 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); 411 411 412 412 GLfloat atten[] = {1, 0, 0}; … … 415 415 glPointParameterfARB(GL_POINT_SIZE_MIN_ARB, 1.0f); 416 416 glPointParameterfARB(GL_POINT_SIZE_MAX_ARB, _maxPointSize); 417 glTexEnv f(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);417 glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE); 418 418 419 419 // FIXME: This vertex shader won't compile with ARB_vertex_program, … … 456 456 457 457 glActiveTexture(GL_TEXTURE0); 458 glTexEnv f(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_FALSE);458 glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_FALSE); 459 459 _arrowsTex->deactivate(); 460 460 } -
trunk/packages/vizservers/nanovis/nanovis.cpp
r3935 r4167 334 334 glGenTextures(1, &_finalColorTex); 335 335 glBindTexture(GL_TEXTURE_2D, _finalColorTex); 336 337 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 338 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 339 glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); 340 336 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 337 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 341 338 #if defined(HAVE_FLOAT_TEXTURES) && defined(USE_HALF_FLOAT) 342 339 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, winWidth, winHeight, 0, … … 408 405 glGenTextures(1, &_finalColorTex); 409 406 glBindTexture(GL_TEXTURE_2D, _finalColorTex); 410 411 407 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 412 408 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 413 glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);414 415 409 #if defined(HAVE_FLOAT_TEXTURES) && defined(USE_HALF_FLOAT) 416 410 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, winWidth, winHeight, 0, -
trunk/packages/vizservers/nanovis/util/Fonts.cpp
r4164 r4167 79 79 Fonts::begin() 80 80 { 81 glPushAttrib(GL_TRANSFORM_BIT | GL_ENABLE_BIT );81 glPushAttrib(GL_TRANSFORM_BIT | GL_ENABLE_BIT | GL_TEXTURE_BIT); 82 82 glEnable(GL_TEXTURE_2D); 83 83 glBindTexture(GL_TEXTURE_2D, _fonts[_fontIndex]._fontTextureID); … … 94 94 glLoadIdentity(); 95 95 96 #if 097 glDisable(GL_BLEND);98 glEnable(GL_DEPTH_TEST);99 #else100 96 glEnable(GL_BLEND); 101 97 glDisable(GL_DEPTH_TEST); 102 #endif103 98 } 104 99
Note: See TracChangeset
for help on using the changeset viewer.