[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] implementing renderbufferStorage on desktop GL where 16-bit color buffers are not available


The OpenGL ES glRenderbufferStorage function, which our renderbufferStorage function mimics, accepts only 16 bit color buffer formats: GL_RGB565, GL_RGBA4, GL_RGB5_A1.

But here on my desktop OpenGL system [1] it seems that these 16 bit color buffer formats are not supported. Specifically:
 * passing GL_RGB565 to glRenderbufferStorage gives me GL_INVALID_ENUM.
 * passing GL_RGBA4 to glRenderbufferStorage succeeds but subsequent drawing fails with GL_FRAMEBUFFER_UNSUPPORTED.

The easiest work-around that I can think of is to make renderbufferStorage silently replace these 16 bit formats by RGBA8 / RGB8. This makes the framebuffer-test.html test succeed here.

But I am concerned about doing this: could some code be relying on the color buffer being exactly, say, RGB5_A1 ? Is it OK to silently replace this by RGBA8?

I am curious as to how this framebuffer-test.html test can be successful in other implementations? I looked at the WebKit code and it doesn't seem to be doing anything special about it...?

[1] My system: NVIDIA card from the Geforce 200 series, NVIDIA proprietary driver, linux x86-64.

You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: