Original Post
Can someone show me sample working code for this extension. I cant seem to get it to work. I wanna render a scene with a certain dimension and then overlay it on another render. Is this the best way to do this or is there a better way? the Sample code from openGL.org doesnt work, it returns a GL_ENUM error. If I replace the READ_FRAMEBUFFER_EXT / DRAW_FRAMEBUFFER_EXT with default FRAMEBUFFER_EXT, no error occurs but either does blit. http://www.opengl.org/registry/specs/EXT/framebuffer_blit.txt I guess I want to do something similar to Direct3Ds StretchRect function. Sample Code from openGL.org /* Render to framebuffer object 2 */ BindFramebufferEXT(DRAW_FRAMEBUFFER_EXT, 2); RenderScene(); /* Blit contents of color buffer, depth buffer and stencil buffer * from framebuffer object 2 to framebuffer object 1 */ BindFramebufferEXT(READ_FRAMEBUFFER_EXT, 2); BindFramebufferEXT(DRAW_FRAMEBUFFER_EXT, 1); BlitFramebufferEXT(0, 0, 640, 480, 0, 0, 640, 480, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST); /* Blit color buffer from framebuffer object 1 to framebuffer * object 3 with a 2X zoom and linear filtering */ BindFramebufferEXT(READ_FRAMEBUFFER_EXT, 1); BindFramebufferEXT(DRAW_FRAMEBUFFER_EXT, 3); BlitFramebufferEXT(0, 0, 640, 480, 0, 0, 1280, 960, GL_COLOR_BUFFER_BIT, GL_LINEAR); Thanks.