Quellcode durchsuchen

- Minor cleanups of ctx->Driver.Current*Primitive usage.

- Remove unused gl_reduce_prim array.
tags/mesa_3_5
Gareth Hughes vor 24 Jahren
Ursprung
Commit
425fea1c34
3 geänderte Dateien mit 7 neuen und 22 gelöschten Zeilen
  1. 1
    15
      src/mesa/main/context.c
  2. 3
    3
      src/mesa/main/dlist.h
  3. 3
    4
      src/mesa/main/mtypes.h

+ 1
- 15
src/mesa/main/context.c Datei anzeigen

@@ -1,4 +1,4 @@
/* $Id: context.c,v 1.129 2001/03/18 08:53:49 gareth Exp $ */
/* $Id: context.c,v 1.130 2001/03/24 06:01:27 gareth Exp $ */

/*
* Mesa 3-D graphics library
@@ -2032,17 +2032,3 @@ const char *_mesa_prim_name[GL_POLYGON+4] = {
"inside unkown primitive",
"unknown state"
};


GLenum gl_reduce_prim[GL_POLYGON+1] = {
GL_POINTS,
GL_LINES,
GL_LINES,
GL_LINES,
GL_TRIANGLES,
GL_TRIANGLES,
GL_TRIANGLES,
GL_TRIANGLES,
GL_TRIANGLES,
GL_TRIANGLES,
};

+ 3
- 3
src/mesa/main/dlist.h Datei anzeigen

@@ -1,4 +1,4 @@
/* $Id: dlist.h,v 1.15 2001/03/24 05:23:46 gareth Exp $ */
/* $Id: dlist.h,v 1.16 2001/03/24 06:01:27 gareth Exp $ */

/*
* Mesa 3-D graphics library
@@ -34,7 +34,7 @@

#define ASSERT_OUTSIDE_SAVE_BEGIN_END_WITH_RETVAL(ctx, retval) \
do { \
if (ctx->Driver.CurrentSavePrimitive < GL_POLYGON+1 || \
if (ctx->Driver.CurrentSavePrimitive <= GL_POLYGON || \
ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM) { \
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \
return retval; \
@@ -43,7 +43,7 @@ do { \

#define ASSERT_OUTSIDE_SAVE_BEGIN_END(ctx) \
do { \
if (ctx->Driver.CurrentSavePrimitive < GL_POLYGON+1 || \
if (ctx->Driver.CurrentSavePrimitive <= GL_POLYGON || \
ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM) { \
_mesa_compile_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \
return; \

+ 3
- 4
src/mesa/main/mtypes.h Datei anzeigen

@@ -1,4 +1,4 @@
/* $Id: mtypes.h,v 1.30 2001/03/23 06:07:31 gareth Exp $ */
/* $Id: mtypes.h,v 1.31 2001/03/24 06:01:27 gareth Exp $ */

/*
* Mesa 3-D graphics library
@@ -1624,7 +1624,6 @@ struct __GLcontextRec {

/* The string names for GL_POINT, GL_LINE_LOOP, etc */
extern const char *_mesa_prim_name[GL_POLYGON+4];
extern GLenum gl_reduce_prim[];


#ifdef MESA_DEBUG
@@ -1680,7 +1679,7 @@ do { \

#define ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, retval) \
do { \
if (ctx->Driver.CurrentExecPrimitive != GL_POLYGON+1) { \
if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) { \
_mesa_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \
return retval; \
} \
@@ -1688,7 +1687,7 @@ do { \

#define ASSERT_OUTSIDE_BEGIN_END(ctx) \
do { \
if (ctx->Driver.CurrentExecPrimitive != GL_POLYGON+1) { \
if (ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) { \
_mesa_error( ctx, GL_INVALID_OPERATION, "begin/end" ); \
return; \
} \

Laden…
Abbrechen
Speichern