I believe int used to be and then Microsoft mucked it up from 32 to 64, and 
thus you get the warning (for what it's worth I grew up with the 
Commodore/Amiga line of products, and had to join the dark side).

I use Vista 64 at work, and can say in confidence that osg works great in 32 
bit mode.  I have not tried to compile osg in 64bit yet, but I did see there is 
a 64bit platform available in cmake.  I code in x64 all the time at work now, 
and it is great to step into and see the new 64 bit assembly.  I no longer feel 
nauseous coding on the inferior 8088 processor.

James Killian

  ----- Original Message ----- 
  From: Peter Wraae Marino 
  To: OpenSceneGraph Users 
  Sent: Thursday, June 26, 2008 2:02 AM
  Subject: Re: [osg-users] Warning on 64bits: cast to pointer from 
integerofdifferent size


  Hi James,

  I always thought that "int" and "unsigned int" would be the best fit n-bit on 
the system? if it was an 8bit system
  then it would be 8bit int, if 32bit system then 32bit int.... or did I 
mis-understand something?

  and now that we are on the subject of 64bit.. I would like to ask a 
question... I considering buying a new
  computer and OS -- the OS (I know Robert will hate this).. is going to be 
Vista 64 bit and would like to 
  start coding using 64bit.. is OpenSceneGraph working with 64bit?

  regards,
  Peter


  On Thu, Jun 26, 2008 at 4:14 AM, James Killian <[EMAIL PROTECTED]> wrote:


    I am not sure about the osg coding protocol, but for what we do at my work 
place we use size_t as the generic "unsigned int"... this will be unsigned long 
for win32 and __int64 for the x64 platform.  It is good to use as a generic 
container for local variables since it chooses the native size that fits best 
per platform.  size_t is great for pointer offsets too.

    The part that is unclear to me is the osg protocol in regards to using 
things like size_t fpos_t etc...  osg has to be more generic to comply to all 
platforms, and this is something I have not needed to worry about (yet).


    James Killian
    ----- Original Message ----- From: "Mario Valle" <[EMAIL PROTECTED]>
    To: <[email protected]>
    Sent: Wednesday, June 25, 2008 12:02 PM
    Subject: [osg-users] Warning on 64bits: cast to pointer from integer 
ofdifferent size 





      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





------------------------------------------------------------------------------


  _______________________________________________
  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