diff --git a/clutter/cogl/common/cogl-primitives.h b/clutter/cogl/common/cogl-primitives.h index 0a54ec145..e792432b6 100644 --- a/clutter/cogl/common/cogl-primitives.h +++ b/clutter/cogl/common/cogl-primitives.h @@ -37,16 +37,6 @@ struct _floatVec2 float y; }; -#ifdef CLUTTER_COGL_HAS_GL - -typedef struct _CoglFloatVec2 CoglFloatVec2; - -struct _CoglFloatVec2 -{ - GLfloat x; - GLfloat y; -}; - struct _CoglPathNode { GLfloat x; @@ -54,17 +44,6 @@ struct _CoglPathNode guint path_size; }; -#else /* CLUTTER_COGL_HAS_GL */ - -struct _CoglPathNode -{ - GLfixed x; - GLfixed y; - guint path_size; -}; - -#endif /* CLUTTER_COGL_HAS_GL */ - struct _CoglBezQuad { floatVec2 p1; diff --git a/clutter/cogl/gles/cogl-primitives.c b/clutter/cogl/gles/cogl-primitives.c index 1a588056d..d0cba27c9 100644 --- a/clutter/cogl/gles/cogl-primitives.c +++ b/clutter/cogl/gles/cogl-primitives.c @@ -109,7 +109,7 @@ _cogl_path_stroke_nodes () CoglPathNode *path = &g_array_index (ctx->path_nodes, CoglPathNode, path_start); - GE( cogl_wrap_glVertexPointer (2, GL_FIXED, sizeof (CoglPathNode), + GE( cogl_wrap_glVertexPointer (2, GL_FLOAT, sizeof (CoglPathNode), (guchar *) path + G_STRUCT_OFFSET (CoglPathNode, x)) ); GE( cogl_wrap_glDrawArrays (GL_LINE_STRIP, 0, path->path_size) ); @@ -177,7 +177,7 @@ _cogl_add_path_to_stencil_buffer (floatVec2 nodes_min, { cogl_enable (COGL_ENABLE_VERTEX_ARRAY); - GE( cogl_wrap_glVertexPointer (2, GL_FIXED, sizeof (CoglPathNode), + GE( cogl_wrap_glVertexPointer (2, GL_FLOAT, sizeof (CoglPathNode), (guchar *) path + G_STRUCT_OFFSET (CoglPathNode, x)) ); GE( cogl_wrap_glDrawArrays (GL_TRIANGLE_FAN, 0, path->path_size) ); @@ -361,10 +361,10 @@ _cogl_path_fill_nodes_scanlines (CoglPathNode *path, if (!next) break; - x0 = (float)(GPOINTER_TO_INT (iter->data)); - x1 = (float)(GPOINTER_TO_INT (next->data)); - y0 = (float)(bounds_y + i); - y1 = (float)(bounds_y + i + 1) + 2048; + x0 = GPOINTER_TO_INT (iter->data); + x1 = GPOINTER_TO_INT (next->data); + y0 = bounds_y + i; + y1 = bounds_y + i + 1.0625f; /* render scanlines 1.0625 high to avoid gaps when transformed */ @@ -392,7 +392,7 @@ _cogl_path_fill_nodes_scanlines (CoglPathNode *path, /* render triangles */ cogl_enable (COGL_ENABLE_VERTEX_ARRAY | (ctx->color_alpha < 255 ? COGL_ENABLE_BLEND : 0)); - GE ( cogl_wrap_glVertexPointer (2, GL_FIXED, 0, coords ) ); + GE ( cogl_wrap_glVertexPointer (2, GL_FLOAT, 0, coords ) ); GE ( cogl_wrap_glDrawArrays (GL_TRIANGLES, 0, spans * 2 * 3)); g_free (coords); }