]> OCCT Git - occt-copy.git/commitdiff
0026834: Visualization, OpenGl_FrameBuffer - use GL_DEPTH_COMPONENT instead of GL_DEP...
authoribs <ibs@opencascade.com>
Mon, 2 Nov 2015 14:41:25 +0000 (17:41 +0300)
committerbugmaster <bugmaster@opencascade.com>
Mon, 2 Nov 2015 15:09:14 +0000 (18:09 +0300)
getDepthDataFormat method uses correct enumeration for GL_DEPTH_COMPONENT texture now

src/OpenGl/OpenGl_FrameBuffer.cxx
src/OpenGl/OpenGl_GlFunctions.hxx

index 5a3304a6e7027400ec3afa88d6996112d8077bbf..d1a11d3434f2867f359b324f7b1bd68ce7677a17 100644 (file)
@@ -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;
       }
index a6d75d521797537ec740b8b49eb0dec89742b1ba..d7878303ecc5a0d9720b69ea8e743c49cf11fa65 100644 (file)
   #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