summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/light.c
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2015-02-20 20:18:47 -0800
committerMatt Turner <[email protected]>2015-02-23 10:49:47 -0800
commitbfcdb843830bba0190e00e35e3c5c18c4bdb5de1 (patch)
treed4e8eebb5d58b3b1ac6caa383bfcda258b19c6c1 /src/mesa/main/light.c
parent52049f8fd83f2ef31c2a4d645cfb7d7b2ab518a6 (diff)
mesa: Use assert() instead of ASSERT wrapper.
Acked-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/light.c')
-rw-r--r--src/mesa/main/light.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index e483b826e91..7a1afd95930 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -101,7 +101,7 @@ _mesa_light(struct gl_context *ctx, GLuint lnum, GLenum pname, const GLfloat *pa
{
struct gl_light *light;
- ASSERT(lnum < MAX_LIGHTS);
+ assert(lnum < MAX_LIGHTS);
light = &ctx->Light.Light[lnum];
switch (pname) {
@@ -142,15 +142,15 @@ _mesa_light(struct gl_context *ctx, GLuint lnum, GLenum pname, const GLfloat *pa
COPY_3V(light->SpotDirection, params);
break;
case GL_SPOT_EXPONENT:
- ASSERT(params[0] >= 0.0);
- ASSERT(params[0] <= ctx->Const.MaxSpotExponent);
+ assert(params[0] >= 0.0);
+ assert(params[0] <= ctx->Const.MaxSpotExponent);
if (light->SpotExponent == params[0])
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
light->SpotExponent = params[0];
break;
case GL_SPOT_CUTOFF:
- ASSERT(params[0] == 180.0 || (params[0] >= 0.0 && params[0] <= 90.0));
+ assert(params[0] == 180.0 || (params[0] >= 0.0 && params[0] <= 90.0));
if (light->SpotCutoff == params[0])
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
@@ -164,21 +164,21 @@ _mesa_light(struct gl_context *ctx, GLuint lnum, GLenum pname, const GLfloat *pa
light->_Flags &= ~LIGHT_SPOT;
break;
case GL_CONSTANT_ATTENUATION:
- ASSERT(params[0] >= 0.0);
+ assert(params[0] >= 0.0);
if (light->ConstantAttenuation == params[0])
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
light->ConstantAttenuation = params[0];
break;
case GL_LINEAR_ATTENUATION:
- ASSERT(params[0] >= 0.0);
+ assert(params[0] >= 0.0);
if (light->LinearAttenuation == params[0])
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
light->LinearAttenuation = params[0];
break;
case GL_QUADRATIC_ATTENUATION:
- ASSERT(params[0] >= 0.0);
+ assert(params[0] >= 0.0);
if (light->QuadraticAttenuation == params[0])
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
@@ -808,7 +808,7 @@ _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params )
GLuint f;
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
- ASSERT(ctx->API == API_OPENGL_COMPAT);
+ assert(ctx->API == API_OPENGL_COMPAT);
FLUSH_VERTICES(ctx, 0); /* update materials */
FLUSH_CURRENT(ctx, 0); /* update ctx->Light.Material from vertex buffer */