~ubuntu-branches/ubuntu/precise/clutter-1.0/precise

« back to all changes in this revision

Viewing changes to tests/interactive/test-cogl-offscreen.c

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
                                      0, 0,
96
96
                                      6, 6);
97
97
 
98
 
  cogl_set_draw_buffer (COGL_OFFSCREEN_BUFFER, priv->offscreen_id);
 
98
  cogl_push_framebuffer (priv->offscreen_id);
99
99
 
100
100
  cogl_set_source_color4ub (0xff, 0, 0, 0xff);
101
101
  cogl_rectangle (20, 20, 20 + 100, 20 + 100);
103
103
  cogl_set_source_color4ub (0, 0xff, 0, 0xff);
104
104
  cogl_rectangle (80, 80, 80 + 100, 80 + 100);
105
105
 
106
 
  cogl_set_draw_buffer (COGL_WINDOW_BUFFER, 0);
 
106
  cogl_pop_framebuffer ();
107
107
 
108
108
  material = cogl_material_new ();
109
109
  cogl_material_set_color4ub (material, 0x88, 0x88, 0x88, 0x88);
140
140
test_coglbox_init (TestCoglbox *self)
141
141
{
142
142
  TestCoglboxPrivate *priv;
 
143
  gchar *file;
 
144
 
143
145
  self->priv = priv = TEST_COGLBOX_GET_PRIVATE(self);
144
146
 
145
147
  printf ("Loading redhand.png\n");
146
 
  priv->texhand_id = cogl_texture_new_from_file ("redhand.png",
 
148
  file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL);
 
149
  priv->texhand_id = cogl_texture_new_from_file (file,
147
150
                                                 COGL_TEXTURE_NONE,
148
151
                                                 COGL_PIXEL_FORMAT_ANY,
149
152
                                                 NULL);
 
153
  g_free (file);
150
154
 
151
155
  printf ("Creating texture with size\n");
152
156
  priv->texture_id = cogl_texture_new_with_size (200, 200,