diff --git a/ChangeLog b/ChangeLog index 1ac46e6a7..5b298550f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2008-11-12 Neil Roberts + + Fix warnings in mesh tests + + * tests/conform/test-mesh-mutability.c (on_paint): + * tests/conform/test-mesh-interleved.c (on_paint): + * tests/conform/test-mesh-contiguous.c (on_paint): Use g_usleep + instead of sleep + + * tests/conform/test-mesh-mutability.c (queue_redraw): + * tests/conform/test-mesh-interleved.c (queue_redraw): + * tests/conform/test-mesh-contiguous.c (queue_redraw): Added + missing return statement + + * clutter/cogl/cogl-mesh.h: Add a declaration for + cogl_mesh_submit + + * clutter/cogl/common/cogl-mesh.c (cogl_mesh_submit): Move the + documentation to cogl-mesh.h to match the rest of the functions + 2008-11-10 Robert Bragg Bug 1164 - Implements the proposed Mesh API diff --git a/clutter/cogl/cogl-mesh.h b/clutter/cogl/cogl-mesh.h index 0ce3f83e5..e0c8f00c2 100644 --- a/clutter/cogl/cogl-mesh.h +++ b/clutter/cogl/cogl-mesh.h @@ -262,6 +262,19 @@ cogl_mesh_draw_range_elements (CoglHandle handle, GLenum type, const GLvoid *indices); +/** + * cogl_mesh_submit: + * @handle: A Cogl mesh handle + * + * This function copies all the user added attributes into a buffer object + * managed by the OpenGL driver. + * + * After the attributes have been submitted, then you may no longer add or + * remove attributes from a mesh, though you can enable or disable them. + */ +void +cogl_mesh_submit (CoglHandle handle); + /** * cogl_mesh_ref: * @handle: a @CoglHandle. diff --git a/clutter/cogl/common/cogl-mesh.c b/clutter/cogl/common/cogl-mesh.c index 5727dee9d..281b374c1 100644 --- a/clutter/cogl/common/cogl-mesh.c +++ b/clutter/cogl/common/cogl-mesh.c @@ -1094,16 +1094,6 @@ resolve_new_cogl_mesh_vbo (CoglMesh *mesh, } } -/** - * cogl_mesh_submit: - * @handle: A Cogl mesh handle - * - * This function copies all the user added attributes into a buffer object - * managed by the OpenGL driver. - * - * After the attributes have been submitted, then you may no longer add or - * remove attributes from a mesh, though you can enable or disable them. - */ void cogl_mesh_submit (CoglHandle handle) { diff --git a/tests/conform/test-mesh-contiguous.c b/tests/conform/test-mesh-contiguous.c index d1410fc07..a6f437103 100644 --- a/tests/conform/test-mesh-contiguous.c +++ b/tests/conform/test-mesh-contiguous.c @@ -101,7 +101,7 @@ on_paint (ClutterActor *actor, TestState *state) if (state->frame >= 2) validate_result (state); else - sleep (1); + g_usleep (G_USEC_PER_SEC); state->frame++; } @@ -110,6 +110,8 @@ static gboolean queue_redraw (gpointer stage) { clutter_actor_queue_redraw (CLUTTER_ACTOR (stage)); + + return TRUE; } void diff --git a/tests/conform/test-mesh-interleved.c b/tests/conform/test-mesh-interleved.c index f22ddb54d..e8e393f7d 100644 --- a/tests/conform/test-mesh-interleved.c +++ b/tests/conform/test-mesh-interleved.c @@ -76,7 +76,7 @@ on_paint (ClutterActor *actor, TestState *state) if (state->frame >= 2) validate_result (state); else - sleep (1); + g_usleep (G_USEC_PER_SEC); state->frame++; } @@ -85,6 +85,8 @@ static gboolean queue_redraw (gpointer stage) { clutter_actor_queue_redraw (CLUTTER_ACTOR (stage)); + + return TRUE; } void diff --git a/tests/conform/test-mesh-mutability.c b/tests/conform/test-mesh-mutability.c index 352b6049e..a8f8a31fe 100644 --- a/tests/conform/test-mesh-mutability.c +++ b/tests/conform/test-mesh-mutability.c @@ -116,7 +116,7 @@ on_paint (ClutterActor *actor, TestState *state) if (state->frame >= 2) validate_result (state); else - sleep (1); + g_usleep (G_USEC_PER_SEC); state->frame++; } @@ -125,6 +125,8 @@ static gboolean queue_redraw (gpointer stage) { clutter_actor_queue_redraw (CLUTTER_ACTOR (stage)); + + return TRUE; } void