Problem with blitting & OpenGL

Hello World,

If I miss a recent thread, excuse me.

I’m a new user to SDL (great great work btw). I use
the OpenGL mode with 1.1 libs. I have SDL_Surface to
store my texture on the app side, and then transform them to
OpenGL texture objects. My problem is that surface blitting
copy only the red channel:

 If I have :

surface A depth 24 and with good pixel values (I checked),
surface B depth 24, all values are 0 (I checked)

if I do SDL_BlitSurface(A,NULL,B,NULL); to blit A on B,
then B is filled with only the red channel after the blit. :frowning:

Is this a known problem ?

                        Franck.
 If I have :

surface A depth 24 and with good pixel values (I checked),
surface B depth 24, all values are 0 (I checked)

if I do SDL_BlitSurface(A,NULL,B,NULL); to blit A on B,
then B is filled with only the red channel after the blit. :frowning:

Is this a known problem ?

No, it is not.
Can you send a sample app which reproduces this bug?

Ideally it would not use OpenGL, but blit from one surface to the other
and then to the screen.

Thanks!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Hello Sam,

Ok, I'll make a sample case. I think it only appens

when OpenGL is enabled. I’ll try both way.

                Franck.

Sam Lantinga wrote:>

Franck guillaud wrote

if I do SDL_BlitSurface(A,NULL,B,NULL); to blit A on B,
then B is filled with only the red channel after the blit. :frowning:

Is this a known problem ?

No, it is not.
Can you send a sample app which reproduces this bug?

Ideally it would not use OpenGL, but blit from one surface to the other
and then to the screen.

Thanks!