I have to use 1.7.5 as we have some fully QA'd code that can't have a library changed out from under it without complete retesting. Though I have tried with the latest and get the same problem.
I am creating a texture atlas using ilTexImage with a blank color, then using ilBlit to overlay the texture images on it in their atlased positions. It works usually works flawlessly but if I run my app, which is a MFC app, from the command line and hide the mainframe (as if it were a cmd line app), I get an error in ilBlit. It could be a coincidence that I am only seeing it in cmd line mode.
It is an exception in the alpha copy, the "Front =" call below. And it only seems to happen when the source image originally had no alpha value, even though they are converted to have an alpha value (I always convert everything to IL_BGRA).
Front = Converted[AlphaIdx]/((float)IL_MAX_UNSIGNED_BYTE);
Anyone have any suggestions from looking at the code? Is it possible that, even though I've done the conversion, the memory is not getting updated to have the extra space for the alpha value?
And to add more information - the images are always flipped as I always operate with the origin as IL_ORIGIN_LOWER_LEFT.
I got past this - there turned out to be a problem on my end - but I still think there might be a couple of problems here that I am just avoiding.
I think the problem I had would still be an issue - trying to overlay an image with Bpp of 3 over an image with Bpp of 4.
Also, it's small, but if you use the origin as lower left you still have to specify the offset from top left. Easy to calculate but it should be done in the call.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.