mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
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:
parent
c6fba47a52
commit
3653a9a64d
@ -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
|
||||
|
@ -135,6 +135,7 @@ AS_IF([test "x$clutterbackend" = "xeglnative" ||
|
||||
|
||||
CLUTTER_COGL="gles"
|
||||
AC_DEFINE([HAVE_COGL_GLES], 1, [Have GL/ES for rendering])
|
||||
AC_SUBST(COGL_GLES_VERSION, [COGL_HAS_GLES1])
|
||||
|
||||
AC_CHECK_HEADERS([GLES/egl.h],
|
||||
[],
|
||||
@ -179,6 +180,7 @@ AS_IF([test "x$clutterbackend" = "xeglnative" ||
|
||||
use_gles2_wrapper=yes
|
||||
CLUTTER_COGL="gles"
|
||||
AC_DEFINE([HAVE_COGL_GLES2], 1, [Have GL/ES for rendering])
|
||||
AC_SUBST(COGL_GLES_VERSION, [COGL_HAS_GLES2])
|
||||
|
||||
AC_CHECK_HEADERS([EGL/egl.h],
|
||||
[],
|
||||
@ -192,6 +194,7 @@ AS_IF([test "x$clutterbackend" = "xeglnative" ||
|
||||
clutter_gl_header="GLES/gl.h"
|
||||
CLUTTER_COGL="gles"
|
||||
AC_DEFINE([HAVE_COGL_GLES], 1, [Have GL/ES for rendering])
|
||||
AC_SUBST(COGL_GLES_VERSION, [COGL_HAS_GLES1])
|
||||
|
||||
AC_CHECK_HEADERS([GLES/egl.h],
|
||||
[],
|
||||
|
Loading…
Reference in New Issue
Block a user