From 7f51bdda17b533aed9ffbb90b46d47a298be4d96 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 16 Jan 2008 10:02:56 +0000 Subject: [PATCH] 2008-01-16 Emmanuele Bassi Define COGLhandleARB. (patch by Johan Bilien) * clutter/cogl/gles/cogl-defines.h: Define COGLhandleARB on GLES as well (using GLuint) * clutter/cogl/gles/cogl.c: Use COGLhandleARB. --- gles/cogl-defines.h | 1 + gles/cogl.c | 53 ++++++++++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/gles/cogl-defines.h b/gles/cogl-defines.h index cc11f51b9..925418fa5 100644 --- a/gles/cogl-defines.h +++ b/gles/cogl-defines.h @@ -440,6 +440,7 @@ G_BEGIN_DECLS typedef GLenum COGLenum; typedef GLint COGLint; typedef GLuint COGLuint; +typedef GLuint COGLhandleARB; /* extras */ diff --git a/gles/cogl.c b/gles/cogl.c index 3d325ffee..1a7131afd 100644 --- a/gles/cogl.c +++ b/gles/cogl.c @@ -645,66 +645,79 @@ cogl_fog_set (const ClutterColor *fog_color, glFogx (GL_FOG_END, (GLfixed) z_far); } -COGLint cogl_create_program (void) +COGLhandleARB +cogl_create_program (void) { return 0; } -COGLint cogl_create_shader (COGLenum shaderType) +COGLhandleARB +cogl_create_shader (COGLenum shaderType) { return 0; } -void cogl_shader_source (COGLint shader, - const gchar *source) +void +cogl_shader_source (COGLhandleARB shader, + const gchar *source) { } -void cogl_shader_compile (COGLint shader_handle) +void +cogl_shader_compile (COGLhandleARB shader_handle) { } -void cogl_program_attach_shader (COGLint program_handle, - COGLint shader_handle) +void +cogl_program_attach_shader (COGLhandleARB program_handle, + COGLhandleARB shader_handle) { } -void cogl_program_link (COGLint program_handle) +void +cogl_program_link (COGLhandleARB program_handle) { } -void cogl_program_use (COGLint program_handle) +void +cogl_program_use (COGLhandleARB program_handle) { } -COGLint cogl_program_get_uniform_location (COGLint program_handle, - const gchar *uniform_name) +COGLint +cogl_program_get_uniform_location (COGLhandleARB program_handle, + const gchar *uniform_name) { return 0; } -void cogl_program_destroy (COGLint handle) +void +cogl_program_destroy (COGLhandleARB handle) { } -void cogl_shader_destroy (COGLint handle) +void +cogl_shader_destroy (COGLhandleARB handle) { } -void cogl_shader_get_info_log (COGLint handle, - guint size, - gchar *buffer) +void +cogl_shader_get_info_log (COGLhandleARB handle, + guint size, + gchar *buffer) { } -void cogl_shader_get_parameteriv (COGLint handle, - COGLenum pname, - COGLint *dest) +void +cogl_shader_get_parameteriv (COGLhandleARB handle, + COGLenum pname, + COGLint *dest) { } -void cogl_program_uniform_1f (COGLint uniform_no, +void +cogl_program_uniform_1f (COGLint uniform_no, gfloat value) { }