idx = add_parameter(paramList, "Some State", NULL, STATE);
for (a=0; a<6; a++)
- paramList->Parameters[idx].StateIndexes[a] = stateTokens[a];
+ paramList->Parameters[idx].StateIndexes[a] = (enum state_index) stateTokens[a];
return idx;
}
STATE_TEXGEN_OBJECT_R,
STATE_TEXGEN_OBJECT_Q,
- STATE_TEXENV_COLOR,
+ STATE_TEXENV_COLOR,
- STATE_DEPTH_RANGE,
+ STATE_DEPTH_RANGE,
- STATE_VERTEX_PROGRAM,
- STATE_FRAGMENT_PROGRAM,
+ STATE_VERTEX_PROGRAM,
+ STATE_FRAGMENT_PROGRAM,
- STATE_ENV,
- STATE_LOCAL
+ STATE_ENV,
+ STATE_LOCAL
};
}
} else {
GLfloat *vbindex = (GLfloat *)VB->IndexPtr[1]->data;
- SS_IND(v[0]->index, vbindex[e0]);
- SS_IND(v[1]->index, vbindex[e1]);
- SS_IND(v[2]->index, vbindex[e2]);
+ SS_IND(v[0]->index, (GLuint) vbindex[e0]);
+ SS_IND(v[1]->index, (GLuint) vbindex[e1]);
+ SS_IND(v[2]->index, (GLuint) vbindex[e2]);
}
}
}
}
} else {
GLfloat *vbindex = (GLfloat *)VB->IndexPtr[0]->data;
- SS_IND(v[0]->index, vbindex[e0]);
- SS_IND(v[1]->index, vbindex[e1]);
- SS_IND(v[2]->index, vbindex[e2]);
+ SS_IND(v[0]->index, (GLuint) vbindex[e0]);
+ SS_IND(v[1]->index, (GLuint) vbindex[e1]);
+ SS_IND(v[2]->index, (GLuint) vbindex[e2]);
}
}
}
}
if (IND & INDEX) {
- v->index = index[0];
+ v->index = (GLuint) index[0];
STRIDE_F(index, index_stride);
}
GLuint stride = node->vertex_size;
GLuint count = node->count;
- len = node->normal_lengths = MALLOC( count * sizeof(GLfloat) );
+ len = node->normal_lengths = (GLfloat *) MALLOC( count * sizeof(GLfloat) );
if (!len)
return;
static struct tnl_vertex_store *alloc_vertex_store( GLcontext *ctx )
{
- struct tnl_vertex_store *store = MALLOC( sizeof(*store) );
+ struct tnl_vertex_store *store = MALLOC_STRUCT(tnl_vertex_store);
store->used = 0;
store->refcount = 1;
return store;
static struct tnl_primitive_store *alloc_prim_store( GLcontext *ctx )
{
- struct tnl_primitive_store *store = MALLOC( sizeof(*store) );
+ struct tnl_primitive_store *store = MALLOC_STRUCT(tnl_primitive_store);
store->used = 0;
store->refcount = 1;
return store;
GLint i = tnl->save.prim_count - 1;
GLenum mode;
- assert(i < tnl->save.prim_max);
+ assert(i < (GLint) tnl->save.prim_max);
assert(i >= 0);
/* Close off in-progress primitive.
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLfloat *data = tnl->save.copied.buffer;
- int i;
+ GLuint i;
/* Emit a glEnd to close off the last vertex list.
*/
{
GLfloat *data = tnl->save.copied.buffer;
GLfloat *dest = tnl->save.buffer;
- GLint j;
+ GLuint j;
/* Need to note this and fix up at runtime (or loopback):
*/
TNLcontext *tnl = TNL_CONTEXT(ctx); \
\
if ((ATTR) == 0) { \
- int i; \
+ GLuint i; \
\
if (N>0) tnl->save.vbptr[0] = v[0]; \
if (N>1) tnl->save.vbptr[1] = v[1]; \
static void _save_VertexAttrib1fNV( GLuint index, GLfloat x )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR1F( index, x );
else
enum_error();
static void _save_VertexAttrib1fvNV( GLuint index, const GLfloat *v )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR1FV( index, v );
else
enum_error();
static void _save_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR2F( index, x, y );
else
enum_error();
static void _save_VertexAttrib2fvNV( GLuint index, const GLfloat *v )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR2FV( index, v );
else
enum_error();
static void _save_VertexAttrib3fNV( GLuint index, GLfloat x, GLfloat y,
GLfloat z )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR3F( index, x, y, z );
else
enum_error();
static void _save_VertexAttrib3fvNV( GLuint index, const GLfloat *v )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR3FV( index, v );
else
enum_error();
static void _save_VertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y,
GLfloat z, GLfloat w )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR4F( index, x, y, z, w );
else
enum_error();
static void _save_VertexAttrib4fvNV( GLuint index, const GLfloat *v )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR4FV( index, v );
else
enum_error();
TNLcontext *tnl = TNL_CONTEXT(ctx);
if (1) {
- int i = tnl->save.prim_count++;
+ GLuint i = tnl->save.prim_count++;
assert(i < tnl->save.prim_max);
tnl->save.prim[i].mode = mode | PRIM_BEGIN;
{
GET_CURRENT_CONTEXT( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
- int i = tnl->save.prim_count - 1;
+ GLint i = tnl->save.prim_count - 1;
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
tnl->save.prim[i].mode |= PRIM_END;
tnl->save.prim[i].count = ((tnl->save.initial_counter - tnl->save.counter) -
tnl->save.prim[i].start);
- if (i == tnl->save.prim_max - 1) {
+ if (i == (GLint) tnl->save.prim_max - 1) {
_save_compile_vertex_list( ctx );
assert(tnl->save.copied.nr == 0);
}
GLint begin = prim->start;
GLint end = begin + prim->count;
GLfloat *data;
- GLint j, k;
+ GLint j;
+ GLuint k;
if (prim->mode & PRIM_BEGIN) {
glBegin( prim->mode & PRIM_MODE_MASK );
* includes operations such as glBegin or glDrawArrays.
*/
_mesa_error( ctx, GL_INVALID_OPERATION, "displaylist recursive begin");
- _tnl_loopback_vertex_list( ctx, data );
+ _tnl_loopback_vertex_list( ctx, (struct tnl_vertex_list *) data );
return;
}
else if (tnl->LoopbackDListCassettes ||
*/
_mesa_debug(ctx,
"tnl_playback_vertex_list: loopback dangling attr ref\n");
- _tnl_loopback_vertex_list( ctx, data );
+ _tnl_loopback_vertex_list( ctx, (struct tnl_vertex_list *) data );
return;
}
do
{
- GLint i;
+ GLuint i;
for (i = 0 ; i < VB->PrimitiveCount ; i++)
{
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLfloat *data = tnl->vtx.copied.buffer;
- int i;
+ GLuint i;
/* Run pipeline on current vertices, copy wrapped vertices
* to tnl->copied.
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint oldsz;
- GLint i;
+ GLuint i;
GLfloat *tmp;
GLint lastcount = tnl->vtx.initial_counter - tnl->vtx.counter;
TNLcontext *tnl = TNL_CONTEXT(ctx); \
\
if ((ATTR) == 0) { \
- int i; \
+ GLuint i; \
\
if (N>0) tnl->vtx.vbptr[0] = v[0]; \
if (N>1) tnl->vtx.vbptr[1] = v[1]; \
static void _tnl_VertexAttrib1fNV( GLuint index, GLfloat x )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR1F( index, x );
else
enum_error();
static void _tnl_VertexAttrib1fvNV( GLuint index, const GLfloat *v )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR1FV( index, v );
else
enum_error();
static void _tnl_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR2F( index, x, y );
else
enum_error();
static void _tnl_VertexAttrib2fvNV( GLuint index, const GLfloat *v )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR2FV( index, v );
else
enum_error();
static void _tnl_VertexAttrib3fNV( GLuint index, GLfloat x, GLfloat y,
GLfloat z )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR3F( index, x, y, z );
else
enum_error();
static void _tnl_VertexAttrib3fvNV( GLuint index, const GLfloat *v )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR3FV( index, v );
else
enum_error();
static void _tnl_VertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y,
GLfloat z, GLfloat w )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR4F( index, x, y, z, w );
else
enum_error();
static void _tnl_VertexAttrib4fvNV( GLuint index, const GLfloat *v )
{
- if (index >= VERT_ATTRIB_POS && index < VERT_ATTRIB_MAX)
+ if (index < VERT_ATTRIB_MAX)
DISPATCH_ATTR4FV( index, v );
else
enum_error();
GLuint i;
if (!ef)
- ef = tnl->vtx.edgeflag_tmp = MALLOC( tnl->vb.Size );
+ ef = tnl->vtx.edgeflag_tmp = (GLboolean *) MALLOC( tnl->vb.Size );
for (i = 0 ; i < count ; i++, data += stride)
ef[i] = (data[0] == 1.0);
GLuint i;
if (!ef)
- ef = tnl->vtx.edgeflag_tmp = MALLOC( tnl->vb.Size );
+ ef = tnl->vtx.edgeflag_tmp = (GLboolean *) MALLOC( tnl->vb.Size );
for (i = 0 ; i < count ; i++)
ef[i] = tmp;