- Timestamp:
- 08/28/08 21:17:15 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredShader.cpp
r2868 r2879 24 24 25 25 26 static GLenum mymrt[] = {GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT, GL_COLOR_ATTACHMENT2_EXT, GL_COLOR_ATTACHMENT3_EXT}; 27 26 28 27 29 static CGprogram sCgDeferredProgram; … … 40 42 mWidth(w), mHeight(h) 41 43 { 42 mFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE); 43 // the diffuse color buffer 44 mFbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false); 44 //mFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE); 45 //mFbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false); 45 46 } 46 47 … … 50 51 if (sCgDeferredProgram) 51 52 cgDestroyProgram(sCgDeferredProgram); 53 54 //DEL_PTR(mFbo); 52 55 } 53 56 … … 111 114 GLuint normalsTex = fbo->GetColorBuffer(2)->GetTexture(); 112 115 113 mFbo->Bind(); 116 fbo->Bind(); 117 glDrawBuffers(1, mymrt + 3); 118 114 119 115 120 glPushAttrib(GL_VIEWPORT_BIT); … … 199 204 void DeferredShader::AntiAliasing(FrameBufferObject *fbo) 200 205 { 201 GLuint colorsTex = mFbo->GetColorBuffer(0)->GetTexture();206 GLuint colorsTex = fbo->GetColorBuffer(3)->GetTexture(); 202 207 GLuint normalsTex = fbo->GetColorBuffer(2)->GetTexture(); 203 208
Note: See TracChangeset
for help on using the changeset viewer.