-/* $Id: texstore.c,v 1.45 2002/10/24 23:57:21 brianp Exp $ */
+/* $Id: texstore.c,v 1.46 2002/10/28 23:01:24 kschultz Exp $ */
/*
* Mesa 3-D graphics library
/* Find convertFormat - the format that do_row() will process */
if (srcImage->IsCompressed) {
/* setup for compressed textures */
- GLint row, components, size;
+ GLuint row;
+ GLint components, size;
GLchan *dst;
assert(texObj->Target == GL_TEXTURE_2D);
/* decompress base image here */
dst = (GLchan *) srcData;
for (row = 0; row < srcImage->Height; row++) {
- GLint col;
+ GLuint col;
for (col = 0; col < srcImage->Width; col++) {
(*srcImage->FetchTexel)(srcImage, col, row, 0, (GLvoid *) dst);
dst += components;
-/* $Id: s_texture.c,v 1.73 2002/10/24 23:57:24 brianp Exp $ */
+/* $Id: s_texture.c,v 1.74 2002/10/28 23:01:24 kschultz Exp $ */
/*
* Mesa 3-D graphics library
U = 1.0F - (S - (GLfloat) flr); /* flr is odd */ \
else \
U = S - (GLfloat) flr; /* flr is even */ \
- U = (U * SIZE) - 0.5; \
+ U = (U * SIZE) - 0.5F; \
I0 = IFLOOR(U); \
I1 = I0 + 1; \
if (I0 < 0) \
I1 = SIZE - 1; \
} \
else if (wrapMode == GL_MIRROR_CLAMP_ATI) { \
- U = fabs(S); \
+ U = (GLfloat) fabs(S); \
if (U >= 1.0F) \
U = (GLfloat) SIZE; \
else \
I1 = I0 + 1; \
} \
else if (wrapMode == GL_MIRROR_CLAMP_TO_EDGE_ATI) { \
- U = fabs(S); \
+ U = (GLfloat) fabs(S); \
if (U >= 1.0F) \
U = (GLfloat) SIZE; \
else \
else if (wrapMode == GL_MIRROR_CLAMP_ATI) { \
/* s limited to [0,1] */ \
/* i limited to [0,size-1] */ \
- const GLfloat u = fabs(S); \
+ const GLfloat u = (GLfloat) fabs(S); \
if (u <= 0.0F) \
I = 0; \
else if (u >= 1.0F) \
/* i limited to [0, size-1] */ \
const GLfloat min = 1.0F / (2.0F * SIZE); \
const GLfloat max = 1.0F - min; \
- const GLfloat u = fabs(S); \
+ const GLfloat u = (GLfloat) fabs(S); \
if (u < min) \
I = 0; \
else if (u > max) \