framebuffer: remove attribute drawing apis

Almost nothing draws attributes directly and for those things that do
it's trivial to adapt them to instead draw via the cogl_primitive api.
This simplifies the Cogl api a bit.

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit 7395925bcc01aad6c695fd0d9af78b784b3c64d4)

Conflicts:
	cogl/cogl-framebuffer.c
	cogl/cogl-framebuffer.h
This commit is contained in:
Robert Bragg
2013-07-10 00:39:18 +01:00
committed by Neil Roberts
parent e9f721216e
commit e4f24dba75
10 changed files with 78 additions and 402 deletions

View File

@ -32,6 +32,7 @@ test_map_buffer_range (void)
CoglVertexP2T2 *data;
CoglAttribute *pos_attribute;
CoglAttribute *tex_coord_attribute;
CoglPrimitive *primitive;
tex = cogl_texture_2d_new_from_data (test_ctx,
2, 2, /* width/height */
@ -95,14 +96,14 @@ test_map_buffer_range (void)
COGL_BUFFER_BIT_COLOR,
0, 0, 0, 1);
cogl_framebuffer_vdraw_attributes (test_fb,
pipeline,
COGL_VERTICES_MODE_TRIANGLE_STRIP,
0, /* first_vertex */
4, /* n_vertices */
pos_attribute,
tex_coord_attribute,
NULL);
primitive =
cogl_primitive_new (COGL_VERTICES_MODE_TRIANGLE_STRIP,
4, /* n_vertices */
pos_attribute,
tex_coord_attribute,
NULL);
cogl_primitive_draw (primitive, test_fb, pipeline);
cogl_object_unref (primitive);
/* Top left pixel should be the one that is replaced to be green */
test_utils_check_pixel (test_fb, 1, 1, 0x00ff00ff);