I’ve actually only just noticed (now that I have some colour images)
that my bmp files are 32bit ARGB format, for my opengl textures I need
them to be RGBA ( I just noticed everything red is showing as blue and
alpha blending isn’t working properly )
Is there a SDL built-in quick way of converting between ARGB and RGBA?
Technically they are compatible with GL_BGRA instead of GL_RGBA, give it a try.
Windows calls it ARGB because it is backwards (little endian) :)On 02/27/2010 02:34 PM, Ian Norton wrote:
Hello all,
I’ve actually only just noticed (now that I have some colour images)
that my bmp files are 32bit ARGB format, for my opengl textures I need
them to be RGBA ( I just noticed everything red is showing as blue and
alpha blending isn’t working properly )
Is there a SDL built-in quick way of converting between ARGB and RGBA?
Thanks
Ian
–
LordHavoc
Author of DarkPlaces Quake1 engine - LadyHavoc's DarkPlaces Quake Modification
Co-designer of Nexuiz - Nexuiz Classic – Alientrap
“War does not prove who is right, it proves who is left.” - Unknown
“Any sufficiently advanced technology is indistinguishable from a rigged demo.” - James Klass
“A game is a series of interesting choices.” - Sid Meier
I had a mess about with SDL_ConvertSurface and as you say through
trial and error and am converting from what looks like BGRA
Gimp was telling me it was ARGB.
All working now thanksOn 28 Feb 2010, at 12:06, Forest Hale wrote:
On 02/27/2010 02:34 PM, Ian Norton wrote:
Hello all,
I’ve actually only just noticed (now that I have some colour images)
that my bmp files are 32bit ARGB format, for my opengl textures I
need
them to be RGBA ( I just noticed everything red is showing as blue
and
alpha blending isn’t working properly )
Is there a SDL built-in quick way of converting between ARGB and
RGBA?
Thanks
Ian
Technically they are compatible with GL_BGRA instead of GL_RGBA,
give it a try.
Windows calls it ARGB because it is backwards (little endian)
–
LordHavoc
Author of DarkPlaces Quake1 engine - LadyHavoc's DarkPlaces Quake Modification
Co-designer of Nexuiz - Nexuiz Classic – Alientrap
“War does not prove who is right, it proves who is left.” - Unknown
“Any sufficiently advanced technology is indistinguishable from a
rigged demo.” - James Klass
“A game is a series of interesting choices.” - Sid Meier
Gimp refers to the pixel layout on disk, SDL refers to the pixel
layout in memory.
See ya!On Sun, Feb 28, 2010 at 8:06 AM, Ian Norton wrote:
Thanks
I had a mess about with SDL_ConvertSurface and as you say through trial and
error and am converting from what looks like BGRA
Gimp was telling me it was ARGB.
All working now thanks
On 28 Feb 2010, at 12:06, Forest Hale wrote:
On 02/27/2010 02:34 PM, Ian Norton wrote:
Hello all,
I’ve actually only just noticed (now that I have some colour images)
that my bmp files are 32bit ARGB format, for my opengl textures I need
them to be RGBA ( I just noticed everything red is showing as blue and
alpha blending isn’t working properly )
Is there a SDL built-in quick way of converting between ARGB and RGBA?
Thanks
Ian
Technically they are compatible with GL_BGRA instead of GL_RGBA, give it a
try.
Windows calls it ARGB because it is backwards (little endian)
–
LordHavoc
Author of DarkPlaces Quake1 engine - LadyHavoc's DarkPlaces Quake Modification
Co-designer of Nexuiz - Nexuiz Classic – Alientrap
“War does not prove who is right, it proves who is left.” - Unknown
“Any sufficiently advanced technology is indistinguishable from a rigged
demo.” - James Klass
“A game is a series of interesting choices.” - Sid Meier