rhi: gl: Correct data type for D24 and D24S8
Change-Id: I7aaaba49d0cc427c82e1ee4d0657b2992ffd4905 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 409cd2be188af6ace294f46276c69a7aab87fcb1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
5ef2440102
commit
613a37e7ca
@ -215,6 +215,10 @@ QT_BEGIN_NAMESPACE
|
|||||||
#define GL_DEPTH_COMPONENT32F 0x8CAC
|
#define GL_DEPTH_COMPONENT32F 0x8CAC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_UNSIGNED_INT_24_8
|
||||||
|
#define GL_UNSIGNED_INT_24_8 0x84FA
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef GL_STENCIL_INDEX
|
#ifndef GL_STENCIL_INDEX
|
||||||
#define GL_STENCIL_INDEX 0x1901
|
#define GL_STENCIL_INDEX 0x1901
|
||||||
#endif
|
#endif
|
||||||
@ -1219,13 +1223,13 @@ static inline void toGlTextureFormat(QRhiTexture::Format format, const QRhiGles2
|
|||||||
*glintformat = GL_DEPTH_COMPONENT24;
|
*glintformat = GL_DEPTH_COMPONENT24;
|
||||||
*glsizedintformat = *glintformat;
|
*glsizedintformat = *glintformat;
|
||||||
*glformat = GL_DEPTH_COMPONENT;
|
*glformat = GL_DEPTH_COMPONENT;
|
||||||
*gltype = GL_UNSIGNED_SHORT;
|
*gltype = GL_UNSIGNED_INT;
|
||||||
break;
|
break;
|
||||||
case QRhiTexture::D24S8:
|
case QRhiTexture::D24S8:
|
||||||
*glintformat = GL_DEPTH24_STENCIL8;
|
*glintformat = GL_DEPTH24_STENCIL8;
|
||||||
*glsizedintformat = *glintformat;
|
*glsizedintformat = *glintformat;
|
||||||
*glformat = GL_DEPTH_STENCIL;
|
*glformat = GL_DEPTH_STENCIL;
|
||||||
*gltype = GL_UNSIGNED_SHORT;
|
*gltype = GL_UNSIGNED_INT_24_8;
|
||||||
break;
|
break;
|
||||||
case QRhiTexture::D32F:
|
case QRhiTexture::D32F:
|
||||||
*glintformat = GL_DEPTH_COMPONENT32F;
|
*glintformat = GL_DEPTH_COMPONENT32F;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user