• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: To get machine type (ppc, intel)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: To get machine type (ppc, intel)


  • Subject: Re: To get machine type (ppc, intel)
  • From: Sam McDonald <email@hidden>
  • Date: Wed, 19 Mar 2008 09:30:11 -0500

We had do this in our most recent app.  Here is what we did:

#if __BIG_ENDIAN__
#define ARGB_IMAGE_TYPE GL_UNSIGNED_INT_8_8_8_8_REV
#else
#define ARGB_IMAGE_TYPE GL_UNSIGNED_INT_8_8_8_8
#endif

Sam McDonald
Trimonix

On Mar 19, 2008, at 9:14 AM, Nick Rogers wrote:

Hi,
In my app I'm reading raw bytes from the file.
So to get a integer's correct value, I'll need to swap bytes according to the machine (big or little-endian type), I guess.


Is there a way so that I can know, if its a intel or ppc machine, that my app is running on?

Thanks,
Nick
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >To get machine type (ppc, intel) (From: Nick Rogers <email@hidden>)

  • Prev by Date: Re: To get machine type (ppc, intel)
  • Next by Date: Kentucky Meetup
  • Previous by thread: Re: To get machine type (ppc, intel)
  • Next by thread: Re: To get machine type (ppc, intel)
  • Index(es):
    • Date
    • Thread