Home Products Download Order Contacts

comp.graphics.algorithms

Subject: Re: Help with blit bug!




Kaba,

I just tested the endianess on the data and device, they are both little
endian. For the heck of it I tried swaping the byte order and it gives
me a color cycling effect, so seems it may not be an endianess problem.
Any other ideas? Thank you for your help.


Kaba wrote:
> Here's a neat trick to test your device's endianness, assuming you know
> that it is either little or big.
>
> #include
> #include
>
> using namespace std;
>
> int main()
> {
> char test[sizeof(int)] = {1};
> int testInt = *((int*)test);
> if (testInt == 1)
> {
> cout << "Your computer is little endian." << endl;
> }
> else
> {
> cout << "Your computer is big endian." << endl;
> }
>
> string tmp;
> getline(cin, tmp);
>
> return 0;
> }
>

Reply


View All Messages in comp.graphics.algorithms

path:
Help with blit bug! =>Re: Help with blit bug! =>Re: Help with blit bug! =>Re: Help with blit bug! =>

Replies:
Re: Help with blit bug!

Copyright 2006 WatermarkFactory.com. All Rights Reserved.