- Timestamp:
- 08/29/08 00:00:59 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SsaoShader.cpp
r2880 r2881 112 112 static void CreateNoiseTex2D(int w, int h) 113 113 { 114 // hack: should be able to recalc noise texture115 //if (noiseTex > 0) return;116 117 114 //GLubyte *randomNormals = new GLubyte[mWidth * mHeight * 3]; 118 115 float *randomNormals = new float[w * h * 3]; … … 167 164 //-- the flip-flop fbos 168 165 169 w = 256; h = 256;166 //w = 512; h = 512; 170 167 mNewFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE); 171 168 … … 173 170 mNewFbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false); 174 171 172 173 /////////////////////// 174 175 175 mOldFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE); 176 176 … … 457 457 glDrawBuffers(1, mymrt); 458 458 459 glPushAttrib(GL_VIEWPORT_BIT);460 glViewport(0, 0, 256, 256);461 462 glMatrixMode(GL_PROJECTION);463 glPushMatrix();464 glLoadIdentity();465 466 glMatrixMode(GL_MODELVIEW);467 glPushMatrix();468 glLoadIdentity();469 470 const float offs = 0.5f;471 glOrtho(-offs, offs, -offs, offs, 0, 1);472 473 459 474 460 GLuint oldTex = mOldFbo->GetColorBuffer(0)->GetTexture(); … … 537 523 cgGLDisableTextureParameter(sOldTexParam); 538 524 539 glMatrixMode(GL_PROJECTION);540 glPopMatrix();541 542 glMatrixMode(GL_MODELVIEW);543 glPopMatrix();544 545 glPopAttrib();546 525 547 526 FrameBufferObject::Release(); … … 805 784 glDrawBuffers(1, mymrt); 806 785 786 cgGLEnableProfile(RenderState::sCgFragmentProfile); 787 788 cgGLBindProgram(sCgCombinedIllumProgram); 789 807 790 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 808 791 809 cgGLEnableProfile(RenderState::sCgFragmentProfile);810 811 cgGLBindProgram(sCgCombinedIllumProgram);812 792 813 793 cgGLSetTextureParameter(sColorsTexCombinedIllumParam, colorsTex);
Note: See TracChangeset
for help on using the changeset viewer.