summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-02-21 15:11:44 -0700
committerBrian Paul <[email protected]>2011-02-21 15:15:52 -0700
commit6f027ba20d6bb642f1d05cc3ad63169e4f3196e1 (patch)
tree1d29a986e936f725d97a6d10f5c13acff320d2dc /src/mesa
parentbbd756e824c8d37bc7f8e9138466e8cad067afc5 (diff)
vbo: make vbo_exec_FlushVertices_internal() static
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/vbo/vbo_exec.h1
-rw-r--r--src/mesa/vbo/vbo_exec_api.c41
2 files changed, 20 insertions, 22 deletions
diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h
index d56c91cd094..ca100e428d2 100644
--- a/src/mesa/vbo/vbo_exec.h
+++ b/src/mesa/vbo/vbo_exec.h
@@ -152,7 +152,6 @@ struct vbo_exec_context
void vbo_exec_init( struct gl_context *ctx );
void vbo_exec_destroy( struct gl_context *ctx );
void vbo_exec_invalidate_state( struct gl_context *ctx, GLuint new_state );
-void vbo_exec_FlushVertices_internal( struct gl_context *ctx, GLboolean unmap );
void vbo_exec_BeginVertices( struct gl_context *ctx );
void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags );
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 0e1fb3df46d..19bcd0b307d 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -533,6 +533,24 @@ static void GLAPIENTRY vbo_exec_EvalPoint2( GLint i, GLint j )
/**
+ * Flush (draw) vertices.
+ * \param unmap - leave VBO unmapped after flushing?
+ */
+static void
+vbo_exec_FlushVertices_internal(struct vbo_exec_context *exec, GLboolean unmap)
+{
+ if (exec->vtx.vert_count || unmap) {
+ vbo_exec_vtx_flush( exec, unmap );
+ }
+
+ if (exec->vtx.vertex_size) {
+ vbo_exec_copy_to_current( exec );
+ reset_attrfv( exec );
+ }
+}
+
+
+/**
* Called via glBegin.
*/
static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
@@ -558,7 +576,7 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
* begin/end pairs.
*/
if (exec->vtx.vertex_size && !exec->vtx.attrsz[0])
- vbo_exec_FlushVertices_internal( ctx, GL_FALSE );
+ vbo_exec_FlushVertices_internal(exec, GL_FALSE);
i = exec->vtx.prim_count++;
exec->vtx.prim[i].mode = mode;
@@ -926,25 +944,6 @@ void vbo_exec_BeginVertices( struct gl_context *ctx )
/**
- * Flush (draw) vertices.
- * \param unmap - leave VBO unmapped after flushing?
- */
-void vbo_exec_FlushVertices_internal( struct gl_context *ctx, GLboolean unmap )
-{
- struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
-
- if (exec->vtx.vert_count || unmap) {
- vbo_exec_vtx_flush( exec, unmap );
- }
-
- if (exec->vtx.vertex_size) {
- vbo_exec_copy_to_current( exec );
- reset_attrfv( exec );
- }
-}
-
-
-/**
* \param flags bitmask of FLUSH_STORED_VERTICES, FLUSH_UPDATE_CURRENT
*/
void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
@@ -966,7 +965,7 @@ void vbo_exec_FlushVertices( struct gl_context *ctx, GLuint flags )
}
/* Flush (draw), and make sure VBO is left unmapped when done */
- vbo_exec_FlushVertices_internal( ctx, GL_TRUE );
+ vbo_exec_FlushVertices_internal(exec, GL_TRUE);
/* Need to do this to ensure BeginVertices gets called again:
*/