void test_pipeline_uniforms (void) { TestState state; init_state (&state); cogl_framebuffer_orthographic (test_fb, 0, 0, cogl_framebuffer_get_width (test_fb), cogl_framebuffer_get_height (test_fb), -1, 100); paint (&state); validate_result (); /* Try the test again after querying the location of a large number of uniforms. This should verify that the bitmasks still work even if they have to allocate a separate array to store the bits */ init_long_pipeline_state (&state); paint (&state); paint_long_pipeline (&state); validate_result (); validate_long_pipeline_result (); destroy_state (&state); if (cogl_test_verbose ()) g_print ("OK\n"); }
void test_cogl_pipeline_uniforms (TestUtilsGTestFixture *fixture, void *user_data) { TestUtilsSharedState *shared_state = user_data; /* If shaders aren't supported then we can't run the test */ if (cogl_features_available (COGL_FEATURE_SHADERS_GLSL)) { TestState state; init_state (&state); cogl_ortho (/* left, right */ 0, cogl_framebuffer_get_width (shared_state->fb), /* bottom, top */ cogl_framebuffer_get_height (shared_state->fb), 0, /* z near, far */ -1, 100); paint (&state); validate_result (); /* Try the test again after querying the location of a large number of uniforms. This should verify that the bitmasks still work even if they have to allocate a separate array to store the bits */ init_long_pipeline_state (&state); paint (&state); paint_long_pipeline (&state); validate_result (); validate_long_pipeline_result (); destroy_state (&state); if (g_test_verbose ()) g_print ("OK\n"); } else if (g_test_verbose ()) g_print ("Skipping\n"); }