cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
- cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
+ cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
- cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
+ cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
- cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
+ cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
- cl->Ptr = (void *) &ctx->Current.Attrib[VERT_ATTRIB_FOG];
+ cl->Ptr = (GLubyte *) &ctx->Current.Attrib[VERT_ATTRIB_FOG];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_UNSIGNED_INT;
cl->Stride = 0;
cl->StrideB = 0;
- cl->Ptr = (void *) &ctx->Current.Index;
+ cl->Ptr = (GLubyte *) &ctx->Current.Index;
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
- cl->Ptr = (void *) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + i];
+ cl->Ptr = (GLubyte *) ctx->Current.Attrib[VERT_ATTRIB_TEX0 + i];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_UNSIGNED_BYTE;
cl->Stride = 0;
cl->StrideB = 0;
- cl->Ptr = (void *) &ctx->Current.EdgeFlag;
+ cl->Ptr = (GLubyte *) &ctx->Current.EdgeFlag;
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 0;
- cl->Ptr = (void *) ctx->Current.Attrib[i];
+ cl->Ptr = (GLubyte *) ctx->Current.Attrib[i];
cl->Enabled = 1;
cl->Flags = CA_CLIENT_DATA; /* hack */
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
- cl->Ptr = MALLOC( cl->StrideB * size );
+ cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 3 * sizeof(GLfloat);
- cl->Ptr = MALLOC( cl->StrideB * size );
+ cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
- cl->Ptr = MALLOC( cl->StrideB * size );
+ cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
- cl->Ptr = MALLOC( cl->StrideB * size );
+ cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = sizeof(GLfloat);
- cl->Ptr = MALLOC( cl->StrideB * size );
+ cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_UNSIGNED_INT;
cl->Stride = 0;
cl->StrideB = sizeof(GLuint);
- cl->Ptr = MALLOC( cl->StrideB * size );
+ cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
- cl->Ptr = MALLOC( cl->StrideB * size );
+ cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_UNSIGNED_BYTE;
cl->Stride = 0;
cl->StrideB = sizeof(GLubyte);
- cl->Ptr = MALLOC( cl->StrideB * size );
+ cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
cl->Type = GL_FLOAT;
cl->Stride = 0;
cl->StrideB = 4 * sizeof(GLfloat);
- cl->Ptr = MALLOC( cl->StrideB * size );
+ cl->Ptr = (GLubyte *) MALLOC( cl->StrideB * size );
cl->Enabled = 1;
cl->Flags = 0;
#if FEATURE_ARB_vertex_buffer_object
if (ExtEntryTable[i].Offset == offset) {
return GL_TRUE; /* offsets match */
}
- else if (ExtEntryTable[i].Offset == ~0
+ else if (ExtEntryTable[i].Offset == (GLuint) ~0
&& offset < DISPATCH_TABLE_SIZE) {
/* need to patch-up the dispatch code */
- if (offset != ~0) {
+ if (offset != (GLuint) ~0) {
fill_in_entrypoint_offset(ExtEntryTable[i].Address, offset);
ExtEntryTable[i].Offset = offset;
}
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(format)");
return;
}
- _mesa_parse_arb_vertex_program(ctx, target, string, len, prog);
+ _mesa_parse_arb_vertex_program(ctx, target, (const GLubyte *) string,
+ len, prog);
}
else if (target == GL_FRAGMENT_PROGRAM_ARB
&& ctx->Extensions.ARB_fragment_program) {
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(format)");
return;
}
- _mesa_parse_arb_fragment_program(ctx, target, string, len, prog);
+ _mesa_parse_arb_fragment_program(ctx, target, (const GLubyte *) string,
+ len, prog);
}
else {
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(target)");
new_data = _mesa_realloc( bufObj->Data, bufObj->Size, size );
if ( new_data != NULL ) {
- bufObj->Data = new_data;
+ bufObj->Data = (GLubyte *) new_data;
bufObj->Size = size;
bufObj->Usage = usage;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- GLuint *idCopy;
- idCopy = _mesa_malloc(num * sizeof(GLuint));
+ GLuint *idCopy = (GLuint *) _mesa_malloc(num * sizeof(GLuint));
if (!idCopy) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glRequestResidentProgramsNV");
return;
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
- GLubyte *nameCopy;
-
- nameCopy = _mesa_malloc(len);
+ GLubyte *nameCopy = (GLubyte *) _mesa_malloc(len);
if (!nameCopy) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramNamedParameter4fNV");
return;
}
break;
case OPCODE_REQUEST_RESIDENT_PROGRAMS_NV:
- (*ctx->Exec->RequestResidentProgramsNV)(n[1].ui, n[2].data);
+ (*ctx->Exec->RequestResidentProgramsNV)(n[1].ui,
+ (GLuint *) n[2].data);
break;
case OPCODE_LOAD_PROGRAM_NV:
- (*ctx->Exec->LoadProgramNV)(n[1].e, n[2].ui, n[3].i, n[4].data);
+ (*ctx->Exec->LoadProgramNV)(n[1].e, n[2].ui, n[3].i,
+ (const GLubyte *) n[4].data);
break;
case OPCODE_PROGRAM_PARAMETER4F_NV:
(*ctx->Exec->ProgramParameter4fNV)(n[1].e, n[2].ui, n[3].f,
n[4].f, n[5].f, n[6].f);
break;
case OPCODE_PROGRAM_NAMED_PARAMETER_NV:
- (*ctx->Exec->ProgramNamedParameter4fNV)(n[1].ui, n[2].i, n[3].data,
+ (*ctx->Exec->ProgramNamedParameter4fNV)(n[1].ui, n[2].i,
+ (const GLubyte *) n[3].data,
n[4].f, n[5].f, n[6].f, n[7].f);
break;
#endif
extStrLen += _mesa_strlen(default_extensions[i].name) + 1;
}
}
- s = _mesa_malloc(extStrLen);
+ s = (GLubyte *) _mesa_malloc(extStrLen);
/* second, build the extension string */
extStrLen = 0;
{
const GLuint n = paramList->NumParameters;
- paramList->Parameters = _mesa_realloc(paramList->Parameters,
- n * sizeof(struct program_parameter),
- (n + 1) * sizeof(struct program_parameter));
+ paramList->Parameters = (struct program_parameter *)
+ _mesa_realloc(paramList->Parameters,
+ n * sizeof(struct program_parameter),
+ (n + 1) * sizeof(struct program_parameter));
if (!paramList->Parameters) {
/* out of memory */
paramList->NumParameters = 0;
#endif
/* make null-terminated copy of registerName */
- len = MIN2(len, sizeof(reg) - 1);
+ len = MIN2((unsigned int) len, sizeof(reg) - 1);
_mesa_memcpy(reg, registerName, len);
reg[len] = 0;
#include "glheader.h"
#include "context.h"
#include "colormac.h"
+#include "context.h"
#include "macros.h"
#include "imports.h"
#include "s_aatriangle.h"
src = ctx->FragmentProgram.Parameters[source->Index];
break;
case PROGRAM_NAMED_PARAM:
- ASSERT(source->Index < program->Parameters->NumParameters);
+ ASSERT(source->Index < (GLint) program->Parameters->NumParameters);
src = program->Parameters->Parameters[source->Index].Values;
break;
case PROGRAM_STATE_VAR:
GLuint count = VB->Count;
if (!to->Ptr) {
- to->Ptr = ALIGN_MALLOC( VB->Size * 4 * sizeof(GLchan), 32 );
+ to->Ptr = (GLubyte *) ALIGN_MALLOC( VB->Size * 4 * sizeof(GLchan), 32 );
to->Type = CHAN_TYPE;
}
/* Only allocate space for vertex positions right now. Color, texcoord,
* etc storage will be allocated as needed.
*/
- immed->Attrib[VERT_ATTRIB_POS] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
+ immed->Attrib[VERT_ATTRIB_POS] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
/* Enable this to allocate all attribute arrays up front */
if (0)
{
int i;
for (i = 1; i < VERT_ATTRIB_MAX; i++) {
- immed->Attrib[i] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
+ immed->Attrib[i] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
}
}
ASSERT(IM->Attrib[VERT_ATTRIB_POS]);
for (attr = 1; attr < VERT_ATTRIB_MAX; attr++) {
if ((translate & (1 << attr)) && !IM->Attrib[attr]) {
- IM->Attrib[attr] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
+ IM->Attrib[attr] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
if (!IM->Attrib[attr]) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing2");
return;
/* Allocate vertex attribute storage now */
for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
if ((req & (1 << attr)) && !store->Attrib[attr]) {
- store->Attrib[attr] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
+ store->Attrib[attr] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
if (!store->Attrib[attr]) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "evaluator processing");
return;
for (attrib = 0, attribBit = 1; attrib < 16; attrib++, attribBit <<= 1) {
if (copyMask & attribBit) {
if (!IM->Attrib[attrib]) {
- IM->Attrib[attrib] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
+ IM->Attrib[attrib] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
if (!IM->Attrib[attrib]) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing3");
return;
const GLuint attrBit = 1 << attr;
if (fixup & attrBit) {
if (!IM->Attrib[attr]) {
- IM->Attrib[attr] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
+ IM->Attrib[attr] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
if (!IM->Attrib[attr]) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing");
return;
/* Allocate attribute arrays in the destination immediate struct */
for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
if ((copy & (1 << attr)) && !next->Attrib[attr]) {
- next->Attrib[attr] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
+ next->Attrib[attr] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
if (!next->Attrib[attr]) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing");
return;
const GLuint attrBit = 1 << attr;
if (fixup & attrBit) {
if (!IM->Attrib[attr]) {
- IM->Attrib[attr] = _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
+ IM->Attrib[attr] = (GLfloat (*)[4]) _mesa_malloc(IMM_SIZE * 4 * sizeof(GLfloat));
if (!IM->Attrib[attr]) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "vertex processing");
}
GLuint count = VB->Count;
if (!to->Ptr) {
- to->Ptr = ALIGN_MALLOC( VB->Size * 4 * sizeof(GLfloat), 32 );
+ to->Ptr = (GLubyte *) ALIGN_MALLOC( VB->Size * 4 * sizeof(GLfloat), 32 );
to->Type = GL_FLOAT;
}
static void alloc_4chan( struct gl_client_array *a, GLuint sz )
{
- a->Ptr = ALIGN_MALLOC( sz * sizeof(GLchan) * 4, 32 );
+ a->Ptr = (GLubyte *) ALIGN_MALLOC( sz * sizeof(GLchan) * 4, 32 );
a->Size = 4;
a->Type = CHAN_TYPE;
a->Stride = 0;