0028744: Visualization, OpenGl_FrameBuffer missing GL_RGB8 format
authorage <age@opencascade.com>
Tue, 16 May 2017 10:12:50 +0000 (13:12 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 25 May 2017 08:22:09 +0000 (11:22 +0300)
Missing GL_RGB8 and GL_RGB formats added to getColorDataFormat function.

src/OpenGl/OpenGl_FrameBuffer.cxx

index c18551c..ef3cdf6 100644 (file)
@@ -96,15 +96,17 @@ namespace
         return true;
       }
       case GL_RGBA8:
+      case GL_RGBA:
       {
         thePixelFormat = GL_RGBA;
-        theDataType    = GL_UNSIGNED_INT;
+        theDataType    = GL_UNSIGNED_BYTE;
         return true;
       }
-      case GL_RGBA:
+      case GL_RGB8:
+      case GL_RGB:
       {
-        thePixelFormat = GL_RGBA;
-        theDataType    = GL_UNSIGNED_BYTE;
+        thePixelFormat = GL_RGB;
+        theDataType = GL_UNSIGNED_BYTE;
         return true;
       }
     }