OpenGL renderer on BigEndian (minor issues)

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
kas1e
Posts: 212
Joined: Sun Jan 21, 2018 8:39 am

OpenGL renderer on BigEndian (minor issues)

Post by kas1e »

Finished build of irrlicht 1.9 (i.e. current trunk), with opengl/sdl1 support on amigao4 (so big endian CPU).

So far all good, but found some little issues, which maybe just one issue.

For first, 06.2Dgraphics example give me that:

http://kas1e.mikendezign.com/aos4/irrli ... aphics.jpg

As can be seen the area which should be transparenty just purple. In the source of that example we see:

video::ITexture* images = driver->getTexture("../../media/2ddemo.png");
driver->makeColorKeyTexture(images, core::position2d<s32>(0,0));

There is Texture is read back, and then the color key is applied to make it transparent. So guess is, that the colorkey is not detected correctly in the image because of the endianness.

Both version of the method makeNormalMapTexture from class CNullDriver (that will be used in the OpenGL driver), use some masking of the colors that seems LittleEndian to me.


const u32 refZeroAlpha = 0x00ffffff & color.color;
on
const u32 refZeroAlpha = 0xffffff00 & color.color;


if(((*p) & 0x00ffffff) == refZeroAlpha)
on
if(((*p) & 0xffffff00) == refZeroAlpha)


colorKey = 0x00ffffff & p[colorKeyPixelPos.Y*pitch + colorKeyPixelPos.X];
on
colorKey = 0xffffff00 & p[colorKeyPixelPos.Y*pitch + colorKeyPixelPos.X];

But sadly, that change nothing. Probably some other place should taken care of. Can anyone give a point to where to look at ?


And another issue, is with GUI. Every example which have GUI in, have problems with "gadgets". I.e. those "mark", "dropdown" , "left", "right", etc. Instead of proper ones, i have just black quads. Just like that (see menu at top, dropdown menu, navigate menu):

http://kas1e.mikendezign.com/aos4/irrli ... adgets.jpg

Probably can be same kind of issue with colorkey ..

Any help apprecated, thanks !
Last edited by kas1e on Sun Mar 11, 2018 9:45 am, edited 1 time in total.
kas1e
Posts: 212
Joined: Sun Jan 21, 2018 8:39 am

Re: OpenGL renderer on BigEndian (minor issues)

Post by kas1e »

To add, issue with 06.2Dgraphics example happens and with opengl renderer and with burning video one, but all looks correct in software renderer. So its something which share opengl and burning, but not software. What it can be ?:)
Post Reply