Implements support for rgb8 and rgba8 renderbuffer storage formats

TRAC #12717 Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@394 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 3ea20e7c
...@@ -242,6 +242,7 @@ void Context::makeCurrent(egl::Display *display, egl::Surface *surface) ...@@ -242,6 +242,7 @@ void Context::makeCurrent(egl::Display *display, egl::Surface *surface)
const D3DFORMAT renderBufferFormats[] = const D3DFORMAT renderBufferFormats[] =
{ {
D3DFMT_A8R8G8B8, D3DFMT_A8R8G8B8,
D3DFMT_X8R8G8B8,
D3DFMT_R5G6B5, D3DFMT_R5G6B5,
D3DFMT_D24S8 D3DFMT_D24S8
}; };
......
...@@ -3641,6 +3641,8 @@ void __stdcall glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samp ...@@ -3641,6 +3641,8 @@ void __stdcall glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samp
case GL_RGB565: case GL_RGB565:
case GL_STENCIL_INDEX8: case GL_STENCIL_INDEX8:
case GL_DEPTH24_STENCIL8_OES: case GL_DEPTH24_STENCIL8_OES:
case GL_RGB8_OES:
case GL_RGBA8_OES:
break; break;
default: default:
return error(GL_INVALID_ENUM); return error(GL_INVALID_ENUM);
...@@ -3674,6 +3676,8 @@ void __stdcall glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samp ...@@ -3674,6 +3676,8 @@ void __stdcall glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samp
case GL_RGBA4: case GL_RGBA4:
case GL_RGB5_A1: case GL_RGB5_A1:
case GL_RGB565: case GL_RGB565:
case GL_RGB8_OES:
case GL_RGBA8_OES:
context->setRenderbufferStorage(new gl::Colorbuffer(width, height, internalformat, samples)); context->setRenderbufferStorage(new gl::Colorbuffer(width, height, internalformat, samples));
break; break;
case GL_STENCIL_INDEX8: case GL_STENCIL_INDEX8:
......
...@@ -601,8 +601,10 @@ D3DFORMAT ConvertRenderbufferFormat(GLenum format) ...@@ -601,8 +601,10 @@ D3DFORMAT ConvertRenderbufferFormat(GLenum format)
switch (format) switch (format)
{ {
case GL_RGBA4: case GL_RGBA4:
case GL_RGB5_A1: return D3DFMT_A8R8G8B8; case GL_RGB5_A1:
case GL_RGBA8_OES: return D3DFMT_A8R8G8B8;
case GL_RGB565: return D3DFMT_R5G6B5; case GL_RGB565: return D3DFMT_R5G6B5;
case GL_RGB8_OES: return D3DFMT_X8R8G8B8;
case GL_DEPTH_COMPONENT16: case GL_DEPTH_COMPONENT16:
case GL_STENCIL_INDEX8: case GL_STENCIL_INDEX8:
case GL_DEPTH24_STENCIL8_OES: return D3DFMT_D24S8; case GL_DEPTH24_STENCIL8_OES: return D3DFMT_D24S8;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment