From: ibs Date: Mon, 2 Nov 2015 14:41:25 +0000 (+0300) Subject: 0026834: Visualization, OpenGl_FrameBuffer - use GL_DEPTH_COMPONENT instead of GL_DEP... X-Git-Tag: V7_0_0_beta~155 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=2e26cf76642bf2fdae25560c1014ffd4bf8a6d7c;p=occt-copy.git 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 --- diff --git a/src/OpenGl/OpenGl_FrameBuffer.cxx b/src/OpenGl/OpenGl_FrameBuffer.cxx index 5a3304a6e7..d1a11d3434 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.cxx +++ b/src/OpenGl/OpenGl_FrameBuffer.cxx @@ -42,19 +42,19 @@ namespace } case GL_DEPTH_COMPONENT16: { - thePixelFormat = GL_DEPTH; + thePixelFormat = GL_DEPTH_COMPONENT; theDataType = GL_UNSIGNED_SHORT; return true; } case GL_DEPTH_COMPONENT24: { - thePixelFormat = GL_DEPTH; + thePixelFormat = GL_DEPTH_COMPONENT; theDataType = GL_UNSIGNED_INT; return true; } case GL_DEPTH_COMPONENT32F: { - thePixelFormat = GL_DEPTH; + thePixelFormat = GL_DEPTH_COMPONENT; theDataType = GL_FLOAT; return true; } diff --git a/src/OpenGl/OpenGl_GlFunctions.hxx b/src/OpenGl/OpenGl_GlFunctions.hxx index a6d75d5217..d7878303ec 100644 --- a/src/OpenGl/OpenGl_GlFunctions.hxx +++ b/src/OpenGl/OpenGl_GlFunctions.hxx @@ -109,6 +109,7 @@ #define GL_DEPTH24_STENCIL8 0x88F0 // OpenGL ES 3.0+ + #define GL_DEPTH_COMPONENT24 0x81A6 #define GL_DEPTH_COMPONENT32F 0x8CAC #define GL_DEPTH32F_STENCIL8 0x8CAD #define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD