diff options
author | Neil Roberts <neil@linux.intel.com> | 2010-02-23 14:45:44 +0000 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2010-02-26 10:56:35 +0000 |
commit | 82fd07c54af5f6641fbf5e0952c930ec32ef70c6 (patch) | |
tree | 3754c3cbf71e95646504e60addc790ee18d33c83 /cogl/driver | |
parent | b583083a3fc4ec5368ee662b9338c8f32a59daaf (diff) | |
download | cogl-82fd07c54af5f6641fbf5e0952c930ec32ef70c6.tar.gz |
cogl-vertex-buffer: Add support for unsigned int indices
This adds a COGL_INDICES_TYPE_UNSIGNED_INT enum value so that unsigned
ints can be used with cogl_vertex_buffer_indices_new. Unsigned ints
are not supported in core on GLES so a feature flag has also been
added to advertise this. GLES only sets the feature if the
GL_OES_element_index_uint extension is available. It is an error to
call indices_new() with unsigned ints unless the feature is
advertised.
http://bugzilla.openedhand.com/show_bug.cgi?id=1998
Diffstat (limited to 'cogl/driver')
-rw-r--r-- | cogl/driver/gl/cogl.c | 3 | ||||
-rw-r--r-- | cogl/driver/gles/cogl-feature-functions.h | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/cogl/driver/gl/cogl.c b/cogl/driver/gl/cogl.c index 72c7b160..97d33a61 100644 --- a/cogl/driver/gl/cogl.c +++ b/cogl/driver/gl/cogl.c @@ -185,7 +185,8 @@ _cogl_features_init (void) _cogl_get_gl_version (&gl_major, &gl_minor); - flags = COGL_FEATURE_TEXTURE_READ_PIXELS; + flags = (COGL_FEATURE_TEXTURE_READ_PIXELS + | COGL_FEATURE_UNSIGNED_INT_INDICES); gl_extensions = (const char*) glGetString (GL_EXTENSIONS); diff --git a/cogl/driver/gles/cogl-feature-functions.h b/cogl/driver/gles/cogl-feature-functions.h index d8d570ae..5650bebe 100644 --- a/cogl/driver/gles/cogl-feature-functions.h +++ b/cogl/driver/gles/cogl-feature-functions.h @@ -70,3 +70,9 @@ COGL_FEATURE_FUNCTION (void, glDeleteFramebuffers, COGL_FEATURE_FUNCTION (void, glGenerateMipmap, (GLenum target)) COGL_FEATURE_END () + +COGL_FEATURE_BEGIN (element_index_uint, 255, 255, + "OES\0", + "element_index_uint\0", + COGL_FEATURE_UNSIGNED_INT_INDICES) +COGL_FEATURE_END () |