Note that there are some explanatory texts on larger screens.

plurals
  1. POSwitching from GL_ARB_framebuffer to GL_EXT_framebuffer. Rendebuffer setup error: GL_FRAMEBUFFER_UNSUPPORTED_EXT
    primarykey
    data
    text
    <p>At my company, we are working on huge library, which is a platform independent renderer (but it's main pupropse is not to be used with games, but with professional and office apps). Everything is going fine, we have already a very efficient D3D11 and OpenGL renderers, as well as 'software' renderers for Windows and Linux (GDI/X11).</p> <p>Recently, we have started to implement additional improvements in lower layers of our API. We thought it may be good idea to test them also on slower machines. Because update interacts with OpenGL-specific logic, this specific version needs to be tested.</p> <p>We have implemented RTT (Render To Texture) in GL using core framebuffer object. Because older HW wasn't able to work with this solution (no ARB_framebuffer support), we have created simple wrapper, which detects supported version of FBO (ARB_fb_object or EXT_fb_object) and wraps all cals in a transprent way. Example from creating depth stencil attachment:</p> <pre> <code> gxFBO::gen_renderbuffers(1, &stencil_buffer_id); gxFBO::bind_renderbuffer(GX_RENDERBUFFER, stencil_buffer_id); gxFBO::renderbuffer_storage(GX_RENDERBUFFER, GX_DEPTH24_STENCIL8, width, height); gxFBO::bind_renderbuffer(GX_RENDERBUFFER, 0); gxFBO::framebuffer_renderbuffer(GX_FRAMEBUFFER, GX_DEPTH_STENCIL_ATTACHMENT, stencil_buffer_id); gxFBO::check_framebuffer_status(); </code> </pre> <p>Quick explanation: functions calls are equivalent to gl* versions (for example, gxFBO::renderbuffer_storage() calls internally glRenderbufferStorage() or glRenderbufferStorageEXT(), based on supported version). Preprocessor constants are also the same (GX_DEPTH24_STENCIL8 = (GL_DEPTH24_STENCIL8 or GL_DEPTH24_STENCIL8_EXT)).</p> <p>This works perfectly fine on hardware with 3.0+ support (everything renders correctly). It fails, however on older hardware (with GL 2.1 and EXT_framebuffer support).</p> <p>Returned error in gxFBO::check_framebuffer_status() is: GL_FRAMEBUFFER_UNSUPPORTED_EXT.</p> <p>I also tried to create separate renderbuffers for depth and stencil:</p> <pre> <code> gxFBO::gen_renderbuffers(1, &depth_buffer_id); gxFBO::gen_renderbuffers(1, &stencil_buffer_id); gxFBO::bind_renderbuffer(GX_RENDERBUFFER, depth_buffer_id); gxFBO::renderbuffer_storage(GX_RENDERBUFFER, GL_DEPTH_COMPONENT, width, height); gxFBO::bind_renderbuffer(GX_RENDERBUFFER, stencil_buffer_id); gxFBO::renderbuffer_storage(GX_RENDERBUFFER, GX_STENCIL_INDEX8, width, height); gxFBO::bind_renderbuffer(GX_RENDERBUFFER, 0); gxFBO::framebuffer_renderbuffer(GX_FRAMEBUFFER, GX_DEPTH_ATTACHMENT, GX_RENDERBUFFER, depth_buffer_id); gxFBO::framebuffer_renderbuffer(GX_FRAMEBUFFER, GX_STENCIL_ATTACHMENT, GX_RENDERBUFFER, stencil_buffer_id); gxFBO::check_framebuffer_status(); </code> </pre> <p>Same error at framebuffer status check. Could anyone help with proper setup in this case? Is it possible to do what I'm trying to do using GL_EXT_framebuffer?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload