aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/light.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/light.c')
-rw-r--r--mesalib/src/mesa/main/light.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/light.c b/mesalib/src/mesa/main/light.c
index 10c89f436..654faa5c7 100644
--- a/mesalib/src/mesa/main/light.c
+++ b/mesalib/src/mesa/main/light.c
@@ -206,7 +206,10 @@ _mesa_light(GLcontext *ctx, GLuint lnum, GLenum pname, const GLfloat *params)
void GLAPIENTRY
_mesa_Lightf( GLenum light, GLenum pname, GLfloat param )
{
- _mesa_Lightfv( light, pname, &param );
+ GLfloat fparam[4];
+ fparam[0] = param;
+ fparam[1] = fparam[2] = fparam[3] = 0.0F;
+ _mesa_Lightfv( light, pname, fparam );
}
@@ -285,7 +288,10 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params )
void GLAPIENTRY
_mesa_Lighti( GLenum light, GLenum pname, GLint param )
{
- _mesa_Lightiv( light, pname, &param );
+ GLint iparam[4];
+ iparam[0] = param;
+ iparam[1] = iparam[2] = iparam[3] = 0;
+ _mesa_Lightiv( light, pname, iparam );
}
@@ -537,14 +543,20 @@ _mesa_LightModeliv( GLenum pname, const GLint *params )
void GLAPIENTRY
_mesa_LightModeli( GLenum pname, GLint param )
{
- _mesa_LightModeliv( pname, &param );
+ GLint iparam[4];
+ iparam[0] = param;
+ iparam[1] = iparam[2] = iparam[3] = 0;
+ _mesa_LightModeliv( pname, iparam );
}
void GLAPIENTRY
_mesa_LightModelf( GLenum pname, GLfloat param )
{
- _mesa_LightModelfv( pname, &param );
+ GLfloat fparam[4];
+ fparam[0] = param;
+ fparam[1] = fparam[2] = fparam[3] = 0.0F;
+ _mesa_LightModelfv( pname, fparam );
}
@@ -636,7 +648,7 @@ _mesa_update_material( GLcontext *ctx, GLuint bitmask )
struct gl_light *light, *list = &ctx->Light.EnabledList;
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
- if (MESA_VERBOSE&VERBOSE_IMMEDIATE)
+ if (MESA_VERBOSE & VERBOSE_MATERIAL)
_mesa_debug(ctx, "_mesa_update_material, mask 0x%x\n", bitmask);
if (!bitmask)