1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0026834: Visualization, OpenGl_FrameBuffer - use GL_DEPTH_COMPONENT instead of GL_DEPTH for texture initialization

getDepthDataFormat method uses correct enumeration for GL_DEPTH_COMPONENT texture now
This commit is contained in:
ibs 2015-11-02 17:41:25 +03:00 committed by bugmaster
parent 13e3622ca7
commit 2e26cf7664
2 changed files with 4 additions and 3 deletions

View File

@ -42,19 +42,19 @@ namespace
} }
case GL_DEPTH_COMPONENT16: case GL_DEPTH_COMPONENT16:
{ {
thePixelFormat = GL_DEPTH; thePixelFormat = GL_DEPTH_COMPONENT;
theDataType = GL_UNSIGNED_SHORT; theDataType = GL_UNSIGNED_SHORT;
return true; return true;
} }
case GL_DEPTH_COMPONENT24: case GL_DEPTH_COMPONENT24:
{ {
thePixelFormat = GL_DEPTH; thePixelFormat = GL_DEPTH_COMPONENT;
theDataType = GL_UNSIGNED_INT; theDataType = GL_UNSIGNED_INT;
return true; return true;
} }
case GL_DEPTH_COMPONENT32F: case GL_DEPTH_COMPONENT32F:
{ {
thePixelFormat = GL_DEPTH; thePixelFormat = GL_DEPTH_COMPONENT;
theDataType = GL_FLOAT; theDataType = GL_FLOAT;
return true; return true;
} }

View File

@ -109,6 +109,7 @@
#define GL_DEPTH24_STENCIL8 0x88F0 #define GL_DEPTH24_STENCIL8 0x88F0
// OpenGL ES 3.0+ // OpenGL ES 3.0+
#define GL_DEPTH_COMPONENT24 0x81A6
#define GL_DEPTH_COMPONENT32F 0x8CAC #define GL_DEPTH_COMPONENT32F 0x8CAC
#define GL_DEPTH32F_STENCIL8 0x8CAD #define GL_DEPTH32F_STENCIL8 0x8CAD
#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD