projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesa/glsl: add bitmask to track stages a program was linked against
[mesa.git]
/
src
/
mesa
/
main
/
polygon.c
diff --git
a/src/mesa/main/polygon.c
b/src/mesa/main/polygon.c
index a1f0aa02da19e8198cf003a4172974355d7f7d0c..60af88f9857ca831da6b3beffc74acf73221b673 100644
(file)
--- a/
src/mesa/main/polygon.c
+++ b/
src/mesa/main/polygon.c
@@
-56,7
+56,7
@@
_mesa_CullFace( GLenum mode )
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE&VERBOSE_API)
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE&VERBOSE_API)
- _mesa_debug(ctx, "glCullFace %s\n", _mesa_
lookup_enum_by_nr
(mode));
+ _mesa_debug(ctx, "glCullFace %s\n", _mesa_
enum_to_string
(mode));
if (mode!=GL_FRONT && mode!=GL_BACK && mode!=GL_FRONT_AND_BACK) {
_mesa_error( ctx, GL_INVALID_ENUM, "glCullFace" );
if (mode!=GL_FRONT && mode!=GL_BACK && mode!=GL_FRONT_AND_BACK) {
_mesa_error( ctx, GL_INVALID_ENUM, "glCullFace" );
@@
-91,16
+91,16
@@
_mesa_FrontFace( GLenum mode )
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE&VERBOSE_API)
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE&VERBOSE_API)
- _mesa_debug(ctx, "glFrontFace %s\n", _mesa_lookup_enum_by_nr(mode));
+ _mesa_debug(ctx, "glFrontFace %s\n", _mesa_enum_to_string(mode));
+
+ if (ctx->Polygon.FrontFace == mode)
+ return;
if (mode!=GL_CW && mode!=GL_CCW) {
_mesa_error( ctx, GL_INVALID_ENUM, "glFrontFace" );
return;
}
if (mode!=GL_CW && mode!=GL_CCW) {
_mesa_error( ctx, GL_INVALID_ENUM, "glFrontFace" );
return;
}
- if (ctx->Polygon.FrontFace == mode)
- return;
-
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.FrontFace = mode;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.FrontFace = mode;
@@
-128,8
+128,8
@@
_mesa_PolygonMode( GLenum face, GLenum mode )
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glPolygonMode %s %s\n",
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glPolygonMode %s %s\n",
- _mesa_
lookup_enum_by_nr
(face),
- _mesa_
lookup_enum_by_nr
(mode));
+ _mesa_
enum_to_string
(face),
+ _mesa_
enum_to_string
(mode));
if (mode!=GL_POINT && mode!=GL_LINE && mode!=GL_FILL) {
_mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(mode)" );
if (mode!=GL_POINT && mode!=GL_LINE && mode!=GL_FILL) {
_mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(mode)" );