Skip to content

Commit

Permalink
gl: define GL_BGRA if not defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Mar 24, 2014
1 parent 46db3a0 commit d6d745b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/GLWidgetRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#ifndef GL_BGRA_EXT
#if defined QT_OPENGL_ES_2
#include <GLES2/gl2ext.h>
//#include <GLES/glext.h> //maemo 5 define there
#elif defined QT_OPENGL_ES
#include <GLES/glext.h>
#else
Expand All @@ -44,8 +45,12 @@
#endif //GL_BGRA_EXT
//TODO: glPixelStorei(GL_PACK_SWAP_BYTES, ) to swap rgba?
#ifndef GL_BGRA //it may be defined in glext.h
#ifdef GL_BGRA_EXT
#define GL_BGRA GL_BGRA_EXT
#endif //GL_BGRA_EXT
#ifdef GL_BGR_EXT
#define GL_BGR GL_BGR_EXT
#endif //GL_BGR_EXT
#endif //GL_BGRA
#endif //GL_BGRA

Expand All @@ -57,6 +62,14 @@
#define FMT GL_BGRA
#endif //QT_OPENGL_ES_2

#ifndef GL_BGRA
#define GL_BGRA 0x80E1
#endif
#ifndef GL_BGR
#define GL_BGR 0x80E0
#endif


//#ifdef GL_EXT_unpack_subimage
#ifndef GL_UNPACK_ROW_LENGTH
#ifdef GL_UNPACK_ROW_LENGTH_EXT
Expand Down

0 comments on commit d6d745b

Please sign in to comment.