summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2012-02-08 23:46:16 +0000
committerRobert Bragg <robert@linux.intel.com>2012-02-21 13:26:14 +0000
commit479c5fd2c965b79ca19986150b2bb36f0e595e00 (patch)
treec1e9228b25b6aaa70eaab97df43d1ef33adbe5e4 /examples
parent785e6375ebd489438827c1cd64b3e238f1a6bae1 (diff)
downloadcogl-479c5fd2c965b79ca19986150b2bb36f0e595e00.tar.gz
onscreen: move swap_buffer apis to onscreen namespace
This moves all the cogl_framebuffer_ apis relating to swap buffer requests into the cogl_onscreen_ namespace since on CoglOnscreen framebuffers have back buffers that can be swapped. Reviewed-by: Neil Roberts <neil@linux.intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/cogl-crate.c8
-rw-r--r--examples/cogl-hello.c2
-rw-r--r--examples/cogl-msaa.c2
-rw-r--r--examples/cogl-sdl-hello.c2
-rw-r--r--examples/cogl-x11-foreign.c2
-rw-r--r--examples/cogl-x11-tfp.c2
-rw-r--r--examples/cogland.c2
7 files changed, 10 insertions, 10 deletions
diff --git a/examples/cogl-crate.c b/examples/cogl-crate.c
index cddd990d..f0a7bbd2 100644
--- a/examples/cogl-crate.c
+++ b/examples/cogl-crate.c
@@ -273,9 +273,9 @@ main (int argc, char **argv)
cogl_has_feature (ctx, COGL_FEATURE_ID_SWAP_BUFFERS_EVENT);
if (has_swap_notify)
- cogl_framebuffer_add_swap_buffers_callback (fb,
- swap_notify_cb,
- &data);
+ cogl_onscreen_add_swap_buffers_callback (COGL_ONSCREEN (fb),
+ swap_notify_cb,
+ &data);
while (1)
{
@@ -286,7 +286,7 @@ main (int argc, char **argv)
if (data.swap_ready)
{
paint (&data);
- cogl_framebuffer_swap_buffers (fb);
+ cogl_onscreen_swap_buffers (COGL_ONSCREEN (fb));
}
cogl_poll_get_info (ctx, &poll_fds, &n_poll_fds, &timeout);
diff --git a/examples/cogl-hello.c b/examples/cogl-hello.c
index 2896f243..4e3d5e24 100644
--- a/examples/cogl-hello.c
+++ b/examples/cogl-hello.c
@@ -41,7 +41,7 @@ main (int argc, char **argv)
cogl_framebuffer_clear4f (fb, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 1);
cogl_framebuffer_draw_primitive (fb, pipeline, triangle);
- cogl_framebuffer_swap_buffers (fb);
+ cogl_onscreen_swap_buffers (onscreen);
cogl_poll_get_info (ctx, &poll_fds, &n_poll_fds, &timeout);
g_poll ((GPollFD *) poll_fds, n_poll_fds, 0);
diff --git a/examples/cogl-msaa.c b/examples/cogl-msaa.c
index 320dbc2d..ba23b383 100644
--- a/examples/cogl-msaa.c
+++ b/examples/cogl-msaa.c
@@ -102,7 +102,7 @@ main (int argc, char **argv)
cogl_set_source_texture (tex);
cogl_rectangle (0, 1, 1, -1);
- cogl_framebuffer_swap_buffers (fb);
+ cogl_onscreen_swap_buffers (onscreen);
cogl_poll_get_info (ctx, &poll_fds, &n_poll_fds, &timeout);
g_poll ((GPollFD *) poll_fds, n_poll_fds, 0);
diff --git a/examples/cogl-sdl-hello.c b/examples/cogl-sdl-hello.c
index 057235c2..8643c38f 100644
--- a/examples/cogl-sdl-hello.c
+++ b/examples/cogl-sdl-hello.c
@@ -28,7 +28,7 @@ redraw (Data *data)
cogl_framebuffer_draw_primitive (fb, data->pipeline, data->triangle);
cogl_framebuffer_pop_matrix (fb);
- cogl_framebuffer_swap_buffers (fb);
+ cogl_onscreen_swap_buffers (COGL_ONSCREEN (fb));
}
static void
diff --git a/examples/cogl-x11-foreign.c b/examples/cogl-x11-foreign.c
index 202b8d25..7329a3fb 100644
--- a/examples/cogl-x11-foreign.c
+++ b/examples/cogl-x11-foreign.c
@@ -172,7 +172,7 @@ main (int argc, char **argv)
}
cogl_framebuffer_clear4f (fb, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 1);
cogl_framebuffer_draw_primitive (fb, pipeline, triangle);
- cogl_framebuffer_swap_buffers (fb);
+ cogl_onscreen_swap_buffers (onscreen);
cogl_poll_get_info (ctx, &poll_fds, &n_poll_fds, &timeout);
g_poll ((GPollFD *) poll_fds, n_poll_fds, 0);
diff --git a/examples/cogl-x11-tfp.c b/examples/cogl-x11-tfp.c
index 74ef45d4..78aafde0 100644
--- a/examples/cogl-x11-tfp.c
+++ b/examples/cogl-x11-tfp.c
@@ -217,7 +217,7 @@ main (int argc, char **argv)
cogl_framebuffer_clear4f (fb, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 1);
cogl_set_source_texture (tfp);
cogl_rectangle (-0.8, 0.8, 0.8, -0.8);
- cogl_framebuffer_swap_buffers (fb);
+ cogl_onscreen_swap_buffers (onscreen);
}
return 0;
diff --git a/examples/cogland.c b/examples/cogland.c
index 36c2cb34..ffcbe479 100644
--- a/examples/cogland.c
+++ b/examples/cogland.c
@@ -527,7 +527,7 @@ paint_cb (void *user_data)
cogl_rectangle (-1, 1, 1, -1);
}
}
- cogl_framebuffer_swap_buffers (fb);
+ cogl_onscreen_swap_buffers (COGL_ONSCREEN (fb));
cogl_pop_framebuffer ();
}