Endian Support Fixed

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 Support Fixed

Post by SwiftCoder »

It seems I was not as "Swift" as I might have been.
The only reason texturing was messing up on big endian systems was that you are using the GL_BGRA_EXT for generating textures.

This is very simply fixed by placing #ifdef IRR_LIL_ENDIAN/#else/#endif statements around the opengl texture creation functions, and replacing GL_BGRA_EXT with GL_RGBA if it IRR_BIG_ENDIAN

That fixes most things, and the BMP and MD2 loaders I sent Niko before now work just fine. I have also endianized the 3DS loader, I will send it as soon as I have cleaned up the code. The JPEG loader works as is (thanks to libjpeg), and I am at work on the BSP loader.

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

Post by niko »

Ah, cool. :)
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

nice. when you get more of that worked out, I think I have a friend who might make an OSX build of IrrLichtRPG-- so I'm looking forward to your results.
a screen cap is worth 0x100000 DWORDS
Optime

Post by Optime »

@SwiftCoder: could you send that fixed MD2 loader to me (macsdl at soniq de)? we have a macsdl port ready that needs endian fixed mesh loaders ;).

http://www.irrlichtnx.mmdevel.de/phpBB2 ... ?p=459#459
spongebob

Post by spongebob »

could you post your endian-correction patches on IrrlichtNX ?

It would be very useful for the Irrlicht community.
Guest

Post by Guest »

The BMP/PSD endian fixes are trivial (JPEG works out of the box). I wanted to post a complete patchset for MACSDL there. Without a completed device for at least one big endian system submitting is rather useless because nobody could test these. To submit a complete set we need to support MD2/BSP at least to get the tech demo running.

Please see the irrlichtnx thread for updates. I could send the fixes directly to you though.
Post Reply