mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 23:46:41 +00:00
Handle 16-bit backbuffer colour as RGB565 in GLES captures
This commit is contained in:
@@ -743,11 +743,27 @@ void WrappedOpenGL::CreateReplayBackbuffer(const GLInitParams ¶ms, ResourceI
|
||||
GLenum colfmt = eGL_RGBA8;
|
||||
|
||||
if(params.colorBits == 32)
|
||||
{
|
||||
colfmt = params.isSRGB ? eGL_SRGB8_ALPHA8 : eGL_RGBA8;
|
||||
}
|
||||
else if(params.colorBits == 24)
|
||||
{
|
||||
colfmt = params.isSRGB ? eGL_SRGB8 : eGL_RGB8;
|
||||
}
|
||||
else if(params.colorBits == 16)
|
||||
{
|
||||
RDCASSERT(!params.isSRGB);
|
||||
// 5:6:5 is almost certainly not used in desktop GL as a backbuffer format, and is only required
|
||||
// to be supported from 4.2 onwards, so only replicate it on a GLES capture.
|
||||
if(IsGLES)
|
||||
colfmt = eGL_RGB565;
|
||||
else
|
||||
colfmt = eGL_RGB8;
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCERR("Unexpected # colour bits: %d", params.colorBits);
|
||||
}
|
||||
|
||||
GLenum target = eGL_TEXTURE_2D;
|
||||
if(params.multiSamples > 1)
|
||||
|
||||
Reference in New Issue
Block a user