Added COGLhandleARB since the underlying type on OSX is void*,
patch from Tommi Komulainen <tommi.komulainen@iki.fi>, (#694) * clutter/cogl/gl/cogl-defines.h.in: Added COGLhandleARB typedef. * clutter/cogl/cogl.h: * clutter/cogl/gl/cogl.c: * clutter/clutter-shader.c: Use COGLhandleARB instead of COGLint when referring to program or shader handles.
This commit is contained in:
parent
f32911c519
commit
063386c1e2
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2008-01-10 Øyvind Kolås <pippin@gimp.org>
|
||||||
|
|
||||||
|
Added COGLhandleARB since the underlying type on OSX is void*,
|
||||||
|
patch from Tommi Komulainen <tommi.komulainen@iki.fi>, (#694)
|
||||||
|
|
||||||
|
* clutter/cogl/gl/cogl-defines.h.in: Added COGLhandleARB typedef.
|
||||||
|
* clutter/cogl/cogl.h:
|
||||||
|
* clutter/cogl/gl/cogl.c:
|
||||||
|
* clutter/clutter-shader.c: Use COGLhandleARB instead of COGLint when
|
||||||
|
referring to program or shader handles.
|
||||||
|
|
||||||
2008-01-09 Emmanuele Bassi <ebassi@openedhand.com>
|
2008-01-09 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter/Makefile.am:
|
* clutter/Makefile.am:
|
||||||
|
@ -68,19 +68,19 @@ typedef enum {
|
|||||||
|
|
||||||
struct _ClutterShaderPrivate
|
struct _ClutterShaderPrivate
|
||||||
{
|
{
|
||||||
guint bound : 1; /* The shader is bound to the GL context */
|
guint bound : 1; /* Shader is bound to the GL context */
|
||||||
guint is_enabled : 1;
|
guint is_enabled : 1;
|
||||||
|
|
||||||
guint vertex_is_glsl : 1;
|
guint vertex_is_glsl : 1;
|
||||||
guint fragment_is_glsl : 1;
|
guint fragment_is_glsl : 1;
|
||||||
|
|
||||||
gchar *vertex_source; /* source (or asm) for vertex shader */
|
gchar *vertex_source; /* GLSL source for vertex shader */
|
||||||
gchar *fragment_source; /* source (or asm) for fragment shader */
|
gchar *fragment_source; /* GLSL source for fragment shader */
|
||||||
|
|
||||||
COGLint program;
|
COGLhandleARB program;
|
||||||
|
|
||||||
COGLint vertex_shader;
|
COGLhandleARB vertex_shader;
|
||||||
COGLint fragment_shader;
|
COGLhandleARB fragment_shader;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -214,49 +214,49 @@ cogl_fog_set (const ClutterColor *fog_color,
|
|||||||
ClutterFixed z_far);
|
ClutterFixed z_far);
|
||||||
|
|
||||||
|
|
||||||
COGLint
|
COGLhandleARB
|
||||||
cogl_create_shader (COGLenum shaderType);
|
cogl_create_shader (COGLenum shaderType);
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_shader_destroy (COGLint handle);
|
cogl_shader_destroy (COGLhandleARB handle);
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_shader_source (COGLint shader,
|
cogl_shader_source (COGLhandleARB shader,
|
||||||
const gchar *source);
|
const gchar *source);
|
||||||
void
|
void
|
||||||
cogl_shader_compile (COGLint shader_handle);
|
cogl_shader_compile (COGLhandleARB shader_handle);
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_shader_get_info_log (COGLint handle,
|
cogl_shader_get_info_log (COGLhandleARB handle,
|
||||||
guint size,
|
guint size,
|
||||||
gchar *buffer);
|
gchar *buffer);
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_shader_get_parameteriv (COGLint handle,
|
cogl_shader_get_parameteriv (COGLhandleARB handle,
|
||||||
COGLenum pname,
|
COGLenum pname,
|
||||||
COGLint *dest);
|
COGLint *dest);
|
||||||
|
|
||||||
|
|
||||||
COGLint
|
COGLhandleARB
|
||||||
cogl_create_program (void);
|
cogl_create_program (void);
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_program_destroy (COGLint handle);
|
cogl_program_destroy (COGLhandleARB handle);
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_program_attach_shader (COGLint program_handle,
|
cogl_program_attach_shader (COGLhandleARB program_handle,
|
||||||
COGLint shader_handle);
|
COGLhandleARB shader_handle);
|
||||||
|
|
||||||
/* 0 to use none */
|
/* 0 to use none */
|
||||||
void
|
void
|
||||||
cogl_program_link (COGLint program_handle);
|
cogl_program_link (COGLhandleARB program_handle);
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_program_use (COGLint program_handle);
|
cogl_program_use (COGLhandleARB program_handle);
|
||||||
|
|
||||||
COGLint
|
COGLint
|
||||||
cogl_program_get_uniform_location (COGLint program_int,
|
cogl_program_get_uniform_location (COGLhandleARB program_int,
|
||||||
const gchar *uniform_name);
|
const gchar *uniform_name);
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ G_BEGIN_DECLS
|
|||||||
typedef GLenum COGLenum;
|
typedef GLenum COGLenum;
|
||||||
typedef GLint COGLint;
|
typedef GLint COGLint;
|
||||||
typedef GLuint COGLuint;
|
typedef GLuint COGLuint;
|
||||||
|
typedef GLhandleARB COGLhandleARB;
|
||||||
|
|
||||||
/* FIXME + DOCUMENT */
|
/* FIXME + DOCUMENT */
|
||||||
|
|
||||||
|
@ -785,14 +785,14 @@ cogl_fog_set (const ClutterColor *fog_color,
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
COGLint
|
COGLhandleARB
|
||||||
cogl_create_program (void)
|
cogl_create_program (void)
|
||||||
{
|
{
|
||||||
PROC (GLhandleARB, 0, glCreateProgramObjectARB, void);
|
PROC (GLhandleARB, 0, glCreateProgramObjectARB, void);
|
||||||
return proc ();
|
return proc ();
|
||||||
}
|
}
|
||||||
|
|
||||||
COGLint
|
COGLhandleARB
|
||||||
cogl_create_shader (COGLenum shaderType)
|
cogl_create_shader (COGLenum shaderType)
|
||||||
{
|
{
|
||||||
PROC (GLhandleARB, 0, glCreateShaderObjectARB, GLenum);
|
PROC (GLhandleARB, 0, glCreateShaderObjectARB, GLenum);
|
||||||
@ -800,7 +800,7 @@ cogl_create_shader (COGLenum shaderType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_shader_source (COGLint shader,
|
cogl_shader_source (COGLhandleARB shader,
|
||||||
const gchar *source)
|
const gchar *source)
|
||||||
{
|
{
|
||||||
PROC (GLvoid,, glShaderSourceARB, GLhandleARB, GLsizei, const GLcharARB **, const GLint *)
|
PROC (GLvoid,, glShaderSourceARB, GLhandleARB, GLsizei, const GLcharARB **, const GLint *)
|
||||||
@ -808,36 +808,36 @@ cogl_shader_source (COGLint shader,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_shader_compile (COGLint shader_handle)
|
cogl_shader_compile (COGLhandleARB shader_handle)
|
||||||
{
|
{
|
||||||
PROC (GLvoid,, glCompileShaderARB, GLhandleARB);
|
PROC (GLvoid,, glCompileShaderARB, GLhandleARB);
|
||||||
proc (shader_handle);
|
proc (shader_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_program_attach_shader (COGLint program_handle,
|
cogl_program_attach_shader (COGLhandleARB program_handle,
|
||||||
COGLint shader_handle)
|
COGLhandleARB shader_handle)
|
||||||
{
|
{
|
||||||
PROC (GLvoid,, glAttachObjectARB, GLhandleARB, GLhandleARB);
|
PROC (GLvoid,, glAttachObjectARB, GLhandleARB, GLhandleARB);
|
||||||
proc (program_handle, shader_handle);
|
proc (program_handle, shader_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_program_link (COGLint program_handle)
|
cogl_program_link (COGLhandleARB program_handle)
|
||||||
{
|
{
|
||||||
PROC (GLvoid,, glLinkProgramARB, GLhandleARB);
|
PROC (GLvoid,, glLinkProgramARB, GLhandleARB);
|
||||||
proc (program_handle);
|
proc (program_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_program_use (COGLint program_handle)
|
cogl_program_use (COGLhandleARB program_handle)
|
||||||
{
|
{
|
||||||
PROC (GLvoid,, glUseProgramObjectARB, GLhandleARB);
|
PROC (GLvoid,, glUseProgramObjectARB, GLhandleARB);
|
||||||
proc (program_handle);
|
proc (program_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
COGLint
|
COGLint
|
||||||
cogl_program_get_uniform_location (COGLint program_handle,
|
cogl_program_get_uniform_location (COGLhandleARB program_handle,
|
||||||
const gchar *uniform_name)
|
const gchar *uniform_name)
|
||||||
{
|
{
|
||||||
PROC (GLint,0, glGetUniformLocationARB, GLhandleARB, const GLcharARB *)
|
PROC (GLint,0, glGetUniformLocationARB, GLhandleARB, const GLcharARB *)
|
||||||
@ -845,32 +845,32 @@ cogl_program_get_uniform_location (COGLint program_handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_program_destroy (COGLint handle)
|
cogl_program_destroy (COGLhandleARB handle)
|
||||||
{
|
{
|
||||||
PROC (GLvoid,, glDeleteObjectARB, GLhandleARB);
|
PROC (GLvoid,, glDeleteObjectARB, GLhandleARB);
|
||||||
proc (handle);
|
proc (handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_shader_destroy (COGLint handle)
|
cogl_shader_destroy (COGLhandleARB handle)
|
||||||
{
|
{
|
||||||
PROC (GLvoid,, glDeleteObjectARB, GLhandleARB);
|
PROC (GLvoid,, glDeleteObjectARB, GLhandleARB);
|
||||||
proc (handle);
|
proc (handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_shader_get_info_log (COGLint handle,
|
cogl_shader_get_info_log (COGLhandleARB handle,
|
||||||
guint size,
|
guint size,
|
||||||
gchar *buffer)
|
gchar *buffer)
|
||||||
{
|
{
|
||||||
gint len;
|
COGLint len;
|
||||||
PROC (GLvoid,, glGetInfoLogARB, GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
|
PROC (GLvoid,, glGetInfoLogARB, GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
|
||||||
proc (handle, size-1, &len, buffer);
|
proc (handle, size-1, &len, buffer);
|
||||||
buffer[len]='\0';
|
buffer[len]='\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cogl_shader_get_parameteriv (COGLint handle,
|
cogl_shader_get_parameteriv (COGLhandleARB handle,
|
||||||
COGLenum pname,
|
COGLenum pname,
|
||||||
COGLint *dest)
|
COGLint *dest)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user