diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 40: Remove references to GL_BGRA and GL_BGR pixel formats that don't exist in OpenGL ES 2.0.

Message ID 20110721123632.17019.36349.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

Alexandros Frantzis July 21, 2011, 12:36 p.m. UTC
------------------------------------------------------------
revno: 40
committer: Alexandros Frantzis <alf82@freemail.gr>
timestamp: Mon 2010-07-12 11:34:57 +0300
message:
  Remove references to GL_BGRA and GL_BGR pixel formats that don't exist in OpenGL ES 2.0.
modified:
  texture.cpp


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'texture.cpp'
--- texture.cpp	2010-07-09 14:21:56 +0000
+++ texture.cpp	2010-07-12 08:34:57 +0000
@@ -17,15 +17,19 @@ 
         if (nOfColors == 4) {
             if (surface->format->Rmask == 0x000000ff)
                 texture_format = GL_RGBA;
-            else
-                texture_format = GL_BGRA;
+            else {
+                fprintf(stderr, "Error: %s: Unsupported pixel format BGRA\n", pFilename);
+                return 1;
+            }
         }
         else {
             if (nOfColors == 3) {
                 if (surface->format->Rmask == 0x000000ff)
                     texture_format = GL_RGB;
-                else
-                    texture_format = GL_BGR;
+                else {
+                    fprintf(stderr, "Error: %s: Unsupported pixel format BGR\n", pFilename);
+                    return 1;
+                }
             }
             else {
                 printf("warning: the image is not truecolor..  this will probably break\n");