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

@@ -2408,57 +2408,6 @@ _cogl_framebuffer_draw_attributes (CoglFramebuffer *framebuffer,
}
}
void
cogl_framebuffer_draw_attributes (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
CoglVerticesMode mode,
int first_vertex,
int n_vertices,
CoglAttribute **attributes,
int n_attributes)
{
_cogl_framebuffer_draw_attributes (framebuffer,
pipeline,
mode,
first_vertex,
n_vertices,
attributes, n_attributes,
COGL_DRAW_SKIP_LEGACY_STATE);
}
void
cogl_framebuffer_vdraw_attributes (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
CoglVerticesMode mode,
int first_vertex,
int n_vertices,
...)
{
va_list ap;
int n_attributes;
CoglAttribute *attribute;
CoglAttribute **attributes;
int i;
va_start (ap, n_vertices);
for (n_attributes = 0; va_arg (ap, CoglAttribute *); n_attributes++)
;
va_end (ap);
attributes = g_alloca (sizeof (CoglAttribute *) * n_attributes);
va_start (ap, n_vertices);
for (i = 0; (attribute = va_arg (ap, CoglAttribute *)); i++)
attributes[i] = attribute;
va_end (ap);
_cogl_framebuffer_draw_attributes (framebuffer,
pipeline,
mode, first_vertex, n_vertices,
attributes, n_attributes,
COGL_DRAW_SKIP_LEGACY_STATE);
}
void
_cogl_framebuffer_draw_indexed_attributes (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
@@ -2498,62 +2447,6 @@ _cogl_framebuffer_draw_indexed_attributes (CoglFramebuffer *framebuffer,
}
}
void
cogl_framebuffer_draw_indexed_attributes (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
CoglVerticesMode mode,
int first_vertex,
int n_vertices,
CoglIndices *indices,
CoglAttribute **attributes,
int n_attributes)
{
_cogl_framebuffer_draw_indexed_attributes (framebuffer,
pipeline,
mode, first_vertex,
n_vertices, indices,
attributes, n_attributes,
COGL_DRAW_SKIP_LEGACY_STATE);
}
void
cogl_framebuffer_vdraw_indexed_attributes (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
CoglVerticesMode mode,
int first_vertex,
int n_vertices,
CoglIndices *indices,
...)
{
va_list ap;
int n_attributes;
CoglAttribute **attributes;
int i;
CoglAttribute *attribute;
va_start (ap, indices);
for (n_attributes = 0; va_arg (ap, CoglAttribute *); n_attributes++)
;
va_end (ap);
attributes = g_alloca (sizeof (CoglAttribute *) * n_attributes);
va_start (ap, indices);
for (i = 0; (attribute = va_arg (ap, CoglAttribute *)); i++)
attributes[i] = attribute;
va_end (ap);
_cogl_framebuffer_draw_indexed_attributes (framebuffer,
pipeline,
mode,
first_vertex,
n_vertices,
indices,
attributes,
n_attributes,
COGL_DRAW_SKIP_LEGACY_STATE);
}
void
cogl_framebuffer_draw_primitive (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,