mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
[test-cogl-multitexture] Print an error if textures can't be loaded
I just wasted a silly amount time trying to bisect an apparently broken cogl-test-multitexture until I realized it was just silently failing to load any textures.
This commit is contained in:
parent
3b4f46a18a
commit
94e60c393b
@ -51,6 +51,7 @@ material_rectangle_paint (ClutterActor *actor, gpointer data)
|
||||
G_MODULE_EXPORT int
|
||||
test_cogl_multitexture_main (int argc, char *argv[])
|
||||
{
|
||||
GError *error = NULL;
|
||||
ClutterTimeline *timeline;
|
||||
ClutterBehaviour *r_behave;
|
||||
ClutterActor *stage;
|
||||
@ -85,17 +86,25 @@ test_cogl_multitexture_main (int argc, char *argv[])
|
||||
cogl_texture_new_from_file ("redhand_alpha.png",
|
||||
COGL_TEXTURE_NO_SLICING,
|
||||
COGL_PIXEL_FORMAT_ANY,
|
||||
NULL);
|
||||
&error);
|
||||
if (!state->alpha_tex)
|
||||
g_critical ("Failed to load redhand_alpha.png: %s", error->message);
|
||||
|
||||
state->redhand_tex =
|
||||
cogl_texture_new_from_file ("redhand.png",
|
||||
COGL_TEXTURE_NO_SLICING,
|
||||
COGL_PIXEL_FORMAT_ANY,
|
||||
NULL);
|
||||
&error);
|
||||
if (!state->redhand_tex)
|
||||
g_critical ("Failed to load redhand.png: %s", error->message);
|
||||
|
||||
state->light_tex0 =
|
||||
cogl_texture_new_from_file ("light0.png",
|
||||
COGL_TEXTURE_NO_SLICING,
|
||||
COGL_PIXEL_FORMAT_ANY,
|
||||
NULL);
|
||||
&error);
|
||||
if (!state->light_tex0)
|
||||
g_critical ("Failed to load light0.png: %s", error->message);
|
||||
|
||||
state->material = cogl_material_new ();
|
||||
cogl_material_set_layer (state->material, 0, state->alpha_tex);
|
||||
|
Loading…
Reference in New Issue
Block a user