From 6258b76c49f49a56a7c713914b798e80c6553b06 Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Thu, 5 May 2005 21:08:07 +0000 Subject: Port Mesa to build on a P64 platform (e.g., Win64). P64 platforms use 64-bit pointers and 32-bit longs. So, operations like casting pointers to unsigned long and back to pointer won't work. glheader.h now includes files to define uintptr_t, which should instead be used for this sort of operation. It is an integer type that is the same size as a pointer. --- src/mesa/main/api_arrayelt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/api_arrayelt.c') diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index cb827c2ec9..6a531aa2aa 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -989,7 +989,7 @@ void GLAPIENTRY _ae_loopback_array_elt( GLint elt ) /* generic attributes */ for (at = actx->attribs; at->func; at++) { const GLubyte *src = at->array->BufferObj->Data - + (unsigned long) at->array->Ptr + + (uintptr_t) at->array->Ptr + elt * at->array->StrideB; at->func( at->index, src ); } @@ -997,7 +997,7 @@ void GLAPIENTRY _ae_loopback_array_elt( GLint elt ) /* conventional arrays */ for (aa = actx->arrays; aa->func ; aa++) { const GLubyte *src = aa->array->BufferObj->Data - + (unsigned long) aa->array->Ptr + + (uintptr_t) aa->array->Ptr + elt * aa->array->StrideB; aa->func( src ); } -- cgit v1.2.3