aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_save_api.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-05-01 19:15:33 -0600
committerBrian Paul <[email protected]>2013-05-02 09:03:16 -0600
commit49993a1a9dc34b78ccd345b91087385917a40138 (patch)
tree5bcfe73f282e120f9652ffbe7ec53d58d9a3b008 /src/mesa/vbo/vbo_save_api.c
parent79679e258b7aa4b1dc672c03795d47456893f881 (diff)
mesa: simplify dispatch for glDraw* functions
Remove all the glDraw* functions from the GLvertexformat structure. The point of that dispatch struct is to handle all the functions which dispatch differently depending on whether we're inside glBegin/End. glDraw* are never allowed inside glBegin/End so we can remove those entries. This simplifies the code paths and gets rid of quite a bit of code. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_save_api.c')
-rw-r--r--src/mesa/vbo/vbo_save_api.c173
1 files changed, 0 insertions, 173 deletions
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 8644df828d4..a174ded2d29 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -993,162 +993,6 @@ _save_End(void)
}
-/* These are all errors as this vtxfmt is only installed inside
- * begin/end pairs.
- */
-static void GLAPIENTRY
-_save_DrawElements(GLenum mode, GLsizei count, GLenum type,
- const GLvoid * indices)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) count;
- (void) type;
- (void) indices;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawElements");
-}
-
-
-static void GLAPIENTRY
-_save_DrawRangeElements(GLenum mode, GLuint start, GLuint end,
- GLsizei count, GLenum type, const GLvoid * indices)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) start;
- (void) end;
- (void) count;
- (void) type;
- (void) indices;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawRangeElements");
-}
-
-
-static void GLAPIENTRY
-_save_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
- const GLvoid * indices, GLint basevertex)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) count;
- (void) type;
- (void) indices;
- (void) basevertex;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawElements");
-}
-
-
-static void GLAPIENTRY
-_save_DrawRangeElementsBaseVertex(GLenum mode,
- GLuint start,
- GLuint end,
- GLsizei count,
- GLenum type,
- const GLvoid * indices, GLint basevertex)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) start;
- (void) end;
- (void) count;
- (void) type;
- (void) indices;
- (void) basevertex;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawRangeElements");
-}
-
-
-static void GLAPIENTRY
-_save_DrawArrays(GLenum mode, GLint start, GLsizei count)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) start;
- (void) count;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawArrays");
-}
-
-
-static void GLAPIENTRY
-_save_MultiDrawElements(GLenum mode, const GLsizei *count, GLenum type,
- const GLvoid **indices, GLsizei primcount)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) count;
- (void) type;
- (void) indices;
- (void) primcount;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glMultiDrawElements");
-}
-
-
-static void GLAPIENTRY
-_save_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count,
- GLenum type, const GLvoid * const *indices,
- GLsizei primcount, const GLint *basevertex)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) count;
- (void) type;
- (void) indices;
- (void) primcount;
- (void) basevertex;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION,
- "glMultiDrawElementsBaseVertex");
-}
-
-
-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_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) name;
- (void) stream;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION,
- "glDrawTransformFeedbackStream");
-}
-
-
-static void GLAPIENTRY
-_save_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
- GLsizei primcount)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) name;
- (void) primcount;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION,
- "glDrawTransformFeedbackInstanced");
-}
-
-
-static void GLAPIENTRY
-_save_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
- GLuint stream, GLsizei primcount)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode;
- (void) name;
- (void) stream;
- (void) primcount;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION,
- "glDrawTransformFeedbackStreamInstanced");
-}
-
-
static void GLAPIENTRY
_save_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
{
@@ -1535,18 +1379,6 @@ _save_vtxfmt_init(struct gl_context *ctx)
*/
vfmt->Begin = _save_Begin;
vfmt->Rectf = _save_Rectf;
- vfmt->DrawArrays = _save_DrawArrays;
- vfmt->DrawElements = _save_DrawElements;
- vfmt->DrawRangeElements = _save_DrawRangeElements;
- vfmt->DrawElementsBaseVertex = _save_DrawElementsBaseVertex;
- vfmt->DrawRangeElementsBaseVertex = _save_DrawRangeElementsBaseVertex;
- vfmt->MultiDrawElementsEXT = _save_MultiDrawElements;
- vfmt->MultiDrawElementsBaseVertex = _save_MultiDrawElementsBaseVertex;
- vfmt->DrawTransformFeedback = _save_DrawTransformFeedback;
- vfmt->DrawTransformFeedbackStream = _save_DrawTransformFeedbackStream;
- vfmt->DrawTransformFeedbackInstanced = _save_DrawTransformFeedbackInstanced;
- vfmt->DrawTransformFeedbackStreamInstanced =
- _save_DrawTransformFeedbackStreamInstanced;
}
@@ -1762,9 +1594,4 @@ vbo_save_api_init(struct vbo_save_context *save)
* ctx->ListState.
*/
ctx->ListState.ListVtxfmt.Rectf = _save_OBE_Rectf;
- ctx->ListState.ListVtxfmt.DrawArrays = _save_OBE_DrawArrays;
- ctx->ListState.ListVtxfmt.DrawElements = _save_OBE_DrawElements;
- ctx->ListState.ListVtxfmt.DrawRangeElements = _save_OBE_DrawRangeElements;
- ctx->ListState.ListVtxfmt.MultiDrawElementsEXT = _save_OBE_MultiDrawElements;
- ctx->ListState.ListVtxfmt.MultiDrawElementsBaseVertex = _save_OBE_MultiDrawElementsBaseVertex;
}