mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-27 17:06:32 +00:00
Handle GL_RGBA2 texture format as if it were GL_RGBA8
This commit is contained in:
@@ -1782,6 +1782,14 @@ ResourceFormat MakeResourceFormat(GLenum target, GLenum fmt)
|
||||
ret.compType = CompType::UNorm;
|
||||
return ret;
|
||||
}
|
||||
else if(fmt == eGL_RGBA2)
|
||||
{
|
||||
// pretend it's RGBA8 and hope for the best
|
||||
ret.compByteWidth = 1;
|
||||
ret.compCount = 4;
|
||||
ret.compType = CompType::UNorm;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if(IsCompressedFormat(fmt))
|
||||
{
|
||||
|
||||
@@ -533,6 +533,7 @@ GLenum GetDataType(GLenum internalFormat)
|
||||
case eGL_R3_G3_B2: return eGL_UNSIGNED_BYTE_3_3_2;
|
||||
case eGL_RGB4:
|
||||
case eGL_RGBA4: return eGL_UNSIGNED_SHORT_4_4_4_4;
|
||||
case eGL_RGBA2: return eGL_UNSIGNED_BYTE;
|
||||
case eGL_RGB5_A1: return eGL_UNSIGNED_SHORT_5_5_5_1;
|
||||
case eGL_RGB565:
|
||||
case eGL_RGB5: return eGL_UNSIGNED_SHORT_5_6_5;
|
||||
|
||||
Reference in New Issue
Block a user