Don't use any GL types or defines in Clutter
Some of the Clutter code was using GL types for the primitive types such as GLint and GLubyte and then passing these to Cogl. This doesn't make much sense because the Cogl functions directly take native C types. This patch just replaces them with either a native C type or a glib type. Some of the cogl conformance tests are trying to directly call GL for example to test creating a foreign texture. These tests have been changed to manually define the GL enum values instead of relying on a GL header to define them. This is necessary because Cogl may soon stop including a GL header from its public headers. Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
@ -82,19 +82,19 @@ static GTypeFundamentalInfo shader_matrix_finfo = { 0, };
|
||||
struct _ClutterShaderFloat
|
||||
{
|
||||
gint size;
|
||||
GLfloat value[4];
|
||||
float value[4];
|
||||
};
|
||||
|
||||
struct _ClutterShaderInt
|
||||
{
|
||||
gint size;
|
||||
GLint value[4];
|
||||
int value[4];
|
||||
};
|
||||
|
||||
struct _ClutterShaderMatrix
|
||||
{
|
||||
gint size;
|
||||
GLfloat value[16];
|
||||
float value[16];
|
||||
};
|
||||
|
||||
static gpointer
|
||||
@ -436,7 +436,7 @@ clutter_value_set_shader_int (GValue *value,
|
||||
shader_int->size = size;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
shader_int->value[i] = (GLint) ints[i];
|
||||
shader_int->value[i] = ints[i];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user