From 3946a91e686cc5746289b25e52d43098e0997722 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. --- cogl/cogl-buffer.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/cogl/cogl-buffer.c b/cogl/cogl-buffer.c index 55a5d7c31..9d54006c6 100644 --- a/cogl/cogl-buffer.c +++ b/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: + /* usage hint is always TEXTURE for now */ + if (update_hint == COGL_BUFFER_UPDATE_HINT_STATIC) return GL_STATIC_DRAW; - case COGL_BUFFER_HINT_DYNAMIC_DRAW: - case COGL_BUFFER_HINT_STREAM_DRAW: - return GL_DYNAMIC_DRAW; - default: - return GL_STATIC_DRAW; - } + return GL_DYNAMIC_DRAW; } #else GLenum