diff options
author | Brian Paul <[email protected]> | 2013-05-01 19:15:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-05-02 09:03:16 -0600 |
commit | 0f365b2d77e35391283998dbf1311a4aae3cc760 (patch) | |
tree | 6b19a8b507784b6c6cef3fd3240657fe842ff54e /src/mesa/vbo/vbo_exec_array.c | |
parent | 49993a1a9dc34b78ccd345b91087385917a40138 (diff) |
mesa: remove GLvertexformat::Rectf()
As with the glDraw* functions, this doesn't have to be in GLvertexformat.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r-- | src/mesa/vbo/vbo_exec_array.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 18011ec125e..f1abe0490c4 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -632,6 +632,23 @@ vbo_draw_arrays(struct gl_context *ctx, GLenum mode, GLint start, } +/** + * Execute a glRectf() function. + */ +static void GLAPIENTRY +vbo_exec_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + CALL_Begin(GET_DISPATCH(), (GL_QUADS)); + CALL_Vertex2f(GET_DISPATCH(), (x1, y1)); + CALL_Vertex2f(GET_DISPATCH(), (x2, y1)); + CALL_Vertex2f(GET_DISPATCH(), (x2, y2)); + CALL_Vertex2f(GET_DISPATCH(), (x1, y2)); + CALL_End(GET_DISPATCH(), ()); +} + /** * Called from glDrawArrays when in immediate mode (not display list mode). @@ -1381,6 +1398,10 @@ vbo_initialize_exec_dispatch(const struct gl_context *ctx, SET_MultiDrawElementsEXT(exec, vbo_exec_MultiDrawElements); + if (ctx->API == API_OPENGL_COMPAT) { + SET_Rectf(exec, vbo_exec_Rectf); + } + if (_mesa_is_desktop_gl(ctx)) { SET_DrawElementsBaseVertex(exec, vbo_exec_DrawElementsBaseVertex); SET_DrawRangeElementsBaseVertex(exec, vbo_exec_DrawRangeElementsBaseVertex); |