diff --git a/tests/conform/test-depth-test.c b/tests/conform/test-depth-test.c index 1cbfd967d..006cedb5a 100644 --- a/tests/conform/test-depth-test.c +++ b/tests/conform/test-depth-test.c @@ -18,8 +18,7 @@ typedef struct _TestState { - int width; - int height; + int dummy; } TestState; typedef struct @@ -142,16 +141,6 @@ test_depth (TestState *state, static void paint (TestState *state) { - CoglMatrix identity; - - cogl_ortho (0, state->width, /* left, right */ - state->height, 0, /* bottom, top */ - -1, 100 /* z near, far */); - - cogl_push_matrix (); - cogl_matrix_init_identity (&identity); - cogl_set_modelview_matrix (&identity); - /* Sanity check a few of the different depth test functions * and that depth writing can be disabled... */ @@ -270,8 +259,6 @@ paint (TestState *state) &rect0_state, &rect1_state, NULL, 0x00ff00ff); /* expected */ } - - cogl_pop_matrix (); } void @@ -281,8 +268,10 @@ test_cogl_depth_test (TestUtilsGTestFixture *fixture, TestUtilsSharedState *shared_state = data; TestState state; - state.width = cogl_framebuffer_get_width (shared_state->fb); - state.height = cogl_framebuffer_get_height (shared_state->fb); + cogl_ortho (0, cogl_framebuffer_get_width (shared_state->fb), /* left, right */ + cogl_framebuffer_get_height (shared_state->fb), 0, /* bottom, top */ + -1, 100 /* z near, far */); + paint (&state); if (g_test_verbose ()) diff --git a/tests/conform/test-just-vertex-shader.c b/tests/conform/test-just-vertex-shader.c index d316b0afa..7b809cd3e 100644 --- a/tests/conform/test-just-vertex-shader.c +++ b/tests/conform/test-just-vertex-shader.c @@ -6,8 +6,7 @@ typedef struct _TestState { - int width; - int height; + int dummy; } TestState; static void @@ -17,18 +16,10 @@ paint_legacy (TestState *state) CoglColor color; GError *error = NULL; CoglHandle shader, program; - CoglMatrix identity; - - cogl_ortho (0, state->width, /* left, right */ - state->height, 0, /* bottom, top */ - -1, 100 /* z near, far */); cogl_color_init_from_4ub (&color, 0, 0, 0, 255); cogl_clear (&color, COGL_BUFFER_BIT_COLOR); - cogl_matrix_init_identity (&identity); - cogl_set_modelview_matrix (&identity); - /* Set the primary vertex color as red */ cogl_color_set_from_4ub (&color, 0xff, 0x00, 0x00, 0xff); cogl_material_set_color (material, &color); @@ -92,18 +83,10 @@ paint (TestState *state) CoglColor color; GError *error = NULL; CoglHandle shader, program; - CoglMatrix identity; - - cogl_ortho (0, state->width, /* left, right */ - state->height, 0, /* bottom, top */ - -1, 100 /* z near, far */); cogl_color_init_from_4ub (&color, 0, 0, 0, 255); cogl_clear (&color, COGL_BUFFER_BIT_COLOR); - cogl_matrix_init_identity (&identity); - cogl_set_modelview_matrix (&identity); - /* Set the primary vertex color as red */ cogl_color_set_from_4ub (&color, 0xff, 0x00, 0x00, 0xff); cogl_pipeline_set_color (pipeline, &color); @@ -197,8 +180,9 @@ test_cogl_just_vertex_shader (TestUtilsGTestFixture *fixture, TestUtilsSharedState *shared_state = data; TestState state; - state.width = cogl_framebuffer_get_width (shared_state->fb); - state.height = cogl_framebuffer_get_height (shared_state->fb); + cogl_ortho (0, cogl_framebuffer_get_width (shared_state->fb), /* left, right */ + cogl_framebuffer_get_height (shared_state->fb), 0, /* bottom, top */ + -1, 100 /* z near, far */); /* If shaders aren't supported then we can't run the test */ if (cogl_features_available (COGL_FEATURE_SHADERS_GLSL))