Merge branch 'master' into more-texture-backends

This commit is contained in:
Neil Roberts 2010-01-15 12:15:46 +00:00
commit f5d809f1e8
19 changed files with 4165 additions and 5223 deletions

View File

@ -34,6 +34,17 @@ INCLUDES = \
-I$(top_builddir)/clutter/cogl \
$(NULL)
AM_CPPFLAGS = \
-DG_DISABLE_SINGLE_INCLUDES \
-DG_DISABLE_DEPRECATED \
-DG_LOG_DOMAIN=\"Cogl-$(COGL_WINSYS)\" \
-DCLUTTER_COMPILATION \
$(COGL_DEBUG_CFLAGS) \
$(CLUTTER_DEBUG_CFLAGS) \
$(NULL)
AM_CFLAGS = $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
cogl-defines.h: $(top_builddir)/clutter/cogl/cogl/driver/gl/cogl-defines.h $(top_builddir)/clutter/cogl/cogl/driver/gles/cogl-defines.h
$(QUIET_GEN)cp -f $(top_builddir)/clutter/cogl/cogl/driver/$(COGL_DRIVER)/cogl-defines.h $(@F)
@ -68,28 +79,7 @@ cogl_winsys_sources = \
$(srcdir)/winsys/cogl-win32.c \
$(NULL)
# glib-mkenums rules
glib_enum_h = cogl-enum-types.h
glib_enum_c = cogl-enum-types.c
glib_enum_headers = $(cogl_public_h)
include $(top_srcdir)/build/autotools/Makefile.am.enums
noinst_LTLIBRARIES = libclutter-cogl.la
libclutter_cogl_la_CPPFLAGS = \
$(COGL_DEBUG_CFLAGS) \
$(CLUTTER_DEBUG_CFLAGS) \
$(MAINTAINER_CFLAGS) \
-DG_DISABLE_SINGLE_INCLUDES \
-DG_LOG_DOMAIN=\"Cogl-$(COGL_WINSYS)\" \
-DCLUTTER_COMPILATION
libclutter_cogl_la_CFLAGS = $(CLUTTER_CFLAGS)
libclutter_cogl_la_LIBADD = -lm $(CLUTTER_LIBS) \
$(top_builddir)/clutter/cogl/cogl/driver/$(COGL_DRIVER)/libclutter-cogl-driver.la
libclutter_cogl_la_SOURCES = \
$(BUILT_SOURCES) \
cogl_sources_c = \
$(srcdir)/winsys/cogl-winsys.h \
$(srcdir)/winsys/cogl-@COGL_WINSYS@.c \
$(srcdir)/cogl-handle.h \
@ -143,8 +133,22 @@ libclutter_cogl_la_SOURCES = \
$(srcdir)/cogl-framebuffer.c \
$(srcdir)/cogl-matrix-mesa.h \
$(srcdir)/cogl-matrix-mesa.c \
$(srcdir)/cogl-profile.h \
$(srcdir)/cogl-profile.c \
$(NULL)
# glib-mkenums rules
glib_enum_h = cogl-enum-types.h
glib_enum_c = cogl-enum-types.c
glib_enum_headers = $(cogl_public_h)
include $(top_srcdir)/build/autotools/Makefile.am.enums
noinst_LTLIBRARIES = libclutter-cogl.la
libclutter_cogl_la_LIBADD = -lm $(CLUTTER_LIBS) $(top_builddir)/clutter/cogl/cogl/driver/$(COGL_DRIVER)/libclutter-cogl-driver.la
libclutter_cogl_la_SOURCES = $(BUILT_SOURCES) $(cogl_sources_c)
EXTRA_DIST += $(cogl_winsys_sources)
EXTRA_DIST += stb_image.c
@ -163,11 +167,8 @@ if HAVE_INTROSPECTION
Cogl-@CLUTTER_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libclutter-cogl.la
$(QUIET_GEN)$(INTROSPECTION_SCANNER) -v \
--namespace Cogl --nsversion=@CLUTTER_API_VERSION@ \
-I$(srcdir) \
-I$(srcdir)/.. \
-I$(srcdir)/winsys \
-I$(srcdir)/driver/@COGL_DRIVER@ \
-DCLUTTER_COMPILATION \
$(INCLUDES) \
$(AM_CPPFLAGS) \
--c-include='cogl/cogl.h' \
--include=GL-1.0 \
--include=GObject-2.0 \
@ -184,4 +185,3 @@ gir_DATA = $(BUILT_GIRSOURCES)
CLEANFILES += $(BUILT_GIRSOURCES)
endif

View File

@ -56,7 +56,8 @@ typedef struct _CoglOffscreen
{
CoglFramebuffer _parent;
GLuint fbo_handle;
GLuint gl_stencil_handle;
GSList *renderbuffers;
CoglHandle texture;
} CoglOffscreen;
#define COGL_OFFSCREEN(X) ((CoglOffscreen *)(X))

View File

@ -71,6 +71,21 @@
#ifndef GL_STENCIL_INDEX8
#define GL_STENCIL_INDEX8 0x8D48
#endif
#ifndef GL_DEPTH_STENCIL
#define GL_DEPTH_STENCIL 0x84F9
#endif
#ifndef GL_DEPTH_ATTACHMENT
#define GL_DEPTH_ATTACHMENT 0x8D00
#endif
#ifndef GL_DEPTH_COMPONENT16
#define GL_DEPTH_COMPONENT16 0x81A5
#endif
typedef enum {
_TRY_DEPTH_STENCIL = 1L<<0,
_TRY_DEPTH = 1L<<1,
_TRY_STENCIL = 1L<<2
} TryFBOFlags;
static void _cogl_framebuffer_free (CoglFramebuffer *framebuffer);
static void _cogl_onscreen_free (CoglOnscreen *onscreen);
@ -232,17 +247,123 @@ _cogl_framebuffer_get_projection_stack (CoglHandle handle)
return framebuffer->projection_stack;
}
static gboolean
try_creating_fbo (CoglOffscreen *offscreen,
TryFBOFlags flags,
CoglHandle texture)
{
GLuint gl_depth_stencil_handle;
GLuint gl_depth_handle;
GLuint gl_stencil_handle;
GLuint tex_gl_handle;
GLenum tex_gl_target;
GLuint fbo_gl_handle;
GLenum status;
_COGL_GET_CONTEXT (ctx, FALSE);
if (!cogl_texture_get_gl_texture (texture, &tex_gl_handle, &tex_gl_target))
return FALSE;
if (tex_gl_target != GL_TEXTURE_2D
#ifdef HAVE_COGL_GL
&& tex_gl_target != GL_TEXTURE_RECTANGLE_ARB
#endif
)
return FALSE;
/* We are about to generate and bind a new fbo, so when next flushing the
* journal, we will need to rebind the current framebuffer... */
ctx->dirty_bound_framebuffer = 1;
/* Generate framebuffer */
glGenFramebuffers (1, &fbo_gl_handle);
GE (glBindFramebuffer (GL_FRAMEBUFFER, fbo_gl_handle));
offscreen->fbo_handle = fbo_gl_handle;
GE (glFramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
tex_gl_target, tex_gl_handle, 0));
if (flags & _TRY_DEPTH_STENCIL)
{
/* Create a renderbuffer for depth and stenciling */
GE (glGenRenderbuffers (1, &gl_depth_stencil_handle));
GE (glBindRenderbuffer (GL_RENDERBUFFER, gl_depth_stencil_handle));
GE (glRenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_STENCIL,
cogl_texture_get_width (texture),
cogl_texture_get_height (texture)));
GE (glBindRenderbuffer (GL_RENDERBUFFER, 0));
GE (glFramebufferRenderbuffer (GL_FRAMEBUFFER,
GL_STENCIL_ATTACHMENT,
GL_RENDERBUFFER, gl_depth_stencil_handle));
GE (glFramebufferRenderbuffer (GL_FRAMEBUFFER,
GL_DEPTH_ATTACHMENT,
GL_RENDERBUFFER, gl_depth_stencil_handle));
offscreen->renderbuffers =
g_slist_prepend (offscreen->renderbuffers,
GUINT_TO_POINTER (gl_depth_stencil_handle));
}
if (flags & _TRY_DEPTH)
{
GE (glGenRenderbuffers (1, &gl_depth_handle));
GE (glBindRenderbuffer (GL_RENDERBUFFER, gl_depth_handle));
/* For now we just ask for GL_DEPTH_COMPONENT16 since this is all that's
* available under GLES */
GE (glRenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT16,
cogl_texture_get_width (texture),
cogl_texture_get_height (texture)));
GE (glBindRenderbuffer (GL_RENDERBUFFER, 0));
GE (glFramebufferRenderbuffer (GL_FRAMEBUFFER,
GL_DEPTH_ATTACHMENT,
GL_RENDERBUFFER, gl_depth_handle));
offscreen->renderbuffers =
g_slist_prepend (offscreen->renderbuffers,
GUINT_TO_POINTER (gl_depth_handle));
}
if (flags & _TRY_STENCIL)
{
GE (glGenRenderbuffers (1, &gl_stencil_handle));
GE (glBindRenderbuffer (GL_RENDERBUFFER, gl_stencil_handle));
GE (glRenderbufferStorage (GL_RENDERBUFFER, GL_STENCIL_INDEX8,
cogl_texture_get_width (texture),
cogl_texture_get_height (texture)));
GE (glBindRenderbuffer (GL_RENDERBUFFER, 0));
GE (glFramebufferRenderbuffer (GL_FRAMEBUFFER,
GL_STENCIL_ATTACHMENT,
GL_RENDERBUFFER, gl_stencil_handle));
offscreen->renderbuffers =
g_slist_prepend (offscreen->renderbuffers,
GUINT_TO_POINTER (gl_stencil_handle));
}
/* Make sure it's complete */
status = glCheckFramebufferStatus (GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE)
{
GSList *l;
GE (glDeleteFramebuffers (1, &fbo_gl_handle));
for (l = offscreen->renderbuffers; l; l = l->next)
{
GLuint renderbuffer = GPOINTER_TO_UINT (l->data);
GE (glDeleteRenderbuffers (1, &renderbuffer));
}
return FALSE;
}
return TRUE;
}
CoglHandle
cogl_offscreen_new_to_texture (CoglHandle texhandle)
{
CoglOffscreen *offscreen;
int width;
int height;
GLuint tex_gl_handle;
GLenum tex_gl_target;
GLuint fbo_gl_handle;
GLuint gl_stencil_handle;
GLenum status;
CoglOffscreen *offscreen;
static TryFBOFlags flags;
static gboolean have_working_flags = FALSE;
_COGL_GET_CONTEXT (ctx, COGL_INVALID_HANDLE);
@ -257,42 +378,6 @@ cogl_offscreen_new_to_texture (CoglHandle texhandle)
if (cogl_texture_is_sliced (texhandle))
return COGL_INVALID_HANDLE;
/* Pick the single texture slice width, height and GL id */
width = cogl_texture_get_width (texhandle);
height = cogl_texture_get_height (texhandle);
if (!cogl_texture_get_gl_texture (texhandle, &tex_gl_handle, &tex_gl_target))
return COGL_INVALID_HANDLE;
if (tex_gl_target != GL_TEXTURE_2D
#ifdef HAVE_COGL_GL
&& tex_gl_target != GL_TEXTURE_RECTANGLE_ARB
#endif
)
return COGL_INVALID_HANDLE;
/* Create a renderbuffer for stenciling */
GE (glGenRenderbuffers (1, &gl_stencil_handle));
GE (glBindRenderbuffer (GL_RENDERBUFFER, gl_stencil_handle));
GE (glRenderbufferStorage (GL_RENDERBUFFER, GL_STENCIL_INDEX8,
cogl_texture_get_width (texhandle),
cogl_texture_get_height (texhandle)));
GE (glBindRenderbuffer (GL_RENDERBUFFER, 0));
/* We are about to generate and bind a new fbo, so when next flushing the
* journal, we will need to rebind the current framebuffer... */
ctx->dirty_bound_framebuffer = 1;
/* Generate framebuffer */
glGenFramebuffers (1, &fbo_gl_handle);
GE (glBindFramebuffer (GL_FRAMEBUFFER, fbo_gl_handle));
GE (glFramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
tex_gl_target, tex_gl_handle, 0));
GE (glFramebufferRenderbuffer (GL_FRAMEBUFFER,
GL_STENCIL_ATTACHMENT,
GL_RENDERBUFFER, gl_stencil_handle));
/* XXX: The framebuffer_object spec isn't clear in defining whether attaching
* a texture as a renderbuffer with mipmap filtering enabled while the
* mipmaps have not been uploaded should result in an incomplete framebuffer
@ -305,64 +390,60 @@ cogl_offscreen_new_to_texture (CoglHandle texhandle)
*/
_cogl_texture_set_filters (texhandle, GL_NEAREST, GL_NEAREST);
/* Make sure it's complete */
status = glCheckFramebufferStatus (GL_FRAMEBUFFER);
offscreen = g_new0 (CoglOffscreen, 1);
offscreen->texture = cogl_handle_ref (texhandle);
if (status != GL_FRAMEBUFFER_COMPLETE)
if ((have_working_flags &&
try_creating_fbo (offscreen, flags, texhandle)) ||
try_creating_fbo (offscreen, flags = _TRY_DEPTH_STENCIL, texhandle) ||
try_creating_fbo (offscreen, flags = _TRY_DEPTH | _TRY_STENCIL,
texhandle) ||
try_creating_fbo (offscreen, flags = _TRY_STENCIL, texhandle) ||
try_creating_fbo (offscreen, flags = _TRY_DEPTH, texhandle) ||
try_creating_fbo (offscreen, flags = 0, texhandle))
{
/* Stencil renderbuffers aren't always supported. Try again
without the stencil buffer */
GE (glFramebufferRenderbuffer (GL_FRAMEBUFFER,
GL_STENCIL_ATTACHMENT,
GL_RENDERBUFFER,
0));
GE (glDeleteRenderbuffers (1, &gl_stencil_handle));
gl_stencil_handle = 0;
/* Record that the last set of flags succeeded so that we can
try that set first next time */
have_working_flags = TRUE;
status = glCheckFramebufferStatus (GL_FRAMEBUFFER);
_cogl_framebuffer_init (COGL_FRAMEBUFFER (offscreen),
COGL_FRAMEBUFFER_TYPE_OFFSCREEN,
cogl_texture_get_width (texhandle),
cogl_texture_get_height (texhandle));
if (status != GL_FRAMEBUFFER_COMPLETE)
{
/* Still failing, so give up */
GE (glDeleteFramebuffers (1, &fbo_gl_handle));
GE (glBindFramebuffer (GL_FRAMEBUFFER, 0));
return COGL_INVALID_HANDLE;
}
return _cogl_offscreen_handle_new (offscreen);
}
else
{
g_free (offscreen);
/* XXX: This API should probably have been defined to take a GError */
g_warning ("%s: Failed to create an OpenGL framebuffer", G_STRLOC);
return COGL_INVALID_HANDLE;
}
offscreen = g_new0 (CoglOffscreen, 1);
_cogl_framebuffer_init (COGL_FRAMEBUFFER (offscreen),
COGL_FRAMEBUFFER_TYPE_OFFSCREEN,
width,
height);
offscreen->fbo_handle = fbo_gl_handle;
offscreen->gl_stencil_handle = gl_stencil_handle;
/* XXX: Can we get a away with removing this? It wasn't documented, and most
* users of the API are hopefully setting up the modelview from scratch
* anyway */
#if 0
cogl_matrix_translate (&framebuffer->modelview, -1.0f, -1.0f, 0.0f);
cogl_matrix_scale (&framebuffer->modelview,
2.0f / framebuffer->width, 2.0f / framebuffer->height, 1.0f);
#endif
return _cogl_offscreen_handle_new (offscreen);
}
static void
_cogl_offscreen_free (CoglOffscreen *offscreen)
{
GSList *l;
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
/* Chain up to parent */
_cogl_framebuffer_free (COGL_FRAMEBUFFER (offscreen));
if (offscreen->gl_stencil_handle)
GE (glDeleteRenderbuffers (1, &offscreen->gl_stencil_handle));
for (l = offscreen->renderbuffers; l; l = l->next)
{
GLuint renderbuffer = GPOINTER_TO_UINT (l->data);
GE (glDeleteRenderbuffers (1, &renderbuffer));
}
g_slist_free (offscreen->renderbuffers);
GE (glDeleteFramebuffers (1, &offscreen->fbo_handle));
if (offscreen->texture != COGL_INVALID_HANDLE)
cogl_handle_unref (offscreen->texture);
g_free (offscreen);
}

View File

@ -27,13 +27,6 @@
#include "cogl.h"
#include "cogl-matrix-stack.h"
typedef enum
{
COGL_MATRIX_MODELVIEW,
COGL_MATRIX_PROJECTION,
COGL_MATRIX_TEXTURE
} CoglMatrixMode;
typedef enum
{
COGL_FRONT_WINDING_CLOCKWISE,

View File

@ -33,6 +33,7 @@
#include "cogl-material-private.h"
#include "cogl-vertex-buffer-private.h"
#include "cogl-framebuffer-private.h"
#include "cogl-profile.h"
#include <string.h>
#include <gmodule.h>
@ -535,12 +536,19 @@ _cogl_journal_flush (void)
(cogl_get_features () & COGL_FEATURE_VBOS) ? FALSE : TRUE;
CoglHandle framebuffer;
CoglMatrixStack *modelview_stack;
COGL_STATIC_TIMER (flush_timer,
"Mainloop", /* parent */
"Journal Flush",
"The time spent flushing the Cogl journal",
0 /* no application private data */);
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
if (ctx->journal->len == 0)
return;
COGL_TIMER_START (_cogl_uprof_context, flush_timer);
if (G_UNLIKELY (cogl_debug_flags & COGL_DEBUG_BATCHING))
g_print ("BATCHING: journal len = %d\n", ctx->journal->len);
@ -608,6 +616,8 @@ _cogl_journal_flush (void)
g_array_set_size (ctx->journal, 0);
g_array_set_size (ctx->logged_vertices, 0);
COGL_TIMER_STOP (_cogl_uprof_context, flush_timer);
}
static void
@ -644,9 +654,16 @@ _cogl_journal_log_quad (float x_1,
int next_entry;
guint32 disable_layers;
CoglJournalEntry *entry;
COGL_STATIC_TIMER (log_timer,
"Mainloop", /* parent */
"Journal Log",
"The time spent logging in the Cogl journal",
0 /* no application private data */);
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
COGL_TIMER_START (_cogl_uprof_context, log_timer);
if (ctx->logged_vertices->len == 0)
_cogl_journal_init ();
@ -723,13 +740,13 @@ _cogl_journal_log_quad (float x_1,
next_vert + POS_STRIDE +
COLOR_STRIDE + TEX_STRIDE * i);
t[0] = tex_coords[0]; t[1] = tex_coords[1];
t[0] = tex_coords[i * 4 + 0]; t[1] = tex_coords[i * 4 + 1];
t += stride;
t[0] = tex_coords[0]; t[1] = tex_coords[3];
t[0] = tex_coords[i * 4 + 0]; t[1] = tex_coords[i * 4 + 3];
t += stride;
t[0] = tex_coords[2]; t[1] = tex_coords[3];
t[0] = tex_coords[i * 4 + 2]; t[1] = tex_coords[i * 4 + 3];
t += stride;
t[0] = tex_coords[2]; t[1] = tex_coords[1];
t[0] = tex_coords[i * 4 + 2]; t[1] = tex_coords[i * 4 + 1];
}
if (G_UNLIKELY (cogl_debug_flags & COGL_DEBUG_JOURNAL))
@ -765,5 +782,7 @@ _cogl_journal_log_quad (float x_1,
if (G_UNLIKELY (cogl_debug_flags & COGL_DEBUG_DISABLE_BATCHING
|| cogl_debug_flags & COGL_DEBUG_RECTANGLES))
_cogl_journal_flush ();
COGL_TIMER_STOP (_cogl_uprof_context, log_timer);
}

View File

@ -48,6 +48,12 @@
#include "../gles/cogl-gles2-wrapper.h"
#endif
#ifdef HAVE_COGL_GLES
#define COGL_MATERIAL_MAX_TEXTURE_UNITS GL_MAX_TEXTURE_UNITS
#else
#define COGL_MATERIAL_MAX_TEXTURE_UNITS GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
#endif
#ifdef HAVE_COGL_GL
#define glActiveTexture ctx->drv.pf_glActiveTexture
#define glClientActiveTexture ctx->drv.pf_glClientActiveTexture
@ -106,7 +112,7 @@ _cogl_material_init_default_material (void)
#ifndef HAVE_COGL_GLES
material->blend_equation_rgb = GL_FUNC_ADD;
material->blend_equation_alpha = GL_FUNC_ADD;
material->blend_src_factor_alpha = GL_SRC_ALPHA;
material->blend_src_factor_alpha = GL_ONE;
material->blend_dst_factor_alpha = GL_ONE_MINUS_SRC_ALPHA;
material->blend_constant[0] = 0;
material->blend_constant[1] = 0;
@ -822,7 +828,7 @@ cogl_material_set_layer (CoglHandle material_handle,
_cogl_material_pre_change_notify (material, FALSE, NULL);
material->n_layers = g_list_length (material->layers);
if (material->n_layers >= CGL_MAX_COMBINED_TEXTURE_IMAGE_UNITS)
if (material->n_layers >= COGL_MATERIAL_MAX_TEXTURE_UNITS)
{
if (!(material->flags & COGL_MATERIAL_FLAG_SHOWN_SAMPLER_WARNING))
{
@ -1534,7 +1540,7 @@ _cogl_material_flush_layers_gl_state (CoglMaterial *material,
layer->flags &= ~COGL_MATERIAL_LAYER_FLAG_DIRTY;
if ((i+1) >= CGL_MAX_COMBINED_TEXTURE_IMAGE_UNITS)
if ((i+1) >= COGL_MATERIAL_MAX_TEXTURE_UNITS)
break;
}

View File

@ -28,10 +28,15 @@
#define __COGL_MATRIX_STACK_H
#include "cogl-matrix.h"
#include "cogl.h" /* needed for GLenum */
typedef struct _CoglMatrixStack CoglMatrixStack;
typedef enum {
COGL_MATRIX_MODELVIEW,
COGL_MATRIX_PROJECTION,
COGL_MATRIX_TEXTURE
} CoglMatrixMode;
CoglMatrixStack* _cogl_matrix_stack_new (void);
void _cogl_matrix_stack_destroy (CoglMatrixStack *stack);
void _cogl_matrix_stack_push (CoglMatrixStack *stack);
@ -79,7 +84,7 @@ void _cogl_matrix_stack_get (CoglMatrixStack *stack,
void _cogl_matrix_stack_set (CoglMatrixStack *stack,
const CoglMatrix *matrix);
void _cogl_matrix_stack_flush_to_gl (CoglMatrixStack *stack,
GLenum gl_mode);
CoglMatrixMode mode);
void _cogl_matrix_stack_dirty (CoglMatrixStack *stack);
#endif /* __COGL_MATRIX_STACK_H */

View File

@ -61,7 +61,7 @@ typedef struct _TextureSlicedQuadState
typedef struct _TextureSlicedPolygonState
{
CoglTextureVertex *vertices;
const CoglTextureVertex *vertices;
int n_vertices;
int stride;
} TextureSlicedPolygonState;
@ -696,7 +696,7 @@ draw_polygon_sub_texture_cb (CoglHandle tex_handle,
/* handles 2d-sliced textures with > 1 slice */
static void
_cogl_texture_polygon_multiple_primitives (CoglTextureVertex *vertices,
_cogl_texture_polygon_multiple_primitives (const CoglTextureVertex *vertices,
unsigned int n_vertices,
unsigned int stride,
gboolean use_color)
@ -749,7 +749,7 @@ _cogl_texture_polygon_multiple_primitives (CoglTextureVertex *vertices,
}
static void
_cogl_multitexture_polygon_single_primitive (CoglTextureVertex *vertices,
_cogl_multitexture_polygon_single_primitive (const CoglTextureVertex *vertices,
guint n_vertices,
guint n_layers,
guint stride,
@ -828,14 +828,13 @@ _cogl_multitexture_polygon_single_primitive (CoglTextureVertex *vertices,
}
void
cogl_polygon (CoglTextureVertex *vertices,
guint n_vertices,
gboolean use_color)
cogl_polygon (const CoglTextureVertex *vertices,
guint n_vertices,
gboolean use_color)
{
CoglHandle material;
const GList *layers;
const GList *layers, *tmp;
int n_layers;
GList *tmp;
gboolean use_sliced_polygon_fallback = FALSE;
guint32 fallback_layers = 0;
int i;
@ -858,10 +857,10 @@ cogl_polygon (CoglTextureVertex *vertices,
layers = cogl_material_get_layers (ctx->source_material);
n_layers = g_list_length ((GList *)layers);
for (tmp = (GList *)layers, i = 0; tmp != NULL; tmp = tmp->next, i++)
for (tmp = layers, i = 0; tmp != NULL; tmp = tmp->next, i++)
{
CoglHandle layer = (CoglHandle)tmp->data;
CoglHandle tex_handle = cogl_material_layer_get_texture (layer);
CoglHandle layer = tmp->data;
CoglHandle tex_handle = cogl_material_layer_get_texture (layer);
/* COGL_INVALID_HANDLE textures will be handled in
* _cogl_material_flush_layers_gl_state */
@ -891,6 +890,7 @@ cogl_polygon (CoglTextureVertex *vertices,
warning_seen = TRUE;
}
}
use_sliced_polygon_fallback = TRUE;
n_layers = 1;
@ -902,7 +902,7 @@ cogl_polygon (CoglTextureVertex *vertices,
{
g_warning ("cogl_texture_polygon does not work for sliced textures "
"when the minification and magnification filters are not "
"CGL_NEAREST");
"COGL_MATERIAL_FILTER_NEAREST");
warning_seen = TRUE;
}
return;
@ -977,9 +977,10 @@ cogl_polygon (CoglTextureVertex *vertices,
/* NB: [X,Y,Z,TX,TY...,R,G,B,A,...] */
v + 3 + 2 * i));
}
prev_n_texcoord_arrays_enabled =
ctx->n_texcoord_arrays_enabled;
prev_n_texcoord_arrays_enabled = ctx->n_texcoord_arrays_enabled;
ctx->n_texcoord_arrays_enabled = n_layers;
for (; i < prev_n_texcoord_arrays_enabled; i++)
{
GE (glClientActiveTexture (GL_TEXTURE0 + i));

30
cogl/cogl-profile.c Normal file
View File

@ -0,0 +1,30 @@
#ifdef COGL_ENABLE_PROFILE
#include "cogl-profile.h"
#include <stdlib.h>
UProfContext *_cogl_uprof_context;
static void __attribute__ ((constructor))
cogl_uprof_constructor (void)
{
_cogl_uprof_context = uprof_context_new ("Cogl");
}
static void __attribute__ ((destructor))
cogl_uprof_destructor (void)
{
if (getenv ("COGL_PROFILE_OUTPUT_REPORT"))
{
UProfReport *report = uprof_report_new ("Cogl report");
uprof_report_add_context (report, _cogl_uprof_context);
uprof_report_print (report);
uprof_report_unref (report);
}
uprof_context_unref (_cogl_uprof_context);
}
#endif

54
cogl/cogl-profile.h Normal file
View File

@ -0,0 +1,54 @@
/*
* Cogl
*
* An object oriented GL/GLES Abstraction/Utility Layer
*
* Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __COGL_PROFILE_H__
#define __COGL_PROFILE_H__
#ifdef COGL_ENABLE_PROFILE
#include <uprof.h>
extern UProfContext *_cogl_uprof_context;
#define COGL_STATIC_TIMER UPROF_STATIC_TIMER
#define COGL_STATIC_COUNTER UPROF_STATIC_COUNTER
#define COGL_COUNTER_INC UPROF_COUNTER_INC
#define COGL_COUNTER_DEC UPROF_COUNTER_DEC
#define COGL_TIMER_START UPROF_TIMER_START
#define COGL_TIMER_STOP UPROF_TIMER_STOP
#else
#define COGL_STATIC_TIMER(A,B,C,D,E) extern void _cogl_dummy_decl (void)
#define COGL_STATIC_COUNTER(A,B,C,D) extern void _cogl_dummy_decl (void)
#define COGL_COUNTER_INC(A,B) G_STMT_START{ (void)0; }G_STMT_END
#define COGL_COUNTER_DEC(A,B) G_STMT_START{ (void)0; }G_STMT_END
#define COGL_TIMER_START(A,B) G_STMT_START{ (void)0; }G_STMT_END
#define COGL_TIMER_STOP(A,B) G_STMT_START{ (void)0; }G_STMT_END
#endif
#endif /* __COGL_PROFILE_H__ */

View File

@ -29,6 +29,7 @@
#define __COGL_SHADER_H__
#include <cogl/cogl-types.h>
#include <cogl/cogl-defines.h>
G_BEGIN_DECLS
@ -58,7 +59,7 @@ typedef enum {
/**
* cogl_create_shader:
* @shader_type: CGL_VERTEX_SHADER or CGL_FRAGMENT_SHADER.
* @shader_type: COGL_SHADER_TYPE_VERTEX or COGL_SHADER_TYPE_FRAGMENT.
*
* Create a new shader handle, use #cogl_shader_source to set the source code
* to be used on it.
@ -265,22 +266,22 @@ void cogl_program_uniform_1i (int uniform_no,
* @uniform_no: the uniform to set.
* @size: Size of float vector.
* @count: Size of array of uniforms.
* @value: the new value of the uniform.
* @value: (array length=count): the new value of the uniform.
*
* Changes the value of a float vector uniform, or uniform array in the
* currently used (see #cogl_program_use) shader program.
* currently used (see cogl_program_use()) shader program.
*/
void cogl_program_uniform_float (int uniform_no,
int size,
int count,
const GLfloat *value);
void cogl_program_uniform_float (int uniform_no,
int size,
int count,
const GLfloat *value);
/**
* cogl_program_uniform_int:
* @uniform_no: the uniform to set.
* @size: Size of int vector.
* @count: Size of array of uniforms.
* @value: the new value of the uniform.
* @value: (array length=count): the new value of the uniform.
*
* Changes the value of a int vector uniform, or uniform array in the
* currently used (see cogl_program_use()) shader program.
@ -296,7 +297,7 @@ void cogl_program_uniform_int (int uniform_no,
* @size: Size of matrix.
* @count: Size of array of uniforms.
* @transpose: Whether to transpose the matrix when setting the uniform.
* @value: the new value of the uniform.
* @value: (array length=count): the new value of the uniform.
*
* Changes the value of a matrix uniform, or uniform array in the
* currently used (see cogl_program_use()) shader program. The @size

View File

@ -504,8 +504,6 @@ cogl_texture_get_max_waste (CoglHandle handle)
tex = COGL_TEXTURE (handle);
return tex->vtable->get_max_waste (tex);
g_return_val_if_reached (0);
}
gboolean
@ -572,7 +570,7 @@ _cogl_texture_transform_coords_to_gl (CoglHandle handle,
{
CoglTexture *tex = COGL_TEXTURE (handle);
return tex->vtable->transform_coords_to_gl (tex, s, t);
tex->vtable->transform_coords_to_gl (tex, s, t);
}
GLenum
@ -610,7 +608,7 @@ _cogl_texture_set_filters (CoglHandle handle,
tex = COGL_TEXTURE (handle);
return tex->vtable->set_filters (tex, min_filter, mag_filter);
tex->vtable->set_filters (tex, min_filter, mag_filter);
}
void
@ -623,7 +621,7 @@ _cogl_texture_ensure_mipmaps (CoglHandle handle)
tex = COGL_TEXTURE (handle);
return tex->vtable->ensure_mipmaps (tex);
tex->vtable->ensure_mipmaps (tex);
}
gboolean

View File

@ -29,6 +29,7 @@
#define __COGL_TEXTURE_H__
#include <cogl/cogl-types.h>
#include <cogl/cogl-defines.h>
G_BEGIN_DECLS
@ -487,15 +488,16 @@ void cogl_rectangles (const float *verts,
* All of the texture coordinates must be in the range [0,1] and repeating the
* texture is not supported.
*
* Because of the way this function is implemented it will currently only work
* if either the texture is not sliced or the backend is not OpenGL ES and the
* minifying and magnifying functions are both set to CGL_NEAREST.
* Because of the way this function is implemented it will currently
* only work if either the texture is not sliced or the backend is not
* OpenGL ES and the minifying and magnifying functions are both set
* to COGL_MATERIAL_FILTER_NEAREST.
*
* Since: 1.0
*/
void cogl_polygon (CoglTextureVertex *vertices,
guint n_vertices,
gboolean use_color);
void cogl_polygon (const CoglTextureVertex *vertices,
guint n_vertices,
gboolean use_color);
G_END_DECLS

View File

@ -29,661 +29,6 @@
G_BEGIN_DECLS
/* FIXME + DOCUMENT */
#define COPENSTEP OPENSTEP
#define CGLAPI GLAPI
#define CGLAPI GLAPI
#define CGLAPI GLAPI
#define CGLAPIENTRY GLAPIENTRY
#define CGLAPI GLAPI
#define CGLAPIENTRY GLAPIENTRY
#define CGLAPI GLAPI
#define CGLAPIENTRY GLAPIENTRY
#define CPRAGMA_EXPORT_SUPPORTED PRAGMA_EXPORT_SUPPORTED
#define CGLAPI GLAPI
#define CGLAPIENTRY GLAPIENTRY
#define CAPIENTRY APIENTRY
#define CAPIENTRYP APIENTRYP
#define CGLAPIENTRYP GLAPIENTRYP
#define CGL_FALSE GL_FALSE
#define CGL_TRUE GL_TRUE
#define CGL_BYTE GL_BYTE
#define CGL_UNSIGNED_BYTE GL_UNSIGNED_BYTE
#define CGL_SHORT GL_SHORT
#define CGL_UNSIGNED_SHORT GL_UNSIGNED_SHORT
#define CGL_INT GL_INT
#define CGL_UNSIGNED_INT GL_UNSIGNED_INT
#define CGL_FLOAT GL_FLOAT
#define CGL_DOUBLE GL_DOUBLE
#define CGL_POINTS GL_POINTS
#define CGL_LINES GL_LINES
#define CGL_LINE_LOOP GL_LINE_LOOP
#define CGL_LINE_STRIP GL_LINE_STRIP
#define CGL_TRIANGLES GL_TRIANGLES
#define CGL_TRIANGLE_STRIP GL_TRIANGLE_STRIP
#define CGL_TRIANGLE_FAN GL_TRIANGLE_FAN
#define CGL_QUADS GL_QUADS
#define CGL_QUAD_STRIP GL_QUAD_STRIP
#define CGL_POLYGON GL_POLYGON
#define CGL_VERTEX_ARRAY GL_VERTEX_ARRAY
#define CGL_NORMAL_ARRAY GL_NORMAL_ARRAY
#define CGL_COLOR_ARRAY GL_COLOR_ARRAY
#define CGL_INDEX_ARRAY GL_INDEX_ARRAY
#define CGL_TEXTURE_COORD_ARRAY GL_TEXTURE_COORD_ARRAY
#define CGL_EDGE_FLAG_ARRAY GL_EDGE_FLAG_ARRAY
#define CGL_VERTEX_ARRAY_SIZE GL_VERTEX_ARRAY_SIZE
#define CGL_VERTEX_ARRAY_TYPE GL_VERTEX_ARRAY_TYPE
#define CGL_VERTEX_ARRAY_STRIDE GL_VERTEX_ARRAY_STRIDE
#define CGL_NORMAL_ARRAY_TYPE GL_NORMAL_ARRAY_TYPE
#define CGL_NORMAL_ARRAY_STRIDE GL_NORMAL_ARRAY_STRIDE
#define CGL_COLOR_ARRAY_SIZE GL_COLOR_ARRAY_SIZE
#define CGL_COLOR_ARRAY_TYPE GL_COLOR_ARRAY_TYPE
#define CGL_COLOR_ARRAY_STRIDE GL_COLOR_ARRAY_STRIDE
#define CGL_INDEX_ARRAY_TYPE GL_INDEX_ARRAY_TYPE
#define CGL_INDEX_ARRAY_STRIDE GL_INDEX_ARRAY_STRIDE
#define CGL_TEXTURE_COORD_ARRAY_SIZE GL_TEXTURE_COORD_ARRAY_SIZE
#define CGL_TEXTURE_COORD_ARRAY_TYPE GL_TEXTURE_COORD_ARRAY_TYPE
#define CGL_TEXTURE_COORD_ARRAY_STRIDE GL_TEXTURE_COORD_ARRAY_STRIDE
#define CGL_EDGE_FLAG_ARRAY_STRIDE GL_EDGE_FLAG_ARRAY_STRIDE
#define CGL_VERTEX_ARRAY_POINTER GL_VERTEX_ARRAY_POINTER
#define CGL_NORMAL_ARRAY_POINTER GL_NORMAL_ARRAY_POINTER
#define CGL_COLOR_ARRAY_POINTER GL_COLOR_ARRAY_POINTER
#define CGL_INDEX_ARRAY_POINTER GL_INDEX_ARRAY_POINTER
#define CGL_TEXTURE_COORD_ARRAY_POINTER GL_TEXTURE_COORD_ARRAY_POINTER
#define CGL_EDGE_FLAG_ARRAY_POINTER GL_EDGE_FLAG_ARRAY_POINTER
#define CGL_MATRIX_MODE GL_MATRIX_MODE
#define CGL_MODELVIEW GL_MODELVIEW
#define CGL_PROJECTION GL_PROJECTION
#define CGL_TEXTURE GL_TEXTURE
#define CGL_POINT_SMOOTH GL_POINT_SMOOTH
#define CGL_POINT_SIZE GL_POINT_SIZE
#define CGL_POINT_SIZE_GRANULARITY GL_POINT_SIZE_GRANULARITY
#define CGL_POINT_SIZE_RANGE GL_POINT_SIZE_RANGE
#define CGL_LINE_SMOOTH GL_LINE_SMOOTH
#define CGL_LINE_STIPPLE GL_LINE_STIPPLE
#define CGL_LINE_STIPPLE_PATTERN GL_LINE_STIPPLE_PATTERN
#define CGL_LINE_STIPPLE_REPEAT GL_LINE_STIPPLE_REPEAT
#define CGL_LINE_WIDTH GL_LINE_WIDTH
#define CGL_LINE_WIDTH_GRANULARITY GL_LINE_WIDTH_GRANULARITY
#define CGL_LINE_WIDTH_RANGE GL_LINE_WIDTH_RANGE
#define CGL_POINT GL_POINT
#define CGL_LINE GL_LINE
#define CGL_FILL GL_FILL
#define CGL_CW GL_CW
#define CGL_CCW GL_CCW
#define CGL_FRONT GL_FRONT
#define CGL_BACK GL_BACK
#define CGL_POLYGON_MODE GL_POLYGON_MODE
#define CGL_POLYGON_SMOOTH GL_POLYGON_SMOOTH
#define CGL_POLYGON_STIPPLE GL_POLYGON_STIPPLE
#define CGL_EDGE_FLAG GL_EDGE_FLAG
#define CGL_CULL_FACE GL_CULL_FACE
#define CGL_CULL_FACE_MODE GL_CULL_FACE_MODE
#define CGL_FRONT_FACE GL_FRONT_FACE
#define CGL_POLYGON_OFFSET_FACTOR GL_POLYGON_OFFSET_FACTOR
#define CGL_POLYGON_OFFSET_UNITS GL_POLYGON_OFFSET_UNITS
#define CGL_POLYGON_OFFSET_POINT GL_POLYGON_OFFSET_POINT
#define CGL_POLYGON_OFFSET_LINE GL_POLYGON_OFFSET_LINE
#define CGL_POLYGON_OFFSET_FILL GL_POLYGON_OFFSET_FILL
#define CGL_COMPILE GL_COMPILE
#define CGL_COMPILE_AND_EXECUTE GL_COMPILE_AND_EXECUTE
#define CGL_LIST_BASE GL_LIST_BASE
#define CGL_LIST_INDEX GL_LIST_INDEX
#define CGL_LIST_MODE GL_LIST_MODE
#define CGL_NEVER GL_NEVER
#define CGL_LESS GL_LESS
#define CGL_EQUAL GL_EQUAL
#define CGL_LEQUAL GL_LEQUAL
#define CGL_GREATER GL_GREATER
#define CGL_NOTEQUAL GL_NOTEQUAL
#define CGL_GEQUAL GL_GEQUAL
#define CGL_ALWAYS GL_ALWAYS
#define CGL_DEPTH_TEST GL_DEPTH_TEST
#define CGL_DEPTH_BITS GL_DEPTH_BITS
#define CGL_DEPTH_CLEAR_VALUE GL_DEPTH_CLEAR_VALUE
#define CGL_DEPTH_FUNC GL_DEPTH_FUNC
#define CGL_DEPTH_RANGE GL_DEPTH_RANGE
#define CGL_DEPTH_WRITEMASK GL_DEPTH_WRITEMASK
#define CGL_DEPTH_COMPONENT GL_DEPTH_COMPONENT
#define CGL_LIGHTING GL_LIGHTING
#define CGL_SPOT_EXPONENT GL_SPOT_EXPONENT
#define CGL_SPOT_CUTOFF GL_SPOT_CUTOFF
#define CGL_CONSTANT_ATTENUATION GL_CONSTANT_ATTENUATION
#define CGL_LINEAR_ATTENUATION GL_LINEAR_ATTENUATION
#define CGL_QUADRATIC_ATTENUATION GL_QUADRATIC_ATTENUATION
#define CGL_AMBIENT GL_AMBIENT
#define CGL_DIFFUSE GL_DIFFUSE
#define CGL_SPECULAR GL_SPECULAR
#define CGL_SHININESS GL_SHININESS
#define CGL_EMISSION GL_EMISSION
#define CGL_POSITION GL_POSITION
#define CGL_SPOT_DIRECTION GL_SPOT_DIRECTION
#define CGL_AMBIENT_AND_DIFFUSE GL_AMBIENT_AND_DIFFUSE
#define CGL_COLOR_INDEXES GL_COLOR_INDEXES
#define CGL_LIGHT_MODEL_TWO_SIDE GL_LIGHT_MODEL_TWO_SIDE
#define CGL_LIGHT_MODEL_LOCAL_VIEWER GL_LIGHT_MODEL_LOCAL_VIEWER
#define CGL_LIGHT_MODEL_AMBIENT GL_LIGHT_MODEL_AMBIENT
#define CGL_FRONT_AND_BACK GL_FRONT_AND_BACK
#define CGL_SHADE_MODEL GL_SHADE_MODEL
#define CGL_FLAT GL_FLAT
#define CGL_SMOOTH GL_SMOOTH
#define CGL_COLOR_MATERIAL GL_COLOR_MATERIAL
#define CGL_COLOR_MATERIAL_FACE GL_COLOR_MATERIAL_FACE
#define CGL_COLOR_MATERIAL_PARAMETER GL_COLOR_MATERIAL_PARAMETER
#define CGL_NORMALIZE GL_NORMALIZE
#define CGL_ACCUM_RED_BITS GL_ACCUM_RED_BITS
#define CGL_ACCUM_GREEN_BITS GL_ACCUM_GREEN_BITS
#define CGL_ACCUM_BLUE_BITS GL_ACCUM_BLUE_BITS
#define CGL_ACCUM_ALPHA_BITS GL_ACCUM_ALPHA_BITS
#define CGL_ACCUM_CLEAR_VALUE GL_ACCUM_CLEAR_VALUE
#define CGL_ACCUM GL_ACCUM
#define CGL_ADD GL_ADD
#define CGL_LOAD GL_LOAD
#define CGL_MULT GL_MULT
#define CGL_RETURN GL_RETURN
#define CGL_ALPHA_TEST GL_ALPHA_TEST
#define CGL_ALPHA_TEST_REF GL_ALPHA_TEST_REF
#define CGL_ALPHA_TEST_FUNC GL_ALPHA_TEST_FUNC
#define CGL_BLEND GL_BLEND
#define CGL_BLEND_SRC GL_BLEND_SRC
#define CGL_BLEND_DST GL_BLEND_DST
#define CGL_ZERO GL_ZERO
#define CGL_ONE GL_ONE
#define CGL_SRC_COLOR GL_SRC_COLOR
#define CGL_ONE_MINUS_SRC_COLOR GL_ONE_MINUS_SRC_COLOR
#define CGL_SRC_ALPHA GL_SRC_ALPHA
#define CGL_ONE_MINUS_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
#define CGL_DST_ALPHA GL_DST_ALPHA
#define CGL_ONE_MINUS_DST_ALPHA GL_ONE_MINUS_DST_ALPHA
#define CGL_DST_COLOR GL_DST_COLOR
#define CGL_ONE_MINUS_DST_COLOR GL_ONE_MINUS_DST_COLOR
#define CGL_SRC_ALPHA_SATURATE GL_SRC_ALPHA_SATURATE
#define CGL_FEEDBACK GL_FEEDBACK
#define CGL_RENDER GL_RENDER
#define CGL_SELECT GL_SELECT
#define CGL_POINT_TOKEN GL_POINT_TOKEN
#define CGL_LINE_TOKEN GL_LINE_TOKEN
#define CGL_LINE_RESET_TOKEN GL_LINE_RESET_TOKEN
#define CGL_POLYGON_TOKEN GL_POLYGON_TOKEN
#define CGL_BITMAP_TOKEN GL_BITMAP_TOKEN
#define CGL_DRAW_PIXEL_TOKEN GL_DRAW_PIXEL_TOKEN
#define CGL_COPY_PIXEL_TOKEN GL_COPY_PIXEL_TOKEN
#define CGL_PASS_THROUGH_TOKEN GL_PASS_THROUGH_TOKEN
#define CGL_FEEDBACK_BUFFER_POINTER GL_FEEDBACK_BUFFER_POINTER
#define CGL_FEEDBACK_BUFFER_SIZE GL_FEEDBACK_BUFFER_SIZE
#define CGL_FEEDBACK_BUFFER_TYPE GL_FEEDBACK_BUFFER_TYPE
#define CGL_SELECTION_BUFFER_POINTER GL_SELECTION_BUFFER_POINTER
#define CGL_SELECTION_BUFFER_SIZE GL_SELECTION_BUFFER_SIZE
#define CGL_FOG GL_FOG
#define CGL_FOG_MODE GL_FOG_MODE
#define CGL_FOG_DENSITY GL_FOG_DENSITY
#define CGL_FOG_COLOR GL_FOG_COLOR
#define CGL_FOG_INDEX GL_FOG_INDEX
#define CGL_FOG_START GL_FOG_START
#define CGL_FOG_END GL_FOG_END
#define CGL_EXP GL_EXP
#define CGL_LOGIC_OP GL_LOGIC_OP
#define CGL_INDEX_LOGIC_OP GL_INDEX_LOGIC_OP
#define CGL_COLOR_LOGIC_OP GL_COLOR_LOGIC_OP
#define CGL_LOGIC_OP_MODE GL_LOGIC_OP_MODE
#define CGL_CLEAR GL_CLEAR
#define CGL_SET GL_SET
#define CGL_COPY GL_COPY
#define CGL_COPY_INVERTED GL_COPY_INVERTED
#define CGL_NOOP GL_NOOP
#define CGL_INVERT GL_INVERT
#define CGL_AND GL_AND
#define CGL_NAND GL_NAND
#define CGL_OR GL_OR
#define CGL_NOR GL_NOR
#define CGL_XOR GL_XOR
#define CGL_EQUIV GL_EQUIV
#define CGL_AND_REVERSE GL_AND_REVERSE
#define CGL_AND_INVERTED GL_AND_INVERTED
#define CGL_OR_REVERSE GL_OR_REVERSE
#define CGL_OR_INVERTED GL_OR_INVERTED
#define CGL_STENCIL_BITS GL_STENCIL_BITS
#define CGL_STENCIL_TEST GL_STENCIL_TEST
#define CGL_STENCIL_CLEAR_VALUE GL_STENCIL_CLEAR_VALUE
#define CGL_STENCIL_FUNC GL_STENCIL_FUNC
#define CGL_STENCIL_VALUE_MASK GL_STENCIL_VALUE_MASK
#define CGL_STENCIL_FAIL GL_STENCIL_FAIL
#define CGL_STENCIL_PASS_DEPTH_FAIL GL_STENCIL_PASS_DEPTH_FAIL
#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
#define CGL_STENCIL_INDEX GL_STENCIL_INDEX
#define CGL_KEEP GL_KEEP
#define CGL_REPLACE GL_REPLACE
#define CGL_INCR GL_INCR
#define CGL_DECR GL_DECR
#define CGL_NONE GL_NONE
#define CGL_LEFT GL_LEFT
#define CGL_RIGHT GL_RIGHT
#define CGL_FRONT_LEFT GL_FRONT_LEFT
#define CGL_FRONT_RIGHT GL_FRONT_RIGHT
#define CGL_BACK_LEFT GL_BACK_LEFT
#define CGL_BACK_RIGHT GL_BACK_RIGHT
#define CGL_COLOR_INDEX GL_COLOR_INDEX
#define CGL_RED GL_RED
#define CGL_GREEN GL_GREEN
#define CGL_BLUE GL_BLUE
#define CGL_ALPHA GL_ALPHA
#define CGL_LUMINANCE GL_LUMINANCE
#define CGL_LUMINANCE_ALPHA GL_LUMINANCE_ALPHA
#define CGL_ALPHA_BITS GL_ALPHA_BITS
#define CGL_RED_BITS GL_RED_BITS
#define CGL_GREEN_BITS GL_GREEN_BITS
#define CGL_BLUE_BITS GL_BLUE_BITS
#define CGL_INDEX_BITS GL_INDEX_BITS
#define CGL_SUBPIXEL_BITS GL_SUBPIXEL_BITS
#define CGL_AUX_BUFFERS GL_AUX_BUFFERS
#define CGL_READ_BUFFER GL_READ_BUFFER
#define CGL_DRAW_BUFFER GL_DRAW_BUFFER
#define CGL_DOUBLEBUFFER GL_DOUBLEBUFFER
#define CGL_STEREO GL_STEREO
#define CGL_BITMAP GL_BITMAP
#define CGL_COLOR GL_COLOR
#define CGL_DEPTH GL_DEPTH
#define CGL_STENCIL GL_STENCIL
#define CGL_DITHER GL_DITHER
#define CGL_RGB GL_RGB
#define CGL_RGBA GL_RGBA
#define CGL_MAX_LIST_NESTING GL_MAX_LIST_NESTING
#define CGL_MAX_EVAL_ORDER GL_MAX_EVAL_ORDER
#define CGL_MAX_LIGHTS GL_MAX_LIGHTS
#define CGL_MAX_CLIP_PLANES GL_MAX_CLIP_PLANES
#define CGL_MAX_TEXTURE_SIZE GL_MAX_TEXTURE_SIZE
#define CGL_MAX_PIXEL_MAP_TABLE GL_MAX_PIXEL_MAP_TABLE
#define CGL_MAX_ATTRIB_STACK_DEPTH GL_MAX_ATTRIB_STACK_DEPTH
#define CGL_MAX_MODELVIEW_STACK_DEPTH GL_MAX_MODELVIEW_STACK_DEPTH
#define CGL_MAX_NAME_STACK_DEPTH GL_MAX_NAME_STACK_DEPTH
#define CGL_MAX_PROJECTION_STACK_DEPTH GL_MAX_PROJECTION_STACK_DEPTH
#define CGL_MAX_TEXTURE_STACK_DEPTH GL_MAX_TEXTURE_STACK_DEPTH
#define CGL_MAX_VIEWPORT_DIMS GL_MAX_VIEWPORT_DIMS
#define CGL_MAX_CLIENT_ATTRIB_STACK_DEPTH GL_MAX_CLIENT_ATTRIB_STACK_DEPTH
#define CGL_MAX_COMBINED_TEXTURE_IMAGE_UNITS GL_MAX_TEXTURE_UNITS
#define CGL_ATTRIB_STACK_DEPTH GL_ATTRIB_STACK_DEPTH
#define CGL_CLIENT_ATTRIB_STACK_DEPTH GL_CLIENT_ATTRIB_STACK_DEPTH
#define CGL_COLOR_CLEAR_VALUE GL_COLOR_CLEAR_VALUE
#define CGL_COLOR_WRITEMASK GL_COLOR_WRITEMASK
#define CGL_CURRENT_INDEX GL_CURRENT_INDEX
#define CGL_CURRENT_COLOR GL_CURRENT_COLOR
#define CGL_CURRENT_NORMAL GL_CURRENT_NORMAL
#define CGL_CURRENT_RASTER_COLOR GL_CURRENT_RASTER_COLOR
#define CGL_CURRENT_RASTER_DISTANCE GL_CURRENT_RASTER_DISTANCE
#define CGL_CURRENT_RASTER_INDEX GL_CURRENT_RASTER_INDEX
#define CGL_CURRENT_RASTER_POSITION GL_CURRENT_RASTER_POSITION
#define CGL_CURRENT_RASTER_TEXTURE_COORDS GL_CURRENT_RASTER_TEXTURE_COORDS
#define CGL_CURRENT_RASTER_POSITION_VALID GL_CURRENT_RASTER_POSITION_VALID
#define CGL_CURRENT_TEXTURE_COORDS GL_CURRENT_TEXTURE_COORDS
#define CGL_INDEX_CLEAR_VALUE GL_INDEX_CLEAR_VALUE
#define CGL_INDEX_MODE GL_INDEX_MODE
#define CGL_INDEX_WRITEMASK GL_INDEX_WRITEMASK
#define CGL_MODELVIEW_MATRIX GL_MODELVIEW_MATRIX
#define CGL_MODELVIEW_STACK_DEPTH GL_MODELVIEW_STACK_DEPTH
#define CGL_NAME_STACK_DEPTH GL_NAME_STACK_DEPTH
#define CGL_PROJECTION_MATRIX GL_PROJECTION_MATRIX
#define CGL_PROJECTION_STACK_DEPTH GL_PROJECTION_STACK_DEPTH
#define CGL_RENDER_MODE GL_RENDER_MODE
#define CGL_RGBA_MODE GL_RGBA_MODE
#define CGL_TEXTURE_MATRIX GL_TEXTURE_MATRIX
#define CGL_TEXTURE_STACK_DEPTH GL_TEXTURE_STACK_DEPTH
#define CGL_VIEWPORT GL_VIEWPORT
#define CGL_AUTO_NORMAL GL_AUTO_NORMAL
#define CGL_COEFF GL_COEFF
#define CGL_ORDER GL_ORDER
#define CGL_DOMAIN GL_DOMAIN
#define CGL_PERSPECTIVE_CORRECTION_HINT GL_PERSPECTIVE_CORRECTION_HINT
#define CGL_POINT_SMOOTH_HINT GL_POINT_SMOOTH_HINT
#define CGL_LINE_SMOOTH_HINT GL_LINE_SMOOTH_HINT
#define CGL_POLYGON_SMOOTH_HINT GL_POLYGON_SMOOTH_HINT
#define CGL_FOG_HINT GL_FOG_HINT
#define CGL_DONT_CARE GL_DONT_CARE
#define CGL_FASTEST GL_FASTEST
#define CGL_NICEST GL_NICEST
#define CGL_SCISSOR_BOX GL_SCISSOR_BOX
#define CGL_SCISSOR_TEST GL_SCISSOR_TEST
#define CGL_MAP_COLOR GL_MAP_COLOR
#define CGL_MAP_STENCIL GL_MAP_STENCIL
#define CGL_INDEX_SHIFT GL_INDEX_SHIFT
#define CGL_INDEX_OFFSET GL_INDEX_OFFSET
#define CGL_RED_SCALE GL_RED_SCALE
#define CGL_RED_BIAS GL_RED_BIAS
#define CGL_GREEN_SCALE GL_GREEN_SCALE
#define CGL_GREEN_BIAS GL_GREEN_BIAS
#define CGL_BLUE_SCALE GL_BLUE_SCALE
#define CGL_BLUE_BIAS GL_BLUE_BIAS
#define CGL_ALPHA_SCALE GL_ALPHA_SCALE
#define CGL_ALPHA_BIAS GL_ALPHA_BIAS
#define CGL_DEPTH_SCALE GL_DEPTH_SCALE
#define CGL_DEPTH_BIAS GL_DEPTH_BIAS
#define CGL_PIXEL_MAP_S_TO_S_SIZE GL_PIXEL_MAP_S_TO_S_SIZE
#define CGL_PIXEL_MAP_I_TO_I_SIZE GL_PIXEL_MAP_I_TO_I_SIZE
#define CGL_PIXEL_MAP_I_TO_R_SIZE GL_PIXEL_MAP_I_TO_R_SIZE
#define CGL_PIXEL_MAP_I_TO_G_SIZE GL_PIXEL_MAP_I_TO_G_SIZE
#define CGL_PIXEL_MAP_I_TO_B_SIZE GL_PIXEL_MAP_I_TO_B_SIZE
#define CGL_PIXEL_MAP_I_TO_A_SIZE GL_PIXEL_MAP_I_TO_A_SIZE
#define CGL_PIXEL_MAP_R_TO_R_SIZE GL_PIXEL_MAP_R_TO_R_SIZE
#define CGL_PIXEL_MAP_G_TO_G_SIZE GL_PIXEL_MAP_G_TO_G_SIZE
#define CGL_PIXEL_MAP_B_TO_B_SIZE GL_PIXEL_MAP_B_TO_B_SIZE
#define CGL_PIXEL_MAP_A_TO_A_SIZE GL_PIXEL_MAP_A_TO_A_SIZE
#define CGL_PIXEL_MAP_S_TO_S GL_PIXEL_MAP_S_TO_S
#define CGL_PIXEL_MAP_I_TO_I GL_PIXEL_MAP_I_TO_I
#define CGL_PIXEL_MAP_I_TO_R GL_PIXEL_MAP_I_TO_R
#define CGL_PIXEL_MAP_I_TO_G GL_PIXEL_MAP_I_TO_G
#define CGL_PIXEL_MAP_I_TO_B GL_PIXEL_MAP_I_TO_B
#define CGL_PIXEL_MAP_I_TO_A GL_PIXEL_MAP_I_TO_A
#define CGL_PIXEL_MAP_R_TO_R GL_PIXEL_MAP_R_TO_R
#define CGL_PIXEL_MAP_G_TO_G GL_PIXEL_MAP_G_TO_G
#define CGL_PIXEL_MAP_B_TO_B GL_PIXEL_MAP_B_TO_B
#define CGL_PIXEL_MAP_A_TO_A GL_PIXEL_MAP_A_TO_A
#define CGL_PACK_ALIGNMENT GL_PACK_ALIGNMENT
#define CGL_PACK_LSB_FIRST GL_PACK_LSB_FIRST
#define CGL_PACK_ROW_LENGTH GL_PACK_ROW_LENGTH
#define CGL_PACK_SKIP_PIXELS GL_PACK_SKIP_PIXELS
#define CGL_PACK_SKIP_ROWS GL_PACK_SKIP_ROWS
#define CGL_PACK_SWAP_BYTES GL_PACK_SWAP_BYTES
#define CGL_UNPACK_ALIGNMENT GL_UNPACK_ALIGNMENT
#define CGL_UNPACK_LSB_FIRST GL_UNPACK_LSB_FIRST
#define CGL_UNPACK_ROW_LENGTH GL_UNPACK_ROW_LENGTH
#define CGL_UNPACK_SKIP_PIXELS GL_UNPACK_SKIP_PIXELS
#define CGL_UNPACK_SKIP_ROWS GL_UNPACK_SKIP_ROWS
#define CGL_UNPACK_SWAP_BYTES GL_UNPACK_SWAP_BYTES
#define CGL_ZOOM_X GL_ZOOM_X
#define CGL_ZOOM_Y GL_ZOOM_Y
#define CGL_TEXTURE_ENV GL_TEXTURE_ENV
#define CGL_TEXTURE_ENV_MODE GL_TEXTURE_ENV_MODE
#define CGL_TEXTURE_WRAP_S GL_TEXTURE_WRAP_S
#define CGL_TEXTURE_WRAP_T GL_TEXTURE_WRAP_T
#define CGL_TEXTURE_MAG_FILTER GL_TEXTURE_MAG_FILTER
#define CGL_TEXTURE_MIN_FILTER GL_TEXTURE_MIN_FILTER
#define CGL_TEXTURE_ENV_COLOR GL_TEXTURE_ENV_COLOR
#define CGL_TEXTURE_GEN_S GL_TEXTURE_GEN_S
#define CGL_TEXTURE_GEN_T GL_TEXTURE_GEN_T
#define CGL_TEXTURE_GEN_MODE GL_TEXTURE_GEN_MODE
#define CGL_TEXTURE_BORDER_COLOR GL_TEXTURE_BORDER_COLOR
#define CGL_TEXTURE_WIDTH GL_TEXTURE_WIDTH
#define CGL_TEXTURE_HEIGHT GL_TEXTURE_HEIGHT
#define CGL_TEXTURE_BORDER GL_TEXTURE_BORDER
#define CGL_TEXTURE_COMPONENTS GL_TEXTURE_COMPONENTS
#define CGL_TEXTURE_RED_SIZE GL_TEXTURE_RED_SIZE
#define CGL_TEXTURE_GREEN_SIZE GL_TEXTURE_GREEN_SIZE
#define CGL_TEXTURE_BLUE_SIZE GL_TEXTURE_BLUE_SIZE
#define CGL_TEXTURE_ALPHA_SIZE GL_TEXTURE_ALPHA_SIZE
#define CGL_TEXTURE_LUMINANCE_SIZE GL_TEXTURE_LUMINANCE_SIZE
#define CGL_TEXTURE_INTENSITY_SIZE GL_TEXTURE_INTENSITY_SIZE
#define CGL_OBJECT_LINEAR GL_OBJECT_LINEAR
#define CGL_OBJECT_PLANE GL_OBJECT_PLANE
#define CGL_EYE_LINEAR GL_EYE_LINEAR
#define CGL_EYE_PLANE GL_EYE_PLANE
#define CGL_SPHERE_MAP GL_SPHERE_MAP
#define CGL_DECAL GL_DECAL
#define CGL_MODULATE GL_MODULATE
#define CGL_REPEAT GL_REPEAT
#define CGL_CLAMP GL_CLAMP
#define CGL_S GL_S
#define CGL_T GL_T
#define CGL_R GL_R
#define CGL_Q GL_Q
#define CGL_TEXTURE_GEN_R GL_TEXTURE_GEN_R
#define CGL_TEXTURE_GEN_Q GL_TEXTURE_GEN_Q
#define CGL_VENDOR GL_VENDOR
#define CGL_RENDERER GL_RENDERER
#define CGL_VERSION GL_VERSION
#define CGL_EXTENSIONS GL_EXTENSIONS
#define CGL_NO_ERROR GL_NO_ERROR
#define CGL_INVALID_ENUM GL_INVALID_ENUM
#define CGL_INVALID_VALUE GL_INVALID_VALUE
#define CGL_INVALID_OPERATION GL_INVALID_OPERATION
#define CGL_STACK_OVERFLOW GL_STACK_OVERFLOW
#define CGL_STACK_UNDERFLOW GL_STACK_UNDERFLOW
#define CGL_OUT_OF_MEMORY GL_OUT_OF_MEMORY
#define CGL_CURRENT_BIT GL_CURRENT_BIT
#define CGL_POINT_BIT GL_POINT_BIT
#define CGL_LINE_BIT GL_LINE_BIT
#define CGL_POLYGON_BIT GL_POLYGON_BIT
#define CGL_POLYGON_STIPPLE_BIT GL_POLYGON_STIPPLE_BIT
#define CGL_PIXEL_MODE_BIT GL_PIXEL_MODE_BIT
#define CGL_LIGHTING_BIT GL_LIGHTING_BIT
#define CGL_FOG_BIT GL_FOG_BIT
#define CGL_DEPTH_BUFFER_BIT GL_DEPTH_BUFFER_BIT
#define CGL_ACCUM_BUFFER_BIT GL_ACCUM_BUFFER_BIT
#define CGL_STENCIL_BUFFER_BIT GL_STENCIL_BUFFER_BIT
#define CGL_VIEWPORT_BIT GL_VIEWPORT_BIT
#define CGL_TRANSFORM_BIT GL_TRANSFORM_BIT
#define CGL_ENABLE_BIT GL_ENABLE_BIT
#define CGL_COLOR_BUFFER_BIT GL_COLOR_BUFFER_BIT
#define CGL_HINT_BIT GL_HINT_BIT
#define CGL_EVAL_BIT GL_EVAL_BIT
#define CGL_LIST_BIT GL_LIST_BIT
#define CGL_TEXTURE_BIT GL_TEXTURE_BIT
#define CGL_SCISSOR_BIT GL_SCISSOR_BIT
#define CGL_ALL_ATTRIB_BITS GL_ALL_ATTRIB_BITS
#define CGL_TEXTURE_PRIORITY GL_TEXTURE_PRIORITY
#define CGL_TEXTURE_RESIDENT GL_TEXTURE_RESIDENT
#define CGL_TEXTURE_INTERNAL_FORMAT GL_TEXTURE_INTERNAL_FORMAT
#define CGL_INTENSITY GL_INTENSITY
#define CGL_CLIENT_PIXEL_STORE_BIT GL_CLIENT_PIXEL_STORE_BIT
#define CGL_CLIENT_VERTEX_ARRAY_BIT GL_CLIENT_VERTEX_ARRAY_BIT
#define CGL_ALL_CLIENT_ATTRIB_BITS GL_ALL_CLIENT_ATTRIB_BITS
#define CGL_CLIENT_ALL_ATTRIB_BITS GL_CLIENT_ALL_ATTRIB_BITS
#define CGL_RESCALE_NORMAL GL_RESCALE_NORMAL
#define CGL_CLAMP_TO_EDGE GL_CLAMP_TO_EDGE
#define CGL_MAX_ELEMENTS_VERTICES GL_MAX_ELEMENTS_VERTICES
#define CGL_MAX_ELEMENTS_INDICES GL_MAX_ELEMENTS_INDICES
#define CGL_BGR GL_BGR
#define CGL_BGRA GL_BGRA
#define CGL_LIGHT_MODEL_COLOR_CONTROL GL_LIGHT_MODEL_COLOR_CONTROL
#define CGL_SINGLE_COLOR GL_SINGLE_COLOR
#define CGL_SEPARATE_SPECULAR_COLOR GL_SEPARATE_SPECULAR_COLOR
#define CGL_TEXTURE_MIN_LOD GL_TEXTURE_MIN_LOD
#define CGL_TEXTURE_MAX_LOD GL_TEXTURE_MAX_LOD
#define CGL_TEXTURE_BASE_LEVEL GL_TEXTURE_BASE_LEVEL
#define CGL_TEXTURE_MAX_LEVEL GL_TEXTURE_MAX_LEVEL
#define CGL_SMOOTH_POINT_SIZE_RANGE GL_SMOOTH_POINT_SIZE_RANGE
#define CGL_SMOOTH_POINT_SIZE_GRANULARITY GL_SMOOTH_POINT_SIZE_GRANULARITY
#define CGL_SMOOTH_LINE_WIDTH_RANGE GL_SMOOTH_LINE_WIDTH_RANGE
#define CGL_SMOOTH_LINE_WIDTH_GRANULARITY GL_SMOOTH_LINE_WIDTH_GRANULARITY
#define CGL_ALIASED_POINT_SIZE_RANGE GL_ALIASED_POINT_SIZE_RANGE
#define CGL_ALIASED_LINE_WIDTH_RANGE GL_ALIASED_LINE_WIDTH_RANGE
#define CGL_PACK_SKIP_IMAGES GL_PACK_SKIP_IMAGES
#define CGL_PACK_IMAGE_HEIGHT GL_PACK_IMAGE_HEIGHT
#define CGL_UNPACK_SKIP_IMAGES GL_UNPACK_SKIP_IMAGES
#define CGL_UNPACK_IMAGE_HEIGHT GL_UNPACK_IMAGE_HEIGHT
#define CGL_TEXTURE_DEPTH GL_TEXTURE_DEPTH
#define CGL_TEXTURE_WRAP_R GL_TEXTURE_WRAP_R
#define CGL_CONSTANT_COLOR GL_CONSTANT_COLOR
#define CGL_ONE_MINUS_CONSTANT_COLOR GL_ONE_MINUS_CONSTANT_COLOR
#define CGL_CONSTANT_ALPHA GL_CONSTANT_ALPHA
#define CGL_ONE_MINUS_CONSTANT_ALPHA GL_ONE_MINUS_CONSTANT_ALPHA
#define CGL_COLOR_TABLE GL_COLOR_TABLE
#define CGL_POST_CONVOLUTION_COLOR_TABLE GL_POST_CONVOLUTION_COLOR_TABLE
#define CGL_POST_COLOR_MATRIX_COLOR_TABLE GL_POST_COLOR_MATRIX_COLOR_TABLE
#define CGL_PROXY_COLOR_TABLE GL_PROXY_COLOR_TABLE
#define CGL_PROXY_POST_CONVOLUTION_COLOR_TABLE GL_PROXY_POST_CONVOLUTION_COLOR_TABLE
#define CGL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE
#define CGL_COLOR_TABLE_SCALE GL_COLOR_TABLE_SCALE
#define CGL_COLOR_TABLE_BIAS GL_COLOR_TABLE_BIAS
#define CGL_COLOR_TABLE_FORMAT GL_COLOR_TABLE_FORMAT
#define CGL_COLOR_TABLE_WIDTH GL_COLOR_TABLE_WIDTH
#define CGL_COLOR_TABLE_RED_SIZE GL_COLOR_TABLE_RED_SIZE
#define CGL_COLOR_TABLE_GREEN_SIZE GL_COLOR_TABLE_GREEN_SIZE
#define CGL_COLOR_TABLE_BLUE_SIZE GL_COLOR_TABLE_BLUE_SIZE
#define CGL_COLOR_TABLE_ALPHA_SIZE GL_COLOR_TABLE_ALPHA_SIZE
#define CGL_COLOR_TABLE_LUMINANCE_SIZE GL_COLOR_TABLE_LUMINANCE_SIZE
#define CGL_COLOR_TABLE_INTENSITY_SIZE GL_COLOR_TABLE_INTENSITY_SIZE
#define CGL_CONVOLUTION_BORDER_MODE GL_CONVOLUTION_BORDER_MODE
#define CGL_CONVOLUTION_FILTER_SCALE GL_CONVOLUTION_FILTER_SCALE
#define CGL_CONVOLUTION_FILTER_BIAS GL_CONVOLUTION_FILTER_BIAS
#define CGL_REDUCE GL_REDUCE
#define CGL_CONVOLUTION_FORMAT GL_CONVOLUTION_FORMAT
#define CGL_CONVOLUTION_WIDTH GL_CONVOLUTION_WIDTH
#define CGL_CONVOLUTION_HEIGHT GL_CONVOLUTION_HEIGHT
#define CGL_MAX_CONVOLUTION_WIDTH GL_MAX_CONVOLUTION_WIDTH
#define CGL_MAX_CONVOLUTION_HEIGHT GL_MAX_CONVOLUTION_HEIGHT
#define CGL_POST_CONVOLUTION_RED_SCALE GL_POST_CONVOLUTION_RED_SCALE
#define CGL_POST_CONVOLUTION_GREEN_SCALE GL_POST_CONVOLUTION_GREEN_SCALE
#define CGL_POST_CONVOLUTION_BLUE_SCALE GL_POST_CONVOLUTION_BLUE_SCALE
#define CGL_POST_CONVOLUTION_ALPHA_SCALE GL_POST_CONVOLUTION_ALPHA_SCALE
#define CGL_POST_CONVOLUTION_RED_BIAS GL_POST_CONVOLUTION_RED_BIAS
#define CGL_POST_CONVOLUTION_GREEN_BIAS GL_POST_CONVOLUTION_GREEN_BIAS
#define CGL_POST_CONVOLUTION_BLUE_BIAS GL_POST_CONVOLUTION_BLUE_BIAS
#define CGL_POST_CONVOLUTION_ALPHA_BIAS GL_POST_CONVOLUTION_ALPHA_BIAS
#define CGL_CONSTANT_BORDER GL_CONSTANT_BORDER
#define CGL_REPLICATE_BORDER GL_REPLICATE_BORDER
#define CGL_CONVOLUTION_BORDER_COLOR GL_CONVOLUTION_BORDER_COLOR
#define CGL_COLOR_MATRIX GL_COLOR_MATRIX
#define CGL_COLOR_MATRIX_STACK_DEPTH GL_COLOR_MATRIX_STACK_DEPTH
#define CGL_MAX_COLOR_MATRIX_STACK_DEPTH GL_MAX_COLOR_MATRIX_STACK_DEPTH
#define CGL_POST_COLOR_MATRIX_RED_SCALE GL_POST_COLOR_MATRIX_RED_SCALE
#define CGL_POST_COLOR_MATRIX_GREEN_SCALE GL_POST_COLOR_MATRIX_GREEN_SCALE
#define CGL_POST_COLOR_MATRIX_BLUE_SCALE GL_POST_COLOR_MATRIX_BLUE_SCALE
#define CGL_POST_COLOR_MATRIX_ALPHA_SCALE GL_POST_COLOR_MATRIX_ALPHA_SCALE
#define CGL_POST_COLOR_MATRIX_RED_BIAS GL_POST_COLOR_MATRIX_RED_BIAS
#define CGL_POST_COLOR_MATRIX_GREEN_BIAS GL_POST_COLOR_MATRIX_GREEN_BIAS
#define CGL_POST_COLOR_MATRIX_BLUE_BIAS GL_POST_COLOR_MATRIX_BLUE_BIAS
#define CGL_POST_COLOR_MATRIX_ALPHA_BIAS GL_POST_COLOR_MATRIX_ALPHA_BIAS
#define CGL_HISTOGRAM GL_HISTOGRAM
#define CGL_PROXY_HISTOGRAM GL_PROXY_HISTOGRAM
#define CGL_HISTOGRAM_WIDTH GL_HISTOGRAM_WIDTH
#define CGL_HISTOGRAM_FORMAT GL_HISTOGRAM_FORMAT
#define CGL_HISTOGRAM_RED_SIZE GL_HISTOGRAM_RED_SIZE
#define CGL_HISTOGRAM_GREEN_SIZE GL_HISTOGRAM_GREEN_SIZE
#define CGL_HISTOGRAM_BLUE_SIZE GL_HISTOGRAM_BLUE_SIZE
#define CGL_HISTOGRAM_ALPHA_SIZE GL_HISTOGRAM_ALPHA_SIZE
#define CGL_HISTOGRAM_LUMINANCE_SIZE GL_HISTOGRAM_LUMINANCE_SIZE
#define CGL_HISTOGRAM_SINK GL_HISTOGRAM_SINK
#define CGL_MINMAX GL_MINMAX
#define CGL_MINMAX_FORMAT GL_MINMAX_FORMAT
#define CGL_MINMAX_SINK GL_MINMAX_SINK
#define CGL_TABLE_TOO_LARGE GL_TABLE_TOO_LARGE
#define CGL_BLEND_EQUATION GL_BLEND_EQUATION
#define CGL_MIN GL_MIN
#define CGL_MAX GL_MAX
#define CGL_FUNC_ADD GL_FUNC_ADD
#define CGL_FUNC_SUBTRACT GL_FUNC_SUBTRACT
#define CGL_FUNC_REVERSE_SUBTRACT GL_FUNC_REVERSE_SUBTRACT
#define CGL_BLEND_COLOR GL_BLEND_COLOR
#define CGL_ACTIVE_TEXTURE GL_ACTIVE_TEXTURE
#define CGL_CLIENT_ACTIVE_TEXTURE GL_CLIENT_ACTIVE_TEXTURE
#define CGL_MAX_TEXTURE_UNITS GL_MAX_TEXTURE_UNITS
#define CGL_NORMAL_MAP GL_NORMAL_MAP
#define CGL_REFLECTION_MAP GL_REFLECTION_MAP
#define CGL_TEXTURE_CUBE_MAP GL_TEXTURE_CUBE_MAP
#define CGL_TEXTURE_BINDING_CUBE_MAP GL_TEXTURE_BINDING_CUBE_MAP
#define CGL_TEXTURE_CUBE_MAP_POSITIVE_X GL_TEXTURE_CUBE_MAP_POSITIVE_X
#define CGL_TEXTURE_CUBE_MAP_NEGATIVE_X GL_TEXTURE_CUBE_MAP_NEGATIVE_X
#define CGL_TEXTURE_CUBE_MAP_POSITIVE_Y GL_TEXTURE_CUBE_MAP_POSITIVE_Y
#define CGL_TEXTURE_CUBE_MAP_NEGATIVE_Y GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
#define CGL_TEXTURE_CUBE_MAP_POSITIVE_Z GL_TEXTURE_CUBE_MAP_POSITIVE_Z
#define CGL_TEXTURE_CUBE_MAP_NEGATIVE_Z GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
#define CGL_PROXY_TEXTURE_CUBE_MAP GL_PROXY_TEXTURE_CUBE_MAP
#define CGL_MAX_CUBE_MAP_TEXTURE_SIZE GL_MAX_CUBE_MAP_TEXTURE_SIZE
#define CGL_COMPRESSED_ALPHA GL_COMPRESSED_ALPHA
#define CGL_COMPRESSED_LUMINANCE GL_COMPRESSED_LUMINANCE
#define CGL_COMPRESSED_LUMINANCE_ALPHA GL_COMPRESSED_LUMINANCE_ALPHA
#define CGL_COMPRESSED_INTENSITY GL_COMPRESSED_INTENSITY
#define CGL_COMPRESSED_RGB GL_COMPRESSED_RGB
#define CGL_COMPRESSED_RGBA GL_COMPRESSED_RGBA
#define CGL_TEXTURE_COMPRESSION_HINT GL_TEXTURE_COMPRESSION_HINT
#define CGL_TEXTURE_COMPRESSED_IMAGE_SIZE GL_TEXTURE_COMPRESSED_IMAGE_SIZE
#define CGL_TEXTURE_COMPRESSED GL_TEXTURE_COMPRESSED
#define CGL_NUM_COMPRESSED_TEXTURE_FORMATS GL_NUM_COMPRESSED_TEXTURE_FORMATS
#define CGL_COMPRESSED_TEXTURE_FORMATS GL_COMPRESSED_TEXTURE_FORMATS
#define CGL_MULTISAMPLE GL_MULTISAMPLE
#define CGL_SAMPLE_ALPHA_TO_COVERAGE GL_SAMPLE_ALPHA_TO_COVERAGE
#define CGL_SAMPLE_ALPHA_TO_ONE GL_SAMPLE_ALPHA_TO_ONE
#define CGL_SAMPLE_COVERAGE GL_SAMPLE_COVERAGE
#define CGL_SAMPLE_BUFFERS GL_SAMPLE_BUFFERS
#define CGL_SAMPLES GL_SAMPLES
#define CGL_SAMPLE_COVERAGE_VALUE GL_SAMPLE_COVERAGE_VALUE
#define CGL_SAMPLE_COVERAGE_INVERT GL_SAMPLE_COVERAGE_INVERT
#define CGL_MULTISAMPLE_BIT GL_MULTISAMPLE_BIT
#define CGL_TRANSPOSE_MODELVIEW_MATRIX GL_TRANSPOSE_MODELVIEW_MATRIX
#define CGL_TRANSPOSE_PROJECTION_MATRIX GL_TRANSPOSE_PROJECTION_MATRIX
#define CGL_TRANSPOSE_TEXTURE_MATRIX GL_TRANSPOSE_TEXTURE_MATRIX
#define CGL_TRANSPOSE_COLOR_MATRIX GL_TRANSPOSE_COLOR_MATRIX
#define CGL_COMBINE GL_COMBINE
#define CGL_COMBINE_RGB GL_COMBINE_RGB
#define CGL_COMBINE_ALPHA GL_COMBINE_ALPHA
#define CGL_RGB_SCALE GL_RGB_SCALE
#define CGL_ADD_SIGNED GL_ADD_SIGNED
#define CGL_INTERPOLATE GL_INTERPOLATE
#define CGL_SUBTRACT GL_SUBTRACT
#define CGL_CONSTANT GL_CONSTANT
#define CGL_PRIMARY_COLOR GL_PRIMARY_COLOR
#define CGL_PREVIOUS GL_PREVIOUS
#define CGL_CLAMP_TO_BORDER GL_CLAMP_TO_BORDER
#define CGL_ACTIVE_TEXTURE_ARB GL_ACTIVE_TEXTURE_ARB
#define CGL_CLIENT_ACTIVE_TEXTURE_ARB GL_CLIENT_ACTIVE_TEXTURE_ARB
#define CGL_MAX_TEXTURE_UNITS_ARB GL_MAX_TEXTURE_UNITS_ARB
#define CGL_DEBUG_OBJECT_MESA GL_DEBUG_OBJECT_MESA
#define CGL_DEBUG_PRINT_MESA GL_DEBUG_PRINT_MESA
#define CGL_DEBUG_ASSERT_MESA GL_DEBUG_ASSERT_MESA
#define CGL_TRACE_ALL_BITS_MESA GL_TRACE_ALL_BITS_MESA
#define CGL_TRACE_OPERATIONS_BIT_MESA GL_TRACE_OPERATIONS_BIT_MESA
#define CGL_TRACE_PRIMITIVES_BIT_MESA GL_TRACE_PRIMITIVES_BIT_MESA
#define CGL_TRACE_ARRAYS_BIT_MESA GL_TRACE_ARRAYS_BIT_MESA
#define CGL_TRACE_TEXTURES_BIT_MESA GL_TRACE_TEXTURES_BIT_MESA
#define CGL_TRACE_PIXELS_BIT_MESA GL_TRACE_PIXELS_BIT_MESA
#define CGL_TRACE_ERRORS_BIT_MESA GL_TRACE_ERRORS_BIT_MESA
#define CGL_TRACE_MASK_MESA GL_TRACE_MASK_MESA
#define CGL_TRACE_NAME_MESA GL_TRACE_NAME_MESA
#define CGL_DEPTH_STENCIL_MESA GL_DEPTH_STENCIL_MESA
#define CGL_FRAGMENT_PROGRAM_POSITION_MESA GL_FRAGMENT_PROGRAM_POSITION_MESA
#define CGL_FRAGMENT_PROGRAM_CALLBACK_MESA GL_FRAGMENT_PROGRAM_CALLBACK_MESA
#define CGL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA
#define CGL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA
#define CGL_VERTEX_PROGRAM_POSITION_MESA GL_VERTEX_PROGRAM_POSITION_MESA
#define CGL_VERTEX_PROGRAM_CALLBACK_MESA GL_VERTEX_PROGRAM_CALLBACK_MESA
#define CGL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA
#define CGL_VERTEX_PROGRAM_CALLBACK_DATA_MESA GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA
#define CGL_ALPHA_BLEND_EQUATION_ATI GL_ALPHA_BLEND_EQUATION_ATI
#define CGL_TIME_ELAPSED_EXT GL_TIME_ELAPSED_EXT
#define CGL_READ_FRAMEBUFFER_EXT GL_READ_FRAMEBUFFER_EXT
#define CGL_DRAW_FRAMEBUFFER_EXT GL_DRAW_FRAMEBUFFER_EXT
#define CGL_DRAW_FRAMEBUFFER_BINDING_EXT GL_DRAW_FRAMEBUFFER_BINDING_EXT
#define CGL_READ_FRAMEBUFFER_BINDING_EXT GL_READ_FRAMEBUFFER_BINDING_EXT
#define CGL_DEPTH_STENCIL_EXT GL_DEPTH_STENCIL_EXT
#define CGL_TEXTURE_STENCIL_SIZE_EXT GL_TEXTURE_STENCIL_SIZE_EXT
#define CGL_SRGB_EXT GL_SRGB_EXT
#define CGL_SRGB_ALPHA_EXT GL_SRGB_ALPHA_EXT
#define CGL_SLUMINANCE_ALPHA_EXT GL_SLUMINANCE_ALPHA_EXT
#define CGL_SLUMINANCE_EXT GL_SLUMINANCE_EXT
#define CGL_COMPRESSED_SRGB_EXT GL_COMPRESSED_SRGB_EXT
#define CGL_COMPRESSED_SRGB_ALPHA_EXT GL_COMPRESSED_SRGB_ALPHA_EXT
#define CGL_COMPRESSED_SLUMINANCE_EXT GL_COMPRESSED_SLUMINANCE_EXT
#define CGL_COMPRESSED_SLUMINANCE_ALPHA_EXT GL_COMPRESSED_SLUMINANCE_ALPHA_EXT
#define CGL_DOT3_RGB GL_DOT3_RGB
#define CGL_DOT3_RGBA GL_DOT3_RGBA
/* extras */
#define CGL_TEXTURE_2D GL_TEXTURE_2D
#define CGL_ARGB GL_ARGB
#define CGL_UNSIGNED_INT_8_8_8_8_REV GL_UNSIGNED_INT_8_8_8_8_REV
#ifdef GL_TEXTURE_RECTANGLE_ARB
#define CGL_TEXTURE_RECTANGLE_ARB GL_TEXTURE_RECTANGLE_ARB
#else
#define CGL_TEXTURE_RECTANGLE_ARB 0
#endif
#ifdef GL_YCBCR_MESA
#define CGL_YCBCR_MESA GL_YCBCR_MESA
#define CGL_UNSIGNED_SHORT_8_8_REV_MESA GL_UNSIGNED_SHORT_8_8_REV_MESA
#define CGL_UNSIGNED_SHORT_8_8_MESA GL_UNSIGNED_SHORT_8_8_MESA
#else
#define CGL_YCBCR_MESA 0
#define CGL_UNSIGNED_SHORT_8_8_REV_MESA 0
#define CGL_UNSIGNED_SHORT_8_8_MESA 0
#endif
#define CGL_OBJECT_COMPILE_STATUS GL_OBJECT_COMPILE_STATUS_ARB
#define CLUTTER_COGL_HAS_GL 1
#define COGL_HAS_GL 1

View File

@ -372,7 +372,7 @@ _cogl_texture_driver_allows_foreign_gl_target (GLenum gl_target)
(for example, no mipmapping and complicated shader support) */
/* Allow 2-dimensional or rectangle textures only */
if (gl_target != GL_TEXTURE_2D && gl_target != CGL_TEXTURE_RECTANGLE_ARB)
if (gl_target != GL_TEXTURE_2D && gl_target != GL_TEXTURE_RECTANGLE_ARB)
return FALSE;
return TRUE;

View File

@ -33,606 +33,9 @@ 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
#define CGL_COLOR_BUFFER_BIT GL_COLOR_BUFFER_BIT
/* Boolean */
#define CGL_FALSE GL_FALSE
#define CGL_TRUE GL_TRUE
/* BeginMode */
#define CGL_POINTS GL_POINTS
#define CGL_LINES GL_LINES
#define CGL_LINE_LOOP GL_LINE_LOOP
#define CGL_LINE_STRIP GL_LINE_STRIP
#define CGL_TRIANGLES GL_TRIANGLES
#define CGL_TRIANGLE_STRIP GL_TRIANGLE_STRIP
#define CGL_TRIANGLE_FAN GL_TRIANGLE_FAN
/* AlphaFunction */
#define CGL_NEVER GL_NEVER
#define CGL_LESS GL_LESS
#define CGL_EQUAL GL_EQUAL
#define CGL_LEQUAL GL_LEQUAL
#define CGL_GREATER GL_GREATER
#define CGL_NOTEQUAL GL_NOTEQUAL
#define CGL_GEQUAL GL_GEQUAL
#define CGL_ALWAYS GL_ALWAYS
/* BlendingFactorDest */
#define CGL_ZERO GL_ZERO
#define CGL_ONE GL_ONE
#define CGL_SRC_COLOR GL_SRC_COLOR
#define CGL_ONE_MINUS_SRC_COLOR GL_ONE_MINUS_SRC_COLOR
#define CGL_SRC_ALPHA GL_SRC_ALPHA
#define CGL_ONE_MINUS_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
#define CGL_DST_ALPHA GL_DST_ALPHA
#define CGL_ONE_MINUS_DST_ALPHA GL_ONE_MINUS_DST_ALPHA
/* BlendingFactorSrc */
#define CGL_DST_COLOR GL_DST_COLOR
#define CGL_ONE_MINUS_DST_COLOR GL_ONE_MINUS_DST_COLOR
#define CGL_SRC_ALPHA_SATURATE GL_SRC_ALPHA_SATURATE
/* Missing; */
/* GL_ZERO */
/* GL_ONE */
/* GL_SRC_ALPHA */
/* GL_ONE_MINUS_SRC_ALPHA */
/* GL_DST_ALPHA */
/* GL_ONE_MINUS_DST_ALPHA */
/* CullFaceMode */
#define CGL_FRONT GL_FRONT
#define CGL_BACK GL_BACK
#define CGL_FRONT_AND_BACK GL_FRONT_AND_BACK
/* EnableCap */
#define CGL_FOG GL_FOG
#define CGL_LIGHTING GL_LIGHTING
#define CGL_CULL_FACE GL_CULL_FACE
#define CGL_ALPHA_TEST GL_ALPHA_TEST
#define CGL_BLEND GL_BLEND
#define CGL_COLOR_LOGIC_OP GL_COLOR_LOGIC_OP
#define CGL_DITHER GL_DITHER
#define CGL_STENCIL_TEST GL_STENCIL_TEST
#define CGL_DEPTH_TEST GL_DEPTH_TEST
#define CGL_POINT_SMOOTH GL_POINT_SMOOTH
#define CGL_LINE_SMOOTH GL_LINE_SMOOTH
#define CGL_SCISSOR_TEST GL_SCISSOR_TEST
#define CGL_COLOR_MATERIAL GL_COLOR_MATERIAL
#define CGL_NORMALIZE GL_NORMALIZE
#define CGL_RESCALE_NORMAL GL_RESCALE_NORMAL
#define CGL_POLYGON_OFFSET_FILL GL_POLYGON_OFFSET_FILL
#define CGL_VERTEX_ARRAY GL_VERTEX_ARRAY
#define CGL_NORMAL_ARRAY GL_NORMAL_ARRAY
#define CGL_COLOR_ARRAY GL_COLOR_ARRAY
#define CGL_TEXTURE_COORD_ARRAY GL_TEXTURE_COORD_ARRAY
#define CGL_MULTISAMPLE GL_MULTISAMPLE
#define CGL_SAMPLE_ALPHA_TO_COVERAGE GL_SAMPLE_ALPHA_TO_COVERAGE
#define CGL_SAMPLE_ALPHA_TO_ONE GL_SAMPLE_ALPHA_TO_ONE
#define CGL_SAMPLE_COVERAGE GL_SAMPLE_COVERAGE
/* Errors */
#define CGL_NO_ERROR GL_NO_ERROR
#define CGL_INVALID_ENUM GL_INVALID_ENUM
#define CGL_INVALID_VALUE GL_INVALID_VALUE
#define CGL_INVALID_OPERATION GL_INVALID_OPERATION
#define CGL_STACK_OVERFLOW GL_STACK_OVERFLOW
#define CGL_STACK_UNDERFLOW GL_STACK_UNDERFLOW
#define CGL_OUT_OF_MEMORY GL_OUT_OF_MEMORY
/* Fog mode */
#define CGL_EXP GL_EXP
#define CGL_EXP2 GL_EXP2
#define CGL_FOG_DENSITY GL_FOG_DENSITY
/* FogParameter */
#define CGL_FOG_START GL_FOG_START
#define CGL_FOG_END GL_FOG_END
#define CGL_FOG_MODE GL_FOG_MODE
#define CGL_FOG_COLOR GL_FOG_COLOR
#define CGL_CW GL_CW
#define CGL_CCW GL_CCW
/* GetPName */
#define CGL_CURRENT_COLOR GL_CURRENT_COLOR
#define CGL_CURRENT_NORMAL GL_CURRENT_NORMAL
#define CGL_CURRENT_TEXTURE_COORDS GL_CURRENT_TEXTURE_COORDS
#define CGL_POINT_SIZE GL_POINT_SIZE
#define CGL_POINT_SIZE_MIN GL_POINT_SIZE_MIN
#define CGL_POINT_SIZE_MAX GL_POINT_SIZE_MAX
#define CGL_POINT_FADE_THRESHOLD_SIZE GL_POINT_FADE_THRESHOLD_SIZE
#define CGL_POINT_DISTANCE_ATTENUATION GL_POINT_DISTANCE_ATTENUATION
#define CGL_SMOOTH_POINT_SIZE_RANGE GL_SMOOTH_POINT_SIZE_RANGE
#define CGL_LINE_WIDTH GL_LINE_WIDTH
#define CGL_SMOOTH_LINE_WIDTH_RANGE GL_SMOOTH_LINE_WIDTH_RANGE
#define CGL_ALIASED_POINT_SIZE_RANGE GL_ALIASED_POINT_SIZE_RANGE
#define CGL_ALIASED_LINE_WIDTH_RANGE GL_ALIASED_LINE_WIDTH_RANGE
#define CGL_CULL_FACE_MODE GL_CULL_FACE_MODE
#define CGL_FRONT_FACE GL_FRONT_FACE
#define CGL_SHADE_MODEL GL_SHADE_MODEL
#define CGL_DEPTH_RANGE GL_DEPTH_RANGE
#define CGL_DEPTH_WRITEMASK GL_DEPTH_WRITEMASK
#define CGL_DEPTH_CLEAR_VALUE GL_DEPTH_CLEAR_VALUE
#define CGL_DEPTH_FUNC GL_DEPTH_FUNC
#define CGL_STENCIL_CLEAR_VALUE GL_STENCIL_CLEAR_VALUE
#define CGL_STENCIL_FUNC GL_STENCIL_FUNC
#define CGL_STENCIL_VALUE_MASK GL_STENCIL_VALUE_MASK
#define CGL_STENCIL_FAIL GL_STENCIL_FAIL
#define CGL_STENCIL_PASS_DEPTH_FAIL GL_STENCIL_PASS_DEPTH_FAIL
#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 COGL_HAS_GLES2
#define CGL_MATRIX_MODE 0x0BA0 /* bad style but works for now */
#else
#define CGL_MATRIX_MODE GL_MATRIX_MODE
#endif
#define CGL_VIEWPORT GL_VIEWPORT
#define CGL_MODELVIEW_STACK_DEPTH GL_MODELVIEW_STACK_DEPTH
#define CGL_PROJECTION_STACK_DEPTH GL_PROJECTION_STACK_DEPTH
#define CGL_TEXTURE_STACK_DEPTH GL_TEXTURE_STACK_DEPTH
#define CGL_MODELVIEW_MATRIX GL_MODELVIEW_MATRIX
#define CGL_PROJECTION_MATRIX GL_PROJECTION_MATRIX
#define CGL_TEXTURE_MATRIX GL_TEXTURE_MATRIX
#define CGL_ALPHA_TEST_FUNC GL_ALPHA_TEST_FUNC
#define CGL_ALPHA_TEST_REF GL_ALPHA_TEST_REF
#define CGL_BLEND_DST GL_BLEND_DST
#define CGL_BLEND_SRC GL_BLEND_SRC
#define CGL_LOGIC_OP_MODE GL_LOGIC_OP_MODE
#define CGL_SCISSOR_BOX GL_SCISSOR_BOX
#define CGL_SCISSOR_TEST GL_SCISSOR_TEST
#define CGL_COLOR_CLEAR_VALUE GL_COLOR_CLEAR_VALUE
#define CGL_COLOR_WRITEMASK GL_COLOR_WRITEMASK
#define CGL_UNPACK_ALIGNMENT GL_UNPACK_ALIGNMENT
#define CGL_PACK_ALIGNMENT GL_PACK_ALIGNMENT
#define CGL_MAX_LIGHTS GL_MAX_LIGHTS
#define CGL_MAX_CLIP_PLANES GL_MAX_CLIP_PLANES
#define CGL_MAX_TEXTURE_SIZE GL_MAX_TEXTURE_SIZE
#define CGL_MAX_MODELVIEW_STACK_DEPTH GL_MAX_MODELVIEW_STACK_DEPTH
#define CGL_MAX_PROJECTION_STACK_DEPTH GL_MAX_PROJECTION_STACK_DEPTH
#define CGL_MAX_TEXTURE_STACK_DEPTH GL_MAX_TEXTURE_STACK_DEPTH
#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 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
#endif
#define CGL_SUBPIXEL_BITS GL_SUBPIXEL_BITS
#define CGL_RED_BITS GL_RED_BITS
#define CGL_GREEN_BITS GL_GREEN_BITS
#define CGL_BLUE_BITS GL_BLUE_BITS
#define CGL_ALPHA_BITS GL_ALPHA_BITS
#define CGL_DEPTH_BITS GL_DEPTH_BITS
#define CGL_STENCIL_BITS GL_STENCIL_BITS
#define CGL_POLYGON_OFFSET_UNITS GL_POLYGON_OFFSET_UNITS
#define CGL_POLYGON_OFFSET_FILL GL_POLYGON_OFFSET_FILL
#define CGL_POLYGON_OFFSET_FACTOR GL_POLYGON_OFFSET_FACTOR
#define CGL_VERTEX_ARRAY_SIZE GL_VERTEX_ARRAY_SIZE
#define CGL_VERTEX_ARRAY_TYPE GL_VERTEX_ARRAY_TYPE
#define CGL_VERTEX_ARRAY_STRIDE GL_VERTEX_ARRAY_STRIDE
#define CGL_NORMAL_ARRAY_TYPE GL_NORMAL_ARRAY_TYPE
#define CGL_NORMAL_ARRAY_STRIDE GL_NORMAL_ARRAY_STRIDE
#define CGL_COLOR_ARRAY_SIZE GL_COLOR_ARRAY_SIZE
#define CGL_COLOR_ARRAY_TYPE GL_COLOR_ARRAY_TYPE
#define CGL_COLOR_ARRAY_STRIDE GL_COLOR_ARRAY_STRIDE
#define CGL_TEXTURE_COORD_ARRAY_SIZE GL_TEXTURE_COORD_ARRAY_SIZE
#define CGL_TEXTURE_COORD_ARRAY_TYPE GL_TEXTURE_COORD_ARRAY_TYPE
#define CGL_TEXTURE_COORD_ARRAY_STRIDE GL_TEXTURE_COORD_ARRAY_STRIDE
#define CGL_VERTEX_ARRAY_POINTER GL_VERTEX_ARRAY_POINTER
#define CGL_NORMAL_ARRAY_POINTER GL_NORMAL_ARRAY_POINTER
#define CGL_COLOR_ARRAY_POINTER GL_COLOR_ARRAY_POINTER
#define CGL_TEXTURE_COORD_ARRAY_POINTER GL_TEXTURE_COORD_ARRAY_POINTER
#define CGL_SAMPLE_BUFFERS GL_SAMPLE_BUFFERS
#define CGL_SAMPLES GL_SAMPLES
#define CGL_SAMPLE_COVERAGE_VALUE GL_SAMPLE_COVERAGE_VALUE
#define CGL_SAMPLE_COVERAGE_INVERT GL_SAMPLE_COVERAGE_INVERT
/* GetTextureParameter - missing */
/* GL_TEXTURE_MAG_FILTER */
/* GL_TEXTURE_MIN_FILTER */
/* GL_TEXTURE_WRAP_S */
/* GL_TEXTURE_WRAP_T */
#define CGL_IMPLEMENTATION_COLOR_READ_TYPE_OES GL_IMPLEMENTATION_COLOR_READ_TYPE_OES
#define CGL_IMPLEMENTATION_COLOR_READ_FORMAT_OES GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES
#define CGL_NUM_COMPRESSED_TEXTURE_FORMATS GL_NUM_COMPRESSED_TEXTURE_FORMATS
#define CGL_COMPRESSED_TEXTURE_FORMATS GL_COMPRESSED_TEXTURE_FORMATS
/* OES_matrix_get */
#define CGL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS
#define CGL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS
#define CGL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS
/* HintMode */
#define CGL_DONT_CARE GL_DONT_CARE
#define CGL_FASTEST GL_FASTEST
#define CGL_NICEST GL_NICEST
/* HintTarget */
#define CGL_PERSPECTIVE_CORRECTION_HINT GL_PERSPECTIVE_CORRECTION_HINT
#define CGL_POINT_SMOOTH_HINT GL_POINT_SMOOTH_HINT
#define CGL_LINE_SMOOTH_HINT GL_LINE_SMOOTH_HINT
#define CGL_POLYGON_SMOOTH_HINT GL_POLYGON_SMOOTH_HINT
#define CGL_FOG_HINT GL_FOG_HINT
#define CGL_GENERATE_MIPMAP_HINT GL_GENERATE_MIPMAP_HINT
/* LightModelParameter */
#define CGL_LIGHT_MODEL_AMBIENT GL_LIGHT_MODEL_AMBIENT
#define CGL_LIGHT_MODEL_TWO_SIDE GL_LIGHT_MODEL_TWO_SIDE
/* LightParameter */
#define CGL_POSITION GL_POSITION
#define CGL_SPOT_DIRECTION GL_SPOT_DIRECTION
#define CGL_SPOT_EXPONENT GL_SPOT_EXPONENT
#define CGL_SPOT_CUTOFF GL_SPOT_CUTOFF
#define CGL_CONSTANT_ATTENUATION GL_CONSTANT_ATTENUATION
#define CGL_LINEAR_ATTENUATION GL_LINEAR_ATTENUATION
#define CGL_QUADRATIC_ATTENUATION GL_QUADRATIC_ATTENUATION
/* DataType */
#define CGL_BYTE GL_BYTE
#define CGL_UNSIGNED_BYTE GL_UNSIGNED_BYTE
#define CGL_SHORT GL_SHORT
#define CGL_UNSIGNED_SHORT GL_UNSIGNED_SHORT
#define CGL_FLOAT GL_FLOAT
#define CGL_FIXED GL_FIXED
/* LogicOp */
#define CGL_CLEAR GL_CLEAR
#define CGL_AND GL_AND
#define CGL_AND_REVERSE GL_AND_REVERSE
#define CGL_COPY GL_COPY
#define CGL_AND_INVERTED GL_AND_INVERTED
#define CGL_NOOP GL_NOOP
#define CGL_XOR GL_XOR
#define CGL_OR GL_OR
#define CGL_NOR GL_NOR
#define CGL_EQUIV GL_EQUIV
#define CGL_INVERT GL_INVERT
#define CGL_OR_REVERSE GL_OR_REVERSE
#define CGL_COPY_INVERTED GL_COPY_INVERTED
#define CGL_OR_INVERTED GL_OR_INVERTED
#define CGL_NAND GL_NAND
#define CGL_SET GL_SET
/* MaterialParameter */
#define CGL_AMBIENT_AND_DIFFUSE GL_AMBIENT_AND_DIFFUSE
/* MatrixMode */
#define CGL_MODELVIEW GL_MODELVIEW
#define CGL_PROJECTION GL_PROJECTION
#define CGL_TEXTURE GL_TEXTURE
/* PixelFormat */
#define CGL_ALPHA GL_ALPHA
#define CGL_RGB GL_RGB
#define CGL_RGBA GL_RGBA
#define CGL_LUMINANCE GL_LUMINANCE
#define CGL_LUMINANCE_ALPHA GL_LUMINANCE_ALPHA
/* PixelStoreParameter */
#define CGL_UNPACK_ALIGNMENT GL_UNPACK_ALIGNMENT
#define CGL_PACK_ALIGNMENT GL_PACK_ALIGNMENT
/* PixelType */
/* GL_UNSIGNED_BYTE */
#define CGL_UNSIGNED_SHORT_4_4_4_4 GL_UNSIGNED_SHORT_4_4_4_4
#define CGL_UNSIGNED_SHORT_5_5_5_1 GL_UNSIGNED_SHORT_5_5_5_1
#define CGL_UNSIGNED_SHORT_5_6_5 CGL_UNSIGNED_SHORT_5_6_5
/* ShadingModel */
#define CGL_FLAT GL_FLAT
#define CGL_SMOOTH GL_SMOOTH
/* StencilFunction */
/* GL_NEVER */
/* GL_LESS */
/* GL_EQUAL */
/* GL_LEQUAL */
/* GL_GREATER */
/* GL_NOTEQUAL */
/* GL_GEQUAL */
/* GL_ALWAYS */
/* StencilOp */
#define CGL_KEEP GL_KEEP
#define CGL_REPLACE GL_REPLACE
#define CGL_INCR GL_INCR
#define CGL_DECR GL_DECR
/* StringName */
#define CGL_VENDOR GL_VENDOR
#define CGL_RENDERER GL_RENDERER
#define CGL_VERSION GL_VERSION
#define CGL_EXTENSIONS GL_EXTENSIONS
/* TextureEnvMode */
#define CGL_DECAL GL_DECAL
/* GL_BLEND */
/* GL_REPLACE */
/* TextureEnvParameter */
#define CGL_TEXTURE_ENV_MODE GL_TEXTURE_ENV_MODE
#define CGL_TEXTURE_ENV_COLOR GL_TEXTURE_ENV_COLOR
/* TextureEnvTarget */
#define CGL_TEXTURE_ENV GL_TEXTURE_ENV
/* TextureMagFilter */
#define CGL_NEAREST GL_NEAREST
#define CGL_LINEAR GL_LINEAR
/* TextureMinFilter */
/* GL_NEAREST */
/* GL_LINEAR */
#define CGL_NEAREST_MIPMAP_NEAREST GL_NEAREST_MIPMAP_NEAREST
#define CGL_LINEAR_MIPMAP_NEAREST GL_LINEAR_MIPMAP_NEAREST
#define CGL_NEAREST_MIPMAP_LINEAR GL_NEAREST_MIPMAP_LINEAR
#define CGL_LINEAR_MIPMAP_LINEAR GL_LINEAR_MIPMAP_LINEAR
/* TextureParameterName */
#define CGL_TEXTURE_MAG_FILTER GL_TEXTURE_MAG_FILTER
#define CGL_TEXTURE_MIN_FILTER GL_TEXTURE_MIN_FILTER
#define CGL_TEXTURE_WRAP_S GL_TEXTURE_WRAP_S
#define CGL_TEXTURE_WRAP_T GL_TEXTURE_WRAP_T
#define CGL_GENERATE_MIPMAP GL_GENERATE_MIPMAP
#define CGL_ACTIVE_TEXTURE GL_ACTIVE_TEXTURE
#define CGL_CLIENT_ACTIVE_TEXTURE GL_CLIENT_ACTIVE_TEXTURE
/* TextureWrapMode */
#define CGL_REPEAT GL_REPEAT
#define CGL_CLAMP_TO_EDGE GL_CLAMP_TO_EDGE
/* PixelInternalFormat */
/* Buffer Objects */
#define CGL_ARRAY_BUFFER GL_ARRAY_BUFFER
#define CGL_ELEMENT_ARRAY_BUFFER GL_ELEMENT_ARRAY_BUFFER
#define CGL_ARRAY_BUFFER_BINDING GL_ARRAY_BUFFER_BINDING
#define CGL_ELEMENT_ARRAY_BUFFER_BINDING GL_ELEMENT_ARRAY_BUFFER_BINDING
#define CGL_VERTEX_ARRAY_BUFFER_BINDING GL_VERTEX_ARRAY_BUFFER_BINDING
#define CGL_NORMAL_ARRAY_BUFFER_BINDING GL_NORMAL_ARRAY_BUFFER_BINDING
#define CGL_COLOR_ARRAY_BUFFER_BINDING GL_COLOR_ARRAY_BUFFER_BINDING
#define CGL_TEXTURE_COORD_ARRAY_BUFFER_BINDING GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING
#define CGL_STATIC_DRAW GL_STATIC_DRAW
#define CGL_DYNAMIC_DRAW GL_DYNAMIC_DRAW
#define CGL_WRITE_ONLY GL_WRITE_ONLY
#define CGL_BUFFER_SIZE GL_BUFFER_SIZE
#define CGL_BUFFER_USAGE GL_BUFFER_USAGE
#define CGL_BUFFER_ACCESS GL_BUFFER_ACCESS
#define CGL_RGB_SCALE GL_RGB_SCALE
#define CGL_ALPHA_SCALE GL_ALPHA_SCALE
#define CGL_POINT_SPRITE_OES GL_POINT_SPRITE_OES
#define CGL_COORD_REPLACE_OES GL_COORD_REPLACE_OES
#define CGL_POINT_SIZE_ARRAY_OES GL_POINT_SIZE_ARRAY_OES
#define CGL_POINT_SIZE_ARRAY_TYPE_OES GL_POINT_SIZE_ARRAY_TYPE_OES
#define CGL_POINT_SIZE_ARRAY_STRIDE_OES GL_POINT_SIZE_ARRAY_STRIDE_OES
#define CGL_POINT_SIZE_ARRAY_POINTER_OES GL_POINT_SIZE_ARRAY_POINTER_OES
#define CGL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES
#define CGL_MAX_VERTEX_UNITS_OES GL_MAX_VERTEX_UNITS_OES
#define CGL_MAX_PALETTE_MATRICES_OES GL_MAX_PALETTE_MATRICES_OES
#define CGL_MATRIX_PALETTE_OES GL_MATRIX_PALETTE_OES
#define CGL_MATRIX_INDEX_ARRAY_OES GL_MATRIX_INDEX_ARRAY_OES
#define CGL_WEIGHT_ARRAY_OES GL_WEIGHT_ARRAY_OES
#define CGL_MATRIX_INDEX_ARRAY_SIZE_OES GL_MATRIX_INDEX_ARRAY_SIZE_OES
#define CGL_MATRIX_INDEX_ARRAY_TYPE_OES GL_MATRIX_INDEX_ARRAY_TYPE_OES
#define CGL_MATRIX_INDEX_ARRAY_STRIDE_OES GL_MATRIX_INDEX_ARRAY_STRIDE_OES
#define CGL_MATRIX_INDEX_ARRAY_POINTER_OES GL_MATRIX_INDEX_ARRAY_POINTER_OES
#define CGL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES
#define CGL_WEIGHT_ARRAY_SIZE_OES GL_WEIGHT_ARRAY_SIZE_OES
#define CGL_WEIGHT_ARRAY_TYPE_OES GL_WEIGHT_ARRAY_TYPE_OES
#define CGL_WEIGHT_ARRAY_STRIDE_OES GL_WEIGHT_ARRAY_STRIDE_OES
#define CGL_WEIGHT_ARRAY_POINTER_OES GL_WEIGHT_ARRAY_POINTER_OES
#define CGL_WEIGHT_ARRAY_BUFFER_BINDING_OES GL_WEIGHT_ARRAY_BUFFER_BINDING_OES
#define CGL_TEXTURE_CROP_RECT_OES GL_TEXTURE_CROP_RECT_OES
/* extras */
/* YUV textures also unsupported */
#define CGL_YCBCR_MESA 0
#define CGL_UNSIGNED_SHORT_8_8_REV_MESA 0
#define CGL_UNSIGNED_SHORT_8_8_MESA 0
#if defined(GL_OBJECT_COMPILE_STATUS)
#define CGL_OBJECT_COMPILE_STATUS GL_OBJECT_COMPILE_STATUS
#elif defined(GL_COMPILE_STATUS)
#define CGL_OBJECT_COMPILE_STATUS GL_COMPILE_STATUS
#else
#define CGL_OBJECT_COMPILE_STATUS 0
#endif
#define CLUTTER_COGL_HAS_GLES 1
#define COGL_HAS_GLES 1
/* These aren't always defined under GLES 2 but if they are then we
should probably use the GL_* macro instead of assuming the
number */
#ifdef GL_MODULATE
#define CGL_MODULATE GL_MODULATE
#else
#define CGL_MODULATE 0x2100
#endif
#ifdef GL_ADD
#define CGL_ADD GL_ADD
#else
#define CGL_ADD 0x0104
#endif
#ifdef GL_ADD_SIGNED
#define CGL_ADD_SIGNED GL_ADD_SIGNED
#else
#define CGL_ADD_SIGNED 0x8574
#endif
#ifdef GL_INTERPOLATE
#define CGL_INTERPOLATE GL_INTERPOLATE
#else
#define CGL_INTERPOLATE 0x8575
#endif
#ifdef GL_SUBTRACT
#define CGL_SUBTRACT GL_SUBTRACT
#else
#define CGL_SUBTRACT 0x84e7
#endif
#ifdef GL_DOT3_RGB
#define CGL_DOT3_RGB GL_DOT3_RGB
#else
#define CGL_DOT3_RGB 0x86ae
#endif
#ifdef GL_DOT3_RGBA
#define CGL_DOT3_RGBA GL_DOT3_RGBA
#else
#define CGL_DOT3_RGBA 0x86af
#endif
#ifdef GL_CONSTANT
#define CGL_CONSTANT GL_CONSTANT
#else
#define CGL_CONSTANT 0x8576
#endif
#ifdef GL_PRIMARY_COLOR
#define CGL_PRIMARY_COLOR GL_PRIMARY_COLOR
#else
#define CGL_PRIMARY_COLOR 0x8577
#endif
#ifdef GL_PREVIOUS
#define CGL_PREVIOUS GL_PREVIOUS
#else
#define CGL_PREVIOUS 0x8578
#endif
#ifdef GL_COMBINE
#define CGL_COMBINE GL_COMBINE
#else
#define CGL_COMBINE 0x8570
#endif
#ifdef GL_COMBINE_RGB
#define CGL_COMBINE_RGB GL_COMBINE_RGB
#else
#define CGL_COMBINE_RGB 0x8571
#endif
#ifdef GL_COMBINE_ALPHA
#define CGL_COMBINE_ALPHA GL_COMBINE_ALPHA
#else
#define CGL_COMBINE_ALPHA 0x8572
#endif
#ifdef GL_SRC0_RGB
#define CGL_SRC0_RGB GL_SRC0_RGB
#else
#define CGL_SRC0_RGB 0x8580
#endif
#ifdef GL_OPERAND0_RGB
#define CGL_OPERAND0_RGB GL_OPERAND0_RGB
#else
#define CGL_OPERAND0_RGB 0x8590
#endif
#ifdef GL_SRC1_RGB
#define CGL_SRC1_RGB GL_SRC1_RGB
#else
#define CGL_SRC1_RGB 0x8581
#endif
#ifdef GL_OPERAND1_RGB
#define CGL_OPERAND1_RGB GL_OPERAND1_RGB
#else
#define CGL_OPERAND1_RGB 0x8591
#endif
#ifdef GL_SRC2_RGB
#define CGL_SRC2_RGB GL_SRC2_RGB
#else
#define CGL_SRC2_RGB 0x8582
#endif
#ifdef GL_OPERAND2_RGB
#define CGL_OPERAND2_RGB GL_OPERAND2_RGB
#else
#define CGL_OPERAND2_RGB 0x8592
#endif
#ifdef GL_SRC0_ALPHA
#define CGL_SRC0_ALPHA GL_SRC0_ALPHA
#else
#define CGL_SRC0_ALPHA 0x8588
#endif
#ifdef GL_OPERAND0_ALPHA
#define CGL_OPERAND0_ALPHA GL_OPERAND0_ALPHA
#else
#define CGL_OPERAND0_ALPHA 0x8598
#endif
#ifdef GL_SRC1_ALPHA
#define CGL_SRC1_ALPHA GL_SRC1_ALPHA
#else
#define CGL_SRC1_ALPHA 0x8589
#endif
#ifdef GL_OPERAND1_ALPHA
#define CGL_OPERAND1_ALPHA GL_OPERAND1_ALPHA
#else
#define CGL_OPERAND1_ALPHA 0x8599
#endif
#ifdef GL_SRC2_ALPHA
#define CGL_SRC2_ALPHA GL_SRC2_ALPHA
#else
#define CGL_SRC2_ALPHA 0x858a
#endif
#ifdef GL_OPERAND2_ALPHA
#define CGL_OPERAND2_ALPHA GL_OPERAND2_ALPHA
#else
#define CGL_OPERAND2_ALPHA 0x859a
#endif
#ifdef GL_AMBIENT
#define CGL_AMBIENT GL_AMBIENT
#else
#define CGL_AMBIENT 0x1200
#endif
#ifdef GL_DIFFUSE
#define CGL_DIFFUSE GL_DIFFUSE
#else
#define CGL_DIFFUSE 0x1201
#endif
#ifdef GL_SPECULAR
#define CGL_SPECULAR GL_SPECULAR
#else
#define CGL_SPECULAR 0x1202
#endif
#ifdef GL_EMISSION
#define CGL_EMISSION GL_EMISSION
#else
#define CGL_EMISSION 0x1600
#endif
#ifdef GL_SHININESS
#define CGL_SHININESS GL_SHININESS
#else
#define CGL_SHININESS 0x1601
#endif
G_END_DECLS
#endif

View File

@ -118,7 +118,7 @@ initialize_texture_units (CoglGles2Wrapper *w)
/* We will need to set the matrix mode to GL_TEXTURE to
* initialise any new texture units, so we save the current
* mode for restoring afterwards */
GE( cogl_wrap_glGetIntegerv (CGL_MATRIX_MODE, &prev_mode));
GE( cogl_wrap_glGetIntegerv (GL_MATRIX_MODE, &prev_mode));
for (i = 0; i < COGL_GLES2_MAX_TEXTURE_UNITS; i++)
{
@ -1281,7 +1281,7 @@ cogl_wrap_glGetIntegerv (GLenum pname, GLint *params)
*params = 0;
break;
case CGL_MATRIX_MODE:
case GL_MATRIX_MODE:
*params = w->matrix_mode;
break;

View File

@ -224,12 +224,14 @@ struct _CoglGles2WrapperShader
#ifndef GL_MODELVIEW
#define GL_MATRIX_MODE 0x0BA0
#define GL_MODELVIEW 0x1700
#define GL_PROJECTION 0x1701
#ifdef COGL_ENABLE_DEBUG
#define GL_STACK_OVERFLOW 0x0503
#define GL_STACK_UNDERFLOW 0x0504
#define GL_STACK_OVERFLOW 0x0503
#define GL_STACK_UNDERFLOW 0x0504
#endif
#define GL_VERTEX_ARRAY 0x8074
@ -268,35 +270,36 @@ struct _CoglGles2WrapperShader
#define GL_EXP 0x8000
#define GL_EXP2 0x8001
#define GL_ADD CGL_ADD
#define GL_ADD_SIGNED CGL_ADD_SIGNED
#define GL_INTERPOLATE CGL_INTERPOLATE
#define GL_SUBTRACT CGL_SUBTRACT
#define GL_DOT3_RGB CGL_DOT3_RGB
#define GL_DOT3_RGBA CGL_DOT3_RGBA
#define GL_CONSTANT CGL_CONSTANT
#define GL_PRIMARY_COLOR CGL_PRIMARY_COLOR
#define GL_PREVIOUS CGL_PREVIOUS
#define GL_COMBINE CGL_COMBINE
#define GL_COMBINE_RGB CGL_COMBINE_RGB
#define GL_COMBINE_ALPHA CGL_COMBINE_ALPHA
#define GL_SRC0_RGB CGL_SRC0_RGB
#define GL_OPERAND0_RGB CGL_OPERAND0_RGB
#define GL_SRC1_RGB CGL_SRC1_RGB
#define GL_OPERAND1_RGB CGL_OPERAND1_RGB
#define GL_SRC2_RGB CGL_SRC2_RGB
#define GL_OPERAND2_RGB CGL_OPERAND2_RGB
#define GL_SRC0_ALPHA CGL_SRC0_ALPHA
#define GL_OPERAND0_ALPHA CGL_OPERAND0_ALPHA
#define GL_SRC1_ALPHA CGL_SRC1_ALPHA
#define GL_OPERAND1_ALPHA CGL_OPERAND1_ALPHA
#define GL_SRC2_ALPHA CGL_SRC2_ALPHA
#define GL_OPERAND2_ALPHA CGL_OPERAND2_ALPHA
#define GL_AMBIENT CGL_AMBIENT
#define GL_DIFFUSE CGL_DIFFUSE
#define GL_SPECULAR CGL_SPECULAR
#define GL_EMISSION CGL_EMISSION
#define GL_SHININESS CGL_SHININESS
#define GL_MODULATE 0x2100
#define GL_ADD 0x0104
#define GL_ADD_SIGNED 0x8574
#define GL_INTERPOLATE 0x8575
#define GL_SUBTRACT 0x84e7
#define GL_DOT3_RGB 0x86ae
#define GL_DOT3_RGBA 0x86af
#define GL_CONSTANT 0x8576
#define GL_PRIMARY_COLOR 0x8577
#define GL_PREVIOUS 0x8578
#define GL_COMBINE 0x8570
#define GL_COMBINE_RGB 0x8571
#define GL_COMBINE_ALPHA 0x8572
#define GL_SRC0_RGB 0x8580
#define GL_OPERAND0_RGB 0x8590
#define GL_SRC1_RGB 0x8581
#define GL_OPERAND1_RGB 0x8591
#define GL_SRC2_RGB 0x8582
#define GL_OPERAND2_RGB 0x8592
#define GL_SRC0_ALPHA 0x8588
#define GL_OPERAND0_ALPHA 0x8598
#define GL_SRC1_ALPHA 0x8589
#define GL_OPERAND1_ALPHA 0x8599
#define GL_SRC2_ALPHA 0x858a
#define GL_OPERAND2_ALPHA 0x859a
#define GL_AMBIENT 0x1200
#define GL_DIFFUSE 0x1201
#define GL_SPECULAR 0x1202
#define GL_EMISSION 0x1600
#define GL_SHININESS 0x1601
#endif /* GL_MODELVIEW */

File diff suppressed because it is too large Load Diff