From 14bb957b996dcc5392b8fa589bd3ffa5c55cb6b4 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 9 Dec 2011 17:00:23 +0100 Subject: mesa: implement DrawTransformFeedback from ARB_transform_feedback2 It's like DrawArrays, but the count is taken from a transform feedback object. This removes DrawTransformFeedback from dd_function_table and adds the same function to GLvertexformat (with the function parameters matching GL). The vbo_draw_func callback has a new parameter "struct gl_transform_feedback_object *tfb_vertcount". The rest of the code just validates states and forwards the transform feedback object into vbo_draw_func. --- src/mesa/vbo/vbo_save_api.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mesa/vbo/vbo_save_api.c') diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 9d8bada04cf..9521367475e 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -998,6 +998,16 @@ _save_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, } +static void GLAPIENTRY +_save_DrawTransformFeedback(GLenum mode, GLuint name) +{ + GET_CURRENT_CONTEXT(ctx); + (void) mode; + (void) name; + _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawTransformFeedback"); +} + + static void GLAPIENTRY _save_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) { @@ -1347,6 +1357,7 @@ _save_vtxfmt_init(struct gl_context *ctx) vfmt->DrawRangeElements = _save_DrawRangeElements; vfmt->DrawElementsBaseVertex = _save_DrawElementsBaseVertex; vfmt->DrawRangeElementsBaseVertex = _save_DrawRangeElementsBaseVertex; + vfmt->DrawTransformFeedback = _save_DrawTransformFeedback; vfmt->MultiDrawElementsEXT = _save_MultiDrawElements; vfmt->MultiDrawElementsBaseVertex = _save_MultiDrawElementsBaseVertex; } -- cgit v1.2.3