To get machine type (ppc, intel)

2008-03-19 Thread Nick Rogers
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

Re: To get machine type (ppc, intel)

2008-03-19 Thread Sam McDonald
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

Re: To get machine type (ppc, intel)

2008-03-19 Thread Sherm Pendley
On Wed, Mar 19, 2008 at 10:14 AM, Nick Rogers [EMAIL PROTECTED] 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