-/* $Id: stencil.c,v 1.6 1999/10/13 18:42:50 brianp Exp $ */
+/* $Id: stencil.c,v 1.7 1999/11/05 06:43:10 brianp Exp $ */
/*
* Mesa 3-D graphics library
}
maxref = (1 << STENCIL_BITS) - 1;
- ctx->Stencil.Ref = CLAMP( ref, 0, maxref );
- ctx->Stencil.ValueMask = mask;
+ ctx->Stencil.Ref = (GLstencil) CLAMP( ref, 0, maxref );
+ ctx->Stencil.ValueMask = (GLstencil) mask;
if (ctx->Driver.StencilFunc) {
(*ctx->Driver.StencilFunc)( ctx, func, ctx->Stencil.Ref, mask );
{
const GLstencil ref = ctx->Stencil.Ref;
const GLstencil wrtmask = ctx->Stencil.WriteMask;
- const GLstencil invmask = ~ctx->Stencil.WriteMask;
+ const GLstencil invmask = (GLstencil) (~ctx->Stencil.WriteMask);
GLstencil *stencil = STENCIL_ADDRESS( x, y );
GLuint i;
else {
for (i=0;i<n;i++) {
if (mask[i]) {
- stencil[i] = stencil[i] & invmask;
+ stencil[i] = (GLstencil) (stencil[i] & invmask);
}
}
}
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil s = stencil[i];
- stencil[i] = (invmask & s ) | (wrtmask & ref);
+ stencil[i] = (GLstencil) ((invmask & s ) | (wrtmask & ref));
}
}
}
if (mask[i]) {
GLstencil s = stencil[i];
if (s < STENCIL_MAX) {
- stencil[i] = s+1;
+ stencil[i] = (GLstencil) (s+1);
}
}
}
/* VERIFY logic of adding 1 to a write-masked value */
GLstencil s = stencil[i];
if (s < STENCIL_MAX) {
- stencil[i] = (invmask & s) | (wrtmask & (s+1));
+ stencil[i] = (GLstencil) ((invmask & s) | (wrtmask & (s+1)));
}
}
}
if (mask[i]) {
GLstencil s = stencil[i];
if (s>0) {
- stencil[i] = s-1;
+ stencil[i] = (GLstencil) (s-1);
}
}
}
/* VERIFY logic of subtracting 1 to a write-masked value */
GLstencil s = stencil[i];
if (s>0) {
- stencil[i] = (invmask & s) | (wrtmask & (s-1));
+ stencil[i] = (GLstencil) ((invmask & s) | (wrtmask & (s-1)));
}
}
}
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil s = stencil[i];
- stencil[i] = (invmask & s) | (wrtmask & (stencil[i]+1));
+ stencil[i] = (GLstencil) ((invmask & s) | (wrtmask & (stencil[i]+1)));
}
}
}
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil s = stencil[i];
- stencil[i] = (invmask & s) | (wrtmask & (stencil[i]-1));
+ stencil[i] = (GLstencil) ((invmask & s) | (wrtmask & (stencil[i]-1)));
}
}
}
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil s = stencil[i];
- stencil[i] = (invmask & s) | (wrtmask & ~s);
+ stencil[i] = (GLstencil) ((invmask & s) | (wrtmask & ~s));
}
}
}
allfail = 1;
break;
case GL_LESS:
- r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
+ r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
- s = stencil[i] & ctx->Stencil.ValueMask;
+ s = (GLstencil) (stencil[i] & ctx->Stencil.ValueMask);
if (r < s) {
/* passed */
fail[i] = 0;
}
break;
case GL_LEQUAL:
- r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
+ r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
- s = stencil[i] & ctx->Stencil.ValueMask;
+ s = (GLstencil) (stencil[i] & ctx->Stencil.ValueMask);
if (r <= s) {
/* pass */
fail[i] = 0;
}
break;
case GL_GREATER:
- r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
+ r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
- s = stencil[i] & ctx->Stencil.ValueMask;
+ s = (GLstencil) (stencil[i] & ctx->Stencil.ValueMask);
if (r > s) {
/* passed */
fail[i] = 0;
}
break;
case GL_GEQUAL:
- r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
+ r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
- s = stencil[i] & ctx->Stencil.ValueMask;
+ s = (GLstencil) (stencil[i] & ctx->Stencil.ValueMask);
if (r >= s) {
/* passed */
fail[i] = 0;
}
break;
case GL_EQUAL:
- r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
+ r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
- s = stencil[i] & ctx->Stencil.ValueMask;
+ s = (GLstencil) (stencil[i] & ctx->Stencil.ValueMask);
if (r == s) {
/* passed */
fail[i] = 0;
r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
for (i=0;i<n;i++) {
if (mask[i]) {
- s = stencil[i] & ctx->Stencil.ValueMask;
+ s = (GLstencil) (stencil[i] & ctx->Stencil.ValueMask);
if (r != s) {
/* passed */
fail[i] = 0;
GLstencil wrtmask, invmask;
wrtmask = ctx->Stencil.WriteMask;
- invmask = ~ctx->Stencil.WriteMask;
+ invmask = (GLstencil) (~ctx->Stencil.WriteMask);
ref = ctx->Stencil.Ref;
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
- *sptr = invmask & *sptr;
+ *sptr = (GLstencil) (invmask & *sptr);
}
}
}
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
- *sptr = (invmask & *sptr ) | (wrtmask & ref);
+ *sptr = (GLstencil) ((invmask & *sptr ) | (wrtmask & ref));
}
}
}
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
if (*sptr < STENCIL_MAX) {
- *sptr = *sptr + 1;
+ *sptr = (GLstencil) (*sptr + 1);
}
}
}
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
if (*sptr < STENCIL_MAX) {
- *sptr = (invmask & *sptr) | (wrtmask & (*sptr+1));
+ *sptr = (GLstencil) ((invmask & *sptr) | (wrtmask & (*sptr+1)));
}
}
}
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
if (*sptr>0) {
- *sptr = *sptr - 1;
+ *sptr = (GLstencil) (*sptr - 1);
}
}
}
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
if (*sptr>0) {
- *sptr = (invmask & *sptr) | (wrtmask & (*sptr-1));
+ *sptr = (GLstencil) ((invmask & *sptr) | (wrtmask & (*sptr-1)));
}
}
}
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
- *sptr = *sptr + 1;
+ *sptr = (GLstencil) (*sptr + 1);
}
}
}
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
- *sptr = (invmask & *sptr) | (wrtmask & (*sptr+1));
+ *sptr = (GLstencil) ((invmask & *sptr) | (wrtmask & (*sptr+1)));
}
}
}
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
- *sptr = *sptr - 1;
+ *sptr = (GLstencil) (*sptr - 1);
}
}
}
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
- *sptr = (invmask & *sptr) | (wrtmask & (*sptr-1));
+ *sptr = (GLstencil) ((invmask & *sptr) | (wrtmask & (*sptr-1)));
}
}
}
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
- *sptr = ~*sptr;
+ *sptr = (GLstencil) (~*sptr);
}
}
}
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS( x[i], y[i] );
- *sptr = (invmask & *sptr) | (wrtmask & ~*sptr);
+ *sptr = (GLstencil) ((invmask & *sptr) | (wrtmask & ~*sptr));
}
}
}
allfail = 1;
break;
case GL_LESS:
- r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
+ r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS(x[i],y[i]);
- s = *sptr & ctx->Stencil.ValueMask;
+ s = (GLstencil) (*sptr & ctx->Stencil.ValueMask);
if (r < s) {
/* passed */
fail[i] = 0;
}
break;
case GL_LEQUAL:
- r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
+ r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS(x[i],y[i]);
- s = *sptr & ctx->Stencil.ValueMask;
+ s = (GLstencil) (*sptr & ctx->Stencil.ValueMask);
if (r <= s) {
/* pass */
fail[i] = 0;
}
break;
case GL_GREATER:
- r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
+ r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS(x[i],y[i]);
- s = *sptr & ctx->Stencil.ValueMask;
+ s = (GLstencil) (*sptr & ctx->Stencil.ValueMask);
if (r > s) {
/* passed */
fail[i] = 0;
}
break;
case GL_GEQUAL:
- r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
+ r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS(x[i],y[i]);
- s = *sptr & ctx->Stencil.ValueMask;
+ s = (GLstencil) (*sptr & ctx->Stencil.ValueMask);
if (r >= s) {
/* passed */
fail[i] = 0;
}
break;
case GL_EQUAL:
- r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
+ r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS(x[i],y[i]);
- s = *sptr & ctx->Stencil.ValueMask;
+ s = (GLstencil) (*sptr & ctx->Stencil.ValueMask);
if (r == s) {
/* passed */
fail[i] = 0;
}
break;
case GL_NOTEQUAL:
- r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
+ r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil *sptr = STENCIL_ADDRESS(x[i],y[i]);
- s = *sptr & ctx->Stencil.ValueMask;
+ s = (GLstencil) (*sptr & ctx->Stencil.ValueMask);
if (r != s) {
/* passed */
fail[i] = 0;
-/* $Id: teximage.c,v 1.9 1999/11/03 17:27:05 brianp Exp $ */
+/* $Id: teximage.c,v 1.10 1999/11/05 06:43:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
GLint srcRow = 7 - i % 8;
for (j=0;j<width;j++) {
GLint srcCol = j % 32;
- GLubyte texel = (message[srcRow][srcCol]=='X') ? 255 : 70;
+ GLint texel = (message[srcRow][srcCol]=='X') ? 255 : 70;
for (k=0;k<components;k++) {
- *imgPtr++ = texel;
+ *imgPtr++ = (GLubyte) texel;
}
}
}
texture_error_check( GLcontext *ctx, GLenum target,
GLint level, GLint internalFormat,
GLenum format, GLenum type,
- GLint dimensions,
+ GLuint dimensions,
GLint width, GLint height,
GLint depth, GLint border )
{
GLint iformat;
if (dimensions == 1) {
- isProxy = (target == GL_PROXY_TEXTURE_1D);
+ isProxy = (GLboolean) (target == GL_PROXY_TEXTURE_1D);
if (target != GL_TEXTURE_1D && !isProxy) {
gl_error( ctx, GL_INVALID_ENUM, "glTexImage1D(target)" );
return GL_TRUE;
}
}
else if (dimensions == 2) {
- isProxy = (target == GL_PROXY_TEXTURE_2D);
+ isProxy = (GLboolean) (target == GL_PROXY_TEXTURE_2D);
if (target != GL_TEXTURE_2D && !isProxy) {
gl_error( ctx, GL_INVALID_ENUM, "glTexImage2D(target)" );
return GL_TRUE;
}
}
else if (dimensions == 3) {
- isProxy = (target == GL_PROXY_TEXTURE_3D);
+ isProxy = (GLboolean) (target == GL_PROXY_TEXTURE_3D);
if (target != GL_TEXTURE_3D && !isProxy) {
gl_error( ctx, GL_INVALID_ENUM, "glTexImage3D(target)" );
return GL_TRUE;
copytexsubimage_error_check( GLcontext *ctx, GLint dimensions,
GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
- GLint x, GLint y, GLsizei width, GLsizei height )
+ GLsizei width, GLsizei height )
{
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
struct gl_texture_image *teximage;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCopyTexSubImage1D");
if (!copytexsubimage_error_check(ctx, 1, target, level,
- xoffset, 0, 0, x, y, width, 1)) {
+ xoffset, 0, 0, width, 1)) {
struct gl_texture_unit *texUnit;
struct gl_texture_image *teximage;
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCopyTexSubImage2D");
if (!copytexsubimage_error_check(ctx, 2, target, level,
- xoffset, yoffset, 0, x, y, width, height)) {
+ xoffset, yoffset, 0, width, height)) {
struct gl_texture_unit *texUnit;
struct gl_texture_image *teximage;
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCopyTexSubImage3D");
if (!copytexsubimage_error_check(ctx, 3, target, level,
- xoffset, yoffset, zoffset, x, y, width, height)) {
+ xoffset, yoffset, zoffset, width, height)) {
struct gl_texture_unit *texUnit;
struct gl_texture_image *teximage;
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
-/* $Id: texobj.c,v 1.6 1999/10/13 18:42:50 brianp Exp $ */
+/* $Id: texobj.c,v 1.7 1999/11/05 06:43:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
struct gl_texture_object *oldTexObj;
struct gl_texture_object *newTexObj;
- GLint dim;
+ GLuint dim;
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
fprintf(stderr, "glBindTexture %s %d\n",
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glBindTexture");
- dim = target - GL_TEXTURE_1D;
+ dim = (GLuint) (target - GL_TEXTURE_1D);
if (dim < 0 || dim > 2) {
gl_error( ctx, GL_INVALID_ENUM, "glBindTexture" );
-/* $Id: texstate.c,v 1.3 1999/10/08 09:27:11 keithw Exp $ */
+/* $Id: texstate.c,v 1.4 1999/11/05 06:43:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
}
}
else if (pname==GL_TEXTURE_ENV_COLOR) {
- texUnit->EnvColor[0] = CLAMP( param[0], 0.0, 1.0 );
- texUnit->EnvColor[1] = CLAMP( param[1], 0.0, 1.0 );
- texUnit->EnvColor[2] = CLAMP( param[2], 0.0, 1.0 );
- texUnit->EnvColor[3] = CLAMP( param[3], 0.0, 1.0 );
+ texUnit->EnvColor[0] = CLAMP( param[0], 0.0F, 1.0F );
+ texUnit->EnvColor[1] = CLAMP( param[1], 0.0F, 1.0F );
+ texUnit->EnvColor[2] = CLAMP( param[2], 0.0F, 1.0F );
+ texUnit->EnvColor[3] = CLAMP( param[3], 0.0F, 1.0F );
}
else {
gl_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname)" );
}
break;
case GL_TEXTURE_BORDER_COLOR:
- texObj->BorderColor[0] = CLAMP((GLint)(params[0]*255.0), 0, 255);
- texObj->BorderColor[1] = CLAMP((GLint)(params[1]*255.0), 0, 255);
- texObj->BorderColor[2] = CLAMP((GLint)(params[2]*255.0), 0, 255);
- texObj->BorderColor[3] = CLAMP((GLint)(params[3]*255.0), 0, 255);
+ texObj->BorderColor[0] = (GLubyte) CLAMP((GLint)(params[0]*255.0), 0, 255);
+ texObj->BorderColor[1] = (GLubyte) CLAMP((GLint)(params[1]*255.0), 0, 255);
+ texObj->BorderColor[2] = (GLubyte) CLAMP((GLint)(params[2]*255.0), 0, 255);
+ texObj->BorderColor[3] = (GLubyte) CLAMP((GLint)(params[3]*255.0), 0, 255);
break;
case GL_TEXTURE_MIN_LOD:
texObj->MinLod = params[0];
break;
case GL_TEXTURE_PRIORITY:
/* (keithh@netcomuk.co.uk) */
- texObj->Priority = CLAMP( params[0], 0.0, 1.0 );
+ texObj->Priority = CLAMP( params[0], 0.0F, 1.0F );
break;
default:
gl_error( ctx, GL_INVALID_ENUM, "glTexParameter(pname)" );
*params = obj->MaxLod;
break;
case GL_TEXTURE_BASE_LEVEL:
- *params = obj->BaseLevel;
+ *params = (GLfloat) obj->BaseLevel;
break;
case GL_TEXTURE_MAX_LEVEL:
- *params = obj->MaxLevel;
+ *params = (GLfloat) obj->MaxLevel;
break;
default:
gl_error( ctx, GL_INVALID_ENUM, "glGetTexParameterfv(pname)" );
case GL_TEXTURE_BORDER_COLOR:
{
GLfloat color[4];
- color[0] = obj->BorderColor[0]/255.0;
- color[1] = obj->BorderColor[1]/255.0;
- color[2] = obj->BorderColor[2]/255.0;
- color[3] = obj->BorderColor[3]/255.0;
+ color[0] = obj->BorderColor[0] / 255.0F;
+ color[1] = obj->BorderColor[1] / 255.0F;
+ color[2] = obj->BorderColor[2] / 255.0F;
+ color[3] = obj->BorderColor[3] / 255.0F;
params[0] = FLOAT_TO_INT( color[0] );
params[1] = FLOAT_TO_INT( color[1] );
params[2] = FLOAT_TO_INT( color[2] );
params[0] = texUnit->GenModeS;
}
else if (pname==GL_OBJECT_PLANE) {
- COPY_4V( params, texUnit->ObjectPlaneS );
+ params[0] = (GLint) texUnit->ObjectPlaneS[0];
+ params[1] = (GLint) texUnit->ObjectPlaneS[1];
+ params[2] = (GLint) texUnit->ObjectPlaneS[2];
+ params[3] = (GLint) texUnit->ObjectPlaneS[3];
}
else if (pname==GL_EYE_PLANE) {
- COPY_4V( params, texUnit->EyePlaneS );
+ params[0] = (GLint) texUnit->EyePlaneS[0];
+ params[1] = (GLint) texUnit->EyePlaneS[1];
+ params[2] = (GLint) texUnit->EyePlaneS[2];
+ params[3] = (GLint) texUnit->EyePlaneS[3];
}
else {
gl_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" );
break;
case GL_T:
if (pname==GL_TEXTURE_GEN_MODE) {
- params[0] = texUnit->GenModeT;
+ params[0] = (GLint) texUnit->GenModeT;
}
else if (pname==GL_OBJECT_PLANE) {
- COPY_4V( params, texUnit->ObjectPlaneT );
+ params[0] = (GLint) texUnit->ObjectPlaneT[0];
+ params[1] = (GLint) texUnit->ObjectPlaneT[1];
+ params[2] = (GLint) texUnit->ObjectPlaneT[2];
+ params[3] = (GLint) texUnit->ObjectPlaneT[3];
}
else if (pname==GL_EYE_PLANE) {
- COPY_4V( params, texUnit->EyePlaneT );
+ params[0] = (GLint) texUnit->EyePlaneT[0];
+ params[1] = (GLint) texUnit->EyePlaneT[1];
+ params[2] = (GLint) texUnit->EyePlaneT[2];
+ params[3] = (GLint) texUnit->EyePlaneT[3];
}
else {
gl_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" );
break;
case GL_R:
if (pname==GL_TEXTURE_GEN_MODE) {
- params[0] = texUnit->GenModeR;
+ params[0] = (GLint) texUnit->GenModeR;
}
else if (pname==GL_OBJECT_PLANE) {
- COPY_4V( params, texUnit->ObjectPlaneR );
+ params[0] = (GLint) texUnit->ObjectPlaneR[0];
+ params[1] = (GLint) texUnit->ObjectPlaneR[1];
+ params[2] = (GLint) texUnit->ObjectPlaneR[2];
+ params[3] = (GLint) texUnit->ObjectPlaneR[3];
}
else if (pname==GL_EYE_PLANE) {
- COPY_4V( params, texUnit->EyePlaneR );
+ params[0] = (GLint) texUnit->EyePlaneR[0];
+ params[1] = (GLint) texUnit->EyePlaneR[1];
+ params[2] = (GLint) texUnit->EyePlaneR[2];
+ params[3] = (GLint) texUnit->EyePlaneR[3];
}
else {
gl_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" );
break;
case GL_Q:
if (pname==GL_TEXTURE_GEN_MODE) {
- params[0] = texUnit->GenModeQ;
+ params[0] = (GLint) texUnit->GenModeQ;
}
else if (pname==GL_OBJECT_PLANE) {
- COPY_4V( params, texUnit->ObjectPlaneQ );
+ params[0] = (GLint) texUnit->ObjectPlaneQ[0];
+ params[1] = (GLint) texUnit->ObjectPlaneQ[1];
+ params[2] = (GLint) texUnit->ObjectPlaneQ[2];
+ params[3] = (GLint) texUnit->ObjectPlaneQ[3];
}
else if (pname==GL_EYE_PLANE) {
- COPY_4V( params, texUnit->EyePlaneQ );
+ params[0] = (GLint) texUnit->EyePlaneQ[0];
+ params[1] = (GLint) texUnit->EyePlaneQ[1];
+ params[2] = (GLint) texUnit->EyePlaneQ[2];
+ params[3] = (GLint) texUnit->EyePlaneQ[3];
}
else {
gl_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" );
-/* $Id: varray.c,v 1.6 1999/11/04 19:42:28 keithw Exp $ */
+/* $Id: varray.c,v 1.7 1999/11/05 06:43:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
struct immediate *IM = VB->IM;
struct gl_client_array *client_data;
struct gl_pipeline *elt = &ctx->CVA.elt;
- GLuint relock;
+ GLboolean relock;
GLuint fallback, required;
if (ctx->NewState)
return;
}
- if (!ctx->Array.LockCount && 2*count > 3*(end-start)) {
+ if (!ctx->Array.LockCount && 2*count > (GLint) 3*(end-start)) {
glLockArraysEXT(CTX_PRM start, end );
glDrawElements(CTX_PRM mode, count, type, indices );
glUnlockArraysEXT(CTX_VPRM );