Bug 48353 - WebGL color renderbuffers need to use 8 bit per channel on desktop OpenGL
Summary: WebGL color renderbuffers need to use 8 bit per channel on desktop OpenGL
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kenneth Russell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-26 11:21 PDT by Benoit Jacob
Modified: 2010-10-26 13:56 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benoit Jacob 2010-10-26 11:21:22 PDT
WebGL color renderbuffers, like OpenGL ES, are 16 bits per pixel.

But desktop OpenGL implementations tend to not support these, and AFAIK only 8 bit-per-channel formats like GL_RGB8 and GL_RGBA8 are required to be supported in deskop OpenGL.

So renderbufferStorage needs to replace GL_RGB565 by GL_RGB8 and GL_RGBA4/GL_RGB5_A1 by GL_RGBA8 on these desktop systems, or else the framebuffer will never be complete.
Comment 1 Kenneth Russell 2010-10-26 13:56:03 PDT
This translation has been implemented in WebKit for some time. See e.g. GraphicsContext3D::renderbufferStorage in WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp and WebGraphicsContext3DDefaultImpl::renderbufferStorage in WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp. The code used by default in Chromium lives in the Chromium tree under src/chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc and src/gpu/command_buffer/ .