Blitting Functions In SDL_OPENGLBLIT Context

Hey friends, i have a doubt. I’m working on a game engine with SDL. And
somebody told me that is better to use OpenGL for blitting…but he did it
with no tests, nor anything. So i was wondering if SDL uses, when the
SDL_OPENGLBLIT context is passed to de SDL_SetVideoMode();, OpenGL blitting
function instead of the ones that it uses when SDL_OPEN… is not passed.
Or if the functions used in both cases are the same.

Thanxs…–
Phantom Lord
Caelis Studios —> From Gods Hands To Yours

Hi Phantom,

The short answer is no. If you want to simulate 2D using 3D, you can
do so using an orthogonal perspective view, with the frustum and
viewport set to the window coordinates. To draw the 2D images, you use
3D textures. To draw characters, you can use quads from a character
map. Note that SDL_LoadBMP tends to flip the image around. To
compensate, flip the texture coordinates. Since I’m working on such a
game (in my “free” time), maybe I’ll write a tutorial some day.

If your still interested in using SDL_OPENGLBLIT, here is a useful resource:
http://www.libsdl.org/pipermail/sdl/2001-November/039852.html-----
Matt Johnson
Graphics Developer
VCom3D, Inc.

Hey friends, i have a doubt. I’m working on a game engine with SDL. And
somebody told me that is better to use OpenGL for blitting…but he did it
with no tests, nor anything. So i was wondering if SDL uses, when the
SDL_OPENGLBLIT context is passed to de SDL_SetVideoMode();, OpenGL blitting
function instead of the ones that it uses when SDL_OPEN… is not passed.
Or if the functions used in both cases are the same.

Thanxs…

Phantom Lord
Caelis Studios —> From Gods Hands To Yours

My doubt was this:
"If I Call Some SDL blit function, does SDL use, internally, some OpenGL
routines for blitting?. Or i will improve the perfomance if i use OpenGL
instead of SDL for blitting?.

Thanx for your interest.
And dont forget to send me a copy of that game…just to test it.

2006/2/23, Matt J :>

Hi Phantom,

The short answer is no. If you want to simulate 2D using 3D, you can
do so using an orthogonal perspective view, with the frustum and
viewport set to the window coordinates. To draw the 2D images, you use
3D textures. To draw characters, you can use quads from a character
map. Note that SDL_LoadBMP tends to flip the image around. To
compensate, flip the texture coordinates. Since I’m working on such a
game (in my “free” time), maybe I’ll write a tutorial some day.

If your still interested in using SDL_OPENGLBLIT, here is a useful
resource:
http://www.libsdl.org/pipermail/sdl/2001-November/039852.html


Matt Johnson
Graphics Developer
VCom3D, Inc.

Hey friends, i have a doubt. I’m working on a game engine with SDL. And
somebody told me that is better to use OpenGL for blitting…but he did
it
with no tests, nor anything. So i was wondering if SDL uses, when the
SDL_OPENGLBLIT context is passed to de SDL_SetVideoMode();, OpenGL
blitting
function instead of the ones that it uses when SDL_OPEN… is not
passed.
Or if the functions used in both cases are the same.

Thanxs…

Phantom Lord
Caelis Studios —> From Gods Hands To Yours


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


Phantom Lord
Caelis Studios —> From Gods Hands To Yours