diff options
author | Brian Paul <[email protected]> | 2003-07-07 16:46:27 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2003-07-07 16:46:27 +0000 |
commit | ef751eb08b055d3c5b86ee10edc834a8767b7bc3 (patch) | |
tree | a88fb870b1a7a655c5d33bb711eaaea399c36fe4 /src/mesa | |
parent | 92d31641d2116110da84a1b1fc1d882b7aa1b095 (diff) |
minor fixes in _mesa_TexGen[id]v() to silence valgrind
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/texstate.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index f27c346ec2f..9359c7b1b19 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -2154,9 +2154,14 @@ _mesa_TexGeniv(GLenum coord, GLenum pname, const GLint *params ) { GLfloat p[4]; p[0] = (GLfloat) params[0]; - p[1] = (GLfloat) params[1]; - p[2] = (GLfloat) params[2]; - p[3] = (GLfloat) params[3]; + if (pname == GL_TEXTURE_GEN_MODE) { + p[1] = p[2] = p[3] = 0.0F; + } + else { + p[1] = (GLfloat) params[1]; + p[2] = (GLfloat) params[2]; + p[3] = (GLfloat) params[3]; + } _mesa_TexGenfv(coord, pname, p); } @@ -2174,9 +2179,14 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params ) { GLfloat p[4]; p[0] = (GLfloat) params[0]; - p[1] = (GLfloat) params[1]; - p[2] = (GLfloat) params[2]; - p[3] = (GLfloat) params[3]; + if (pname == GL_TEXTURE_GEN_MODE) { + p[1] = p[2] = p[3] = 0.0F; + } + else { + p[1] = (GLfloat) params[1]; + p[2] = (GLfloat) params[2]; + p[3] = (GLfloat) params[3]; + } _mesa_TexGenfv( coord, pname, p ); } |