~hikiko/nux/arb-srgba-shader

« back to all changes in this revision

Viewing changes to NuxGraphics/IOpenGLFrameBufferObject.cpp

  • Committer: Travis Watkins
  • Date: 2011-08-03 10:34:36 UTC
  • mfrom: (409 nux-logger-fix)
  • mto: (454.5.1 nux-gles)
  • mto: This revision was merged to the branch mainline in revision 501.
  • Revision ID: travis.watkins@linaro.org-20110803103436-biz9c9930l2refsi
merge with lp:nux

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
    if ( (_Width == Width) && (_Height == Height) && (_PixelFormat == PixelFormat) )
75
75
      return 1;
76
76
 
77
 
#ifndef NUX_OPENGLES_20
78
 
    _Rbo.Set (GL_DEPTH_COMPONENT, Width, Height);
79
 
#endif
 
77
// #ifndef NUX_OPENGLES_20
 
78
//     _Rbo.Set (GL_DEPTH_COMPONENT, Width, Height);
 
79
// #endif
80
80
 
81
81
    // Clear clipping region stack
82
82
    _Width  = Width;
191
191
      }
192
192
    }
193
193
 
194
 
//     if(_Depth_Attachment.IsValid())
195
 
//     {
196
 
//         GLenum target   = _Depth_Attachment->GetSurfaceTarget();
197
 
//         GLenum glID     = _Depth_Attachment->GetOpenGLID();
198
 
//         GLint level     = _Depth_Attachment->GetMipLevel();
199
 
//         CHECKGL( glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, target, glID, level) );
200
 
//     }
201
 
//     else
202
 
//     {
203
 
//         CHECKGL( glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, 0, 0) );
204
 
//         // On the PC you need to bing the same D24S8 surface to the depth and the stencil attachment.
205
 
//     }
 
194
    if(_Depth_Attachment.IsValid())
 
195
    {
 
196
        GLenum target   = _Depth_Attachment->GetSurfaceTarget();
 
197
        GLenum glID     = _Depth_Attachment->GetOpenGLID();
 
198
        GLint level     = _Depth_Attachment->GetMipLevel();
 
199
        CHECKGL( glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, target, glID, level) );
 
200
    }
 
201
    else
 
202
    {
 
203
        CHECKGL( glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, 0, 0) );
 
204
        // On the PC you need to bing the same D24S8 surface to the depth and the stencil attachment.
 
205
    }
206
206
 
207
 
#ifndef NUX_OPENGLES_20
208
 
    _Rbo.Set (GL_DEPTH_COMPONENT, _Width, _Height);
209
 
    CHECKGL ( glFramebufferRenderbufferEXT (GL_FRAMEBUFFER_EXT,
210
 
                                            GL_DEPTH_ATTACHMENT_EXT,
211
 
                                            GL_RENDERBUFFER_EXT,
212
 
                                            _Rbo.GetId() ) );
213
 
#endif
 
207
// #ifndef NUX_OPENGLES_20
 
208
//     _Rbo.Set (GL_DEPTH_COMPONENT, _Width, _Height);
 
209
//     CHECKGL ( glFramebufferRenderbufferEXT (GL_FRAMEBUFFER_EXT,
 
210
//                                             GL_DEPTH_ATTACHMENT_EXT,
 
211
//                                             GL_RENDERBUFFER_EXT,
 
212
//                                             _Rbo.GetId() ) );
 
213
// #endif
214
214
 
215
215
    nuxAssert ( _Fbo.IsValid() == true );
216
216