Using SDL surfaces with OpenGL

Hi!

I’ve got a program running in double buffer mode using HWSURFACE.

Now I want to modify it this way:
I want to display an OpenGL rectangle covering all the screen with a texture
mapped on it. This texture (you’ve probably guessed) should be the surface I
formerly used to display the screen.

I want this because I want to accelerate the display and use antialiasing.

If you have any experience on how to do this, please help me.

Hi!

I’ve got a program running in double buffer mode using HWSURFACE.

Now I want to modify it this way:
I want to display an OpenGL rectangle covering all the screen with a texture
mapped on it. This texture (you’ve probably guessed) should be the surface I
formerly used to display the screen.

You need to use SDL’s OpenGL support instead of 2D hardware double-buffering.
Unfortunately, you will not be able to quickly blit to the screen when you
use OpenGL.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

I read that an SDL_OPENGLBLIT mode existed. Is it implemented ? Does it
enable me to do both Open GL and direct blitting ?

Le Jeudi 23 Ao?t 2001 14:48, vous avez ?crit :> > Hi!

I’ve got a program running in double buffer mode using HWSURFACE.

Now I want to modify it this way:
I want to display an OpenGL rectangle covering all the screen with a
texture mapped on it. This texture (you’ve probably guessed) should be
the surface I formerly used to display the screen.

You need to use SDL’s OpenGL support instead of 2D hardware
double-buffering. Unfortunately, you will not be able to quickly blit to
the screen when you use OpenGL.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Julien Olivier

I read that an SDL_OPENGLBLIT mode existed. Is it implemented ? Does it
enable me to do both Open GL and direct blitting ?

Yes, but it’s slow, and it can be difficult to get it to do exactly what
you want, due to the “screen” having an alpha channel.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment