mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 08:26:50 +00:00
Handle special formats like GL_LUMINANCE8_EXT separately
This commit is contained in:
@@ -148,13 +148,24 @@ ResourceFormat MakeResourceFormat(WrappedOpenGL &gl, GLenum target, GLenum fmt)
|
||||
{
|
||||
ResourceFormat ret;
|
||||
|
||||
ret.compByteWidth = 1;
|
||||
ret.compCount = 4;
|
||||
ret.compType = eCompType_Float;
|
||||
|
||||
ret.rawType = (uint32_t)fmt;
|
||||
ret.special = false;
|
||||
ret.specialFormat = eSpecial_Unknown;
|
||||
ret.strname = widen(ToStr::Get(fmt)).substr(3); // 3 == strlen("GL_")
|
||||
|
||||
// special handling for formats that don't query neatly
|
||||
if(fmt == eGL_LUMINANCE8_EXT)
|
||||
{
|
||||
ret.compByteWidth = 1;
|
||||
ret.compCount = 1;
|
||||
ret.compType = eCompType_UNorm;
|
||||
ret.srgbCorrected = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret.compByteWidth = 1;
|
||||
ret.compCount = 4;
|
||||
ret.compType = eCompType_Float;
|
||||
|
||||
GLint data[8];
|
||||
GLenum *edata = (GLenum *)data;
|
||||
@@ -275,8 +286,6 @@ ResourceFormat MakeResourceFormat(WrappedOpenGL &gl, GLenum target, GLenum fmt)
|
||||
RDCERR("Unexpected texture type, not colour or depth");
|
||||
}
|
||||
|
||||
ret.strname = widen(ToStr::Get(fmt)).substr(3); // 3 == strlen("GL_")
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user