Hi Mario,

The compiler is just being a pain in the butt here, the code is 100%
safe on both 32bit and 64bit systems, context being everything.
Basically with VBO and PBO's you reuse parts of OpenGL functions that
take GLvoid*, but the actual data isn't a pointer in memory, but an
offset, and in this context we'll never need an offset that needs to
be greater than 32 bit.  The only question is really is how to shut up
the compiler from emiting this warning without messing around with
data types on the OSG side.

Robert.

On Wed, Jun 25, 2008 at 6:02 PM, Mario Valle <[EMAIL PROTECTED]> wrote:
>
> On x86_64 (Suse 10.3) the following warning appears at lines 431 and 600 of
> BufferObject.cpp :
>
> "warning: cast to pointer from integer of different size"
>
> In both places (few lines over), if I change the line:
>   unsigned int offset = 0;
> to:
>   unsigned long offset = 0;
> The warning goes away.
> Can anyone more knowledgeable than me confirm that the change is correct
> before I submit the change?
> Thanks!
>        mario
>
>
> --
> Ing. Mario Valle
> Data Analysis and Visualization Services         |
> http://www.cscs.ch/~mvalle
> Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
> v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82
> </div>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to