OpenGL + SDL_BlitSurface()

Hi!
I want to do 2D frame (about 30 px wide) around 3D openGL view
but I can’t use both (OpenGL and SDL_BlitSurface()) at once :frowning:
When I comment one of them is it works ok - separatly OpenGL
and separatly SDL_BlitSurface() works fine.
Can You help me? Some short example?
Thanks.
Slawus.
Ps. I’m using Linux + SDL 1.2.2 + nVidia OpenGL.----------------------------------------------------------------------
2 miliardy stron pod jednym adresem. A to dopiero poczatek…
Nowe Centrum Wyszukiwania >> http://szukaj.interia.pl/

Here we go again…

(Still not in the FAQ? I could write an entry, but not until Kobo
Deluxe 0.3 is released.)

'On Thursday 25 October 2001 22:09, S?awu? wrote:

Hi!
I want to do 2D frame (about 30 px wide) around 3D openGL view
but I can’t use both (OpenGL and SDL_BlitSurface()) at once :frowning:

Actually, you can (using the SDL_OPENGLBLIT flag), but you definitely
shouldn’t.

When I comment one of them is it works ok - separatly OpenGL
and separatly SDL_BlitSurface() works fine.
Can You help me? Some short example?

Descriptions and example code has been posted to this list countless
times, and several times just the last few weeks.

In short: Use glOrtho() and the usual OpenGL texture stuff.

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -’

Dnia czw 25. pa?dziernik 2001 23:31, napisa?e?:

?> I want to do 2D frame (about 30 px wide) around 3D openGL view
?> but I can’t use both (OpenGL and SDL_BlitSurface()) at once :frowning:

?Actually, you can (using the SDL_OPENGLBLIT flag), but you definitely
?shouldn’t.

I do but it isn’t work correctly :frowning:

?In short: Use glOrtho() and the usual OpenGL texture stuff.

Thanks. I understood I must use OpenGL stuff, ok.
How about glDrawPixels() vs. glOrtho() + texturing ?–
? ? Slawus.


Pliki wideo za jednym kliknieciem. Wyszukiwarka multimediow.
Nowe Centrum Wyszukiwania >> http://szukaj.interia.pl/

Dnia czw 25. pa?dziernik 2001 23:31, napisa?e?:

?> I want to do 2D frame (about 30 px wide) around 3D openGL view
?> but I can’t use both (OpenGL and SDL_BlitSurface()) at once :frowning:

?Actually, you can (using the SDL_OPENGLBLIT flag), but you
definitely shouldn’t.

I do but it isn’t work correctly :frowning:

Why? (Keep in mind that you’re not blitting to the real display buffer,
but into a software back buffer with an alpha channel.)

?In short: Use glOrtho() and the usual OpenGL texture stuff.

Thanks. I understood I must use OpenGL stuff, ok.
How about glDrawPixels() vs. glOrtho() + texturing ?

Don’t use glDrawPixels() - it’s probably even worse than the
SDL_OPENGLBLIT flag! It’s usually very slow, and may even be totally
unaccelerated on some cards/drivers.

The general rule is “Use what the most popular 3D games are using”. Those
features are what most consumer 3D cards and drivers are optimized for,
so they’re usually fast and solid. Many drivers come with broken, slow or
incorrect implementations of more “exotic” OpenGL features. (That’s why
many 3D gaming cards are useless for more “serious” OpenGL applications.
Fortunately though, the difference seems to be getting smaller, as games
need more detail, while applications have to become more responsive. High
end and consumer features are showing up it the same chips as GPU
companies join forces to save time and money.)

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Friday 26 October 2001 01:41, Slawus wrote:

Dnia czw 25. pa?dziernik 2001 23:31, napisa?e?:

I want to do 2D frame (about 30 px wide) around 3D openGL view
but I can’t use both (OpenGL and SDL_BlitSurface()) at once :frowning:

Actually, you can (using the SDL_OPENGLBLIT flag), but you definitely
shouldn’t.

I do but it isn’t work correctly :frowning:

In short: Use glOrtho() and the usual OpenGL texture stuff.

Thanks. I understood I must use OpenGL stuff, ok.
How about glDrawPixels() vs. glOrtho() + texturing ?–
? ? Slawus.