Public headers should not have #ifdefs relying on private defines

HAVE_COGL_GLES2 is defined in config.h through the configure script and
should not be used in public headers.

The patch makes configure generate the right define that can be used
later in the header.
This commit is contained in:
Damien Lespiau 2009-06-15 14:15:27 +01:00
parent c60a974ec0
commit 5d437281ec

View File

@ -31,6 +31,8 @@
G_BEGIN_DECLS
#define @COGL_GLES_VERSION@ 1
/* ClearBufferMask */
#define CGL_DEPTH_BUFFER_BIT GL_DEPTH_BUFFER_BIT
#define CGL_STENCIL_BUFFER_BIT GL_STENCIL_BUFFER_BIT
@ -163,7 +165,7 @@ G_BEGIN_DECLS
#define CGL_STENCIL_PASS_DEPTH_PASS GL_STENCIL_PASS_DEPTH_PASS
#define CGL_STENCIL_REF GL_STENCIL_REF
#define CGL_STENCIL_WRITEMASK GL_STENCIL_WRITEMASK
#ifdef HAVE_COGL_GLES2
#ifdef COGL_HAS_GLES2
#define CGL_MATRIX_MODE 0x0BA0 /* bad style but works for now */
#else
#define CGL_MATRIX_MODE GL_MATRIX_MODE
@ -195,7 +197,7 @@ G_BEGIN_DECLS
#define CGL_MAX_VIEWPORT_DIMS GL_MAX_VIEWPORT_DIMS
#define CGL_MAX_ELEMENTS_VERTICES GL_MAX_ELEMENTS_VERTICES
#define CGL_MAX_ELEMENTS_INDICES GL_MAX_ELEMENTS_INDICES
#ifdef HAVE_COGL_GLES2
#ifdef COGL_HAS_GLES2
#define CGL_MAX_COMBINED_TEXTURE_IMAGE_UNITS GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
#else
#define CGL_MAX_COMBINED_TEXTURE_IMAGE_UNITS GL_MAX_TEXTURE_UNITS