Endian Color Issues

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
SwiftCoder
Posts: 32
Joined: Thu Jan 15, 2004 7:33 pm
Location: Carribean

Endian Color Issues

Post by SwiftCoder »

Mainly for Niko:
Endian handling in IrrLicht turns out to be complicated, mainly because of the way Colors are packed in IrrLicht.
I have not yet come up with a reliable modification to the SColor class and its accompanying functions to draw actual colors on a big endian system.
It seems that the bit-shifting done to the 16-bit colors, to retrieve individual colors, just is not very endian-safe, usually causing at least one channel to mysteriously disappear.
Any ideas on how this could be fixed?

SwiftCoder
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

No, sorry. I thought that it might be complicated, too bad that it is really. Does this problem also appear in 32 bit mode? And with all file formats?
SwiftCoder
Posts: 32
Joined: Thu Jan 15, 2004 7:33 pm
Location: Carribean

Post by SwiftCoder »

In 32-bit mode, you just have to do some major channel-juggling, so maybe that will have to be the work-around. I will look into other formats.

SwiftCoder
Post Reply