summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-09-19 15:38:15 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-09-19 15:38:15 +0000
commite4fcea2e06571b71a85b4f100c95d866a82f7c19 (patch)
treedf95d1d9eed897c1dd2fee2923163843ddca3228 /src/mesa/tnl
parent74c33393b4ebcc1616c0d8f1b6f43d658aed3f22 (diff)
Assorted casts to silence g++ warnings.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_imm_alloc.c4
-rw-r--r--src/mesa/tnl/t_imm_elt.c2
-rw-r--r--src/mesa/tnl/t_imm_eval.c2
-rw-r--r--src/mesa/tnl/t_imm_fixup.c8
-rw-r--r--src/mesa/tnl/t_vb_light.c4
5 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/tnl/t_imm_alloc.c b/src/mesa/tnl/t_imm_alloc.c
index 8ffb182fd1..a8b3d72914 100644
--- a/src/mesa/tnl/t_imm_alloc.c
+++ b/src/mesa/tnl/t_imm_alloc.c
@@ -59,14 +59,14 @@ real_alloc_immediate( GLcontext *ctx )
/* 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));
}
}
diff --git a/src/mesa/tnl/t_imm_elt.c b/src/mesa/tnl/t_imm_elt.c
index fdecef61af..9157ca4871 100644
--- a/src/mesa/tnl/t_imm_elt.c
+++ b/src/mesa/tnl/t_imm_elt.c
@@ -619,7 +619,7 @@ void _tnl_translate_array_elts( GLcontext *ctx, struct immediate *IM,
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;
diff --git a/src/mesa/tnl/t_imm_eval.c b/src/mesa/tnl/t_imm_eval.c
index 560e0c5933..69bbbffce8 100644
--- a/src/mesa/tnl/t_imm_eval.c
+++ b/src/mesa/tnl/t_imm_eval.c
@@ -507,7 +507,7 @@ void _tnl_eval_immediate( GLcontext *ctx, struct immediate *IM )
/* 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;
diff --git a/src/mesa/tnl/t_imm_fixup.c b/src/mesa/tnl/t_imm_fixup.c
index a11fec80b7..7cfacd4c0d 100644
--- a/src/mesa/tnl/t_imm_fixup.c
+++ b/src/mesa/tnl/t_imm_fixup.c
@@ -155,7 +155,7 @@ copy_from_current( GLcontext *ctx, struct immediate *IM,
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;
@@ -229,7 +229,7 @@ _tnl_fixup_input( GLcontext *ctx, struct immediate *IM )
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;
@@ -409,7 +409,7 @@ _tnl_copy_immediate_vertices( GLcontext *ctx, struct immediate *next )
/* 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;
@@ -546,7 +546,7 @@ _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM )
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");
}
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index 154c3d2961..ccbcba1f2a 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -69,7 +69,7 @@ static void import_color_material( GLcontext *ctx,
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;
}
@@ -248,7 +248,7 @@ static GLboolean run_validate_lighting( GLcontext *ctx,
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;