Mesa (master): mesa: s/GL_POLYGON+1/PRIM_OUTSIDE_BEGIN_END/

Keith Whitwell keithw at kemper.freedesktop.org
Wed Sep 24 00:39:38 UTC 2008


Module: Mesa
Branch: master
Commit: 9acf207277b4de91b917b37a92f6b612f4710c80
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9acf207277b4de91b917b37a92f6b612f4710c80

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Tue Jun 17 11:31:45 2008 -0600

mesa: s/GL_POLYGON+1/PRIM_OUTSIDE_BEGIN_END/
(cherry picked from commit 8a369b909a6648ae7a5a0c2dcb972a2f96f99a80)

---

 src/mesa/vbo/vbo_exec_api.c  |   10 +++++-----
 src/mesa/vbo/vbo_exec_draw.c |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 0e7563b..f249289 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -68,7 +68,7 @@ static void vbo_exec_wrap_buffers( struct vbo_exec_context *exec )
       GLuint last_begin = exec->vtx.prim[exec->vtx.prim_count-1].begin;
       GLuint last_count;
 
-      if (exec->ctx->Driver.CurrentExecPrimitive != GL_POLYGON+1) {
+      if (exec->ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
 	 GLint i = exec->vtx.prim_count - 1;
 	 assert(i >= 0);
 	 exec->vtx.prim[i].count = (exec->vtx.vert_count - 
@@ -90,7 +90,7 @@ static void vbo_exec_wrap_buffers( struct vbo_exec_context *exec )
        */
       assert(exec->vtx.prim_count == 0);
 
-      if (exec->ctx->Driver.CurrentExecPrimitive != GL_POLYGON+1) {
+      if (exec->ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
 	 exec->vtx.prim[0].mode = exec->ctx->Driver.CurrentExecPrimitive;
 	 exec->vtx.prim[0].start = 0;
 	 exec->vtx.prim[0].count = 0;
@@ -504,7 +504,7 @@ static void GLAPIENTRY vbo_exec_Begin( GLenum mode )
 {
    GET_CURRENT_CONTEXT( ctx ); 
 
-   if (ctx->Driver.CurrentExecPrimitive == GL_POLYGON+1) {
+   if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END) {
       struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
       int i;
 
@@ -548,7 +548,7 @@ static void GLAPIENTRY vbo_exec_End( void )
 {
    GET_CURRENT_CONTEXT( ctx ); 
 
-   if (ctx->Driver.CurrentExecPrimitive != GL_POLYGON+1) {
+   if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
       struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
       int idx = exec->vtx.vert_count;
       int i = exec->vtx.prim_count - 1;
@@ -556,7 +556,7 @@ static void GLAPIENTRY vbo_exec_End( void )
       exec->vtx.prim[i].end = 1; 
       exec->vtx.prim[i].count = idx - exec->vtx.prim[i].start;
 
-      ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1;
+      ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
 
       if (exec->vtx.prim_count == VBO_MAX_PRIM)
 	 vbo_exec_vtx_flush( exec );	
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 5f737fd..86155d2 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -129,7 +129,7 @@ static GLuint vbo_copy_vertices( struct vbo_exec_context *exec )
       for (i = 0 ; i < ovf ; i++)
 	 _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) );
       return i;
-   case GL_POLYGON+1:
+   case PRIM_OUTSIDE_BEGIN_END:
       return 0;
    default:
       assert(0);




More information about the mesa-commit mailing list