test-cogl-readpixels: Reset the viewport and matrices

The on_paint function for test-cogl-readpixels tries to temporarily
set the projection, modelview and viewport to its own values. However
it was never restoring the saved values so it could affect the results
of subsequent tests.
This commit is contained in:
Neil Roberts 2010-05-06 14:18:32 +01:00
parent b9c7051484
commit 61ae7c6df7

View File

@ -124,6 +124,13 @@ on_paint (ClutterActor *actor, void *state)
cogl_handle_unref (tex); cogl_handle_unref (tex);
/* Restore the viewport and matrices state */
cogl_set_viewport (saved_viewport[0],
saved_viewport[1],
saved_viewport[2],
saved_viewport[3]);
cogl_set_projection_matrix (&saved_projection);
cogl_pop_matrix ();
/* Comment this out if you want visual feedback of what this test /* Comment this out if you want visual feedback of what this test
* paints. * paints.