Sign in to follow this  
  • entries
    455
  • comments
    639
  • views
    422438

GTL : The 32bit image strangeness

Sign in to follow this  
_the_phantom_

79 views

So, I wanted todo some work on a MD5mesh loader the other day and so I fired up my old source code, created a nice new project (after my other got lost in a harddrive accident), imported the old code which survived and plugged in GTL for the texture loading stuff.

Things didnt go to plan... apon investigating the textures werent coming out right. I figured this was down to the BGRA layout of the image data, so I put in something to swap things to RGBA and still no dice..

This was a tad strange but at the time I didnt have the focus to dedicate to fixing it.

Today I got the GTL test program out, moved a RGBA TGA texture into the directory to use it and fired it up.

The texture comes out very... blue.

A couple of screen caps later and some comparing work, it seems like for some reason the blue channel is always ending up with 255 in it on the main image and 51 in the alpha channel section.

This is a tad bothersome, as the image is uncompressed and thus its just a straight file read with the boost::iostreams library at this point.

So, it looks like I'm going to have todo some low level debugging to work out just what the hell is going on with it all, coz its rather confusing that just one channel should be effected, as apart from that the image looks right.

If anyone has any bright ideas as to whats going on then throw 'em my way, please [grin]

The good news however, is that both GTL and OGLWFW compile and run fine as 64bit code, so yay! for a lack of portibility issues [grin]

edit: heh, turns out I'm a moron (this is about the 4th time in 2 weeks as well...), I had blending switched on and I tend to use a slight 'blue' tint to my colour file... so when blended, yep, you guessed it, it comes out more blue, switch blending off and it all works fine.. I'll be shooting myself now...
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now