mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
c9a81f035e
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>
53 lines
1.8 KiB
C
53 lines
1.8 KiB
C
|
|
/* Stuff you put in here is setup once in main() and gets passed around to
|
|
* all test functions and fixture setup/teardown functions in the data
|
|
* argument */
|
|
typedef struct _TestConformSharedState
|
|
{
|
|
int *argc_addr;
|
|
char ***argv_addr;
|
|
} TestConformSharedState;
|
|
|
|
|
|
/* This fixture structure is allocated by glib, and before running each test
|
|
* the test_conform_simple_fixture_setup func (see below) is called to
|
|
* initialise it, and test_conform_simple_fixture_teardown is called when
|
|
* the test is finished. */
|
|
typedef struct _TestConformSimpleFixture
|
|
{
|
|
/**/
|
|
int dummy;
|
|
} TestConformSimpleFixture;
|
|
|
|
typedef struct _TestConformTodo
|
|
{
|
|
gchar *name;
|
|
void (* func) (TestConformSimpleFixture *, gconstpointer);
|
|
} TestConformTodo;
|
|
|
|
typedef struct _TestConformGLFunctions
|
|
{
|
|
const guint8 * (* glGetString) (guint name);
|
|
void (* glGetIntegerv) (guint pname, int *params);
|
|
void (* glPixelStorei) (guint pname, int param);
|
|
void (* glBindTexture) (guint target, guint texture);
|
|
void (* glGenTextures) (int n, guint *textures);
|
|
guint (* glGetError) (void);
|
|
void (* glDeleteTextures) (int n, const guint *textures);
|
|
void (* glTexImage2D) (guint target, int level,
|
|
int internalFormat,
|
|
int width, int height,
|
|
int border, guint format, guint type,
|
|
const void *pixels);
|
|
void (* glTexParameteri) (guint target, guint pname, int param);
|
|
} TestConformGLFunctions;
|
|
|
|
void test_conform_get_gl_functions (TestConformGLFunctions *functions);
|
|
|
|
void test_conform_simple_fixture_setup (TestConformSimpleFixture *fixture,
|
|
gconstpointer data);
|
|
void test_conform_simple_fixture_teardown (TestConformSimpleFixture *fixture,
|
|
gconstpointer data);
|
|
|
|
gchar *clutter_test_get_data_file (const gchar *filename);
|