From 01bf50905689b363877f85942403cdc947f8c82c Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Fri, 12 Feb 2010 17:24:15 +0000 Subject: [PATCH] cogl-buffer: fix compilation for GL ES In the frenzy of the last 10mins before API freeze, I obviously forgot to update the OpenGL path for _cogl_buffer_hints_to_gl_enum(). This commit fixes this. --- clutter/cogl/cogl/cogl-buffer.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/clutter/cogl/cogl/cogl-buffer.c b/clutter/cogl/cogl/cogl-buffer.c index 55a5d7c..9d54006 100644 --- a/clutter/cogl/cogl/cogl-buffer.c +++ b/clutter/cogl/cogl/cogl-buffer.c @@ -129,18 +129,13 @@ _cogl_buffer_access_to_gl_enum (CoglBufferAccess access) /* OpenGL ES 1.1 and 2 only know about STATIC_DRAW and DYNAMIC_DRAW */ #if defined (COGL_HAS_GLES) GLenum -_cogl_buffer_hint_to_gl_enum (CoglBufferHint usage_hint) +_cogl_buffer_hints_to_gl_enum (CoglBufferUsageHint usage_hint, + CoglBufferUpdateHint update_hint) { - switch (usage_hint) - { - case COGL_BUFFER_HINT_STATIC_DRAW: - return GL_STATIC_DRAW; - case COGL_BUFFER_HINT_DYNAMIC_DRAW: - case COGL_BUFFER_HINT_STREAM_DRAW: - return GL_DYNAMIC_DRAW; - default: + /* usage hint is always TEXTURE for now */ + if (update_hint == COGL_BUFFER_UPDATE_HINT_STATIC) return GL_STATIC_DRAW; - } + return GL_DYNAMIC_DRAW; } #else GLenum -- 2.7.4