Drawing with OpenGL on arbitrary surfaces

I was sure, when I picked SDL, that there was support for rendering
with OpenGL on arbitrary surfaces, yet reading the documentation and
video/wincommon/SDL_wingl.c (from the 1.2.0 release) I see that it
only renders to the current window, hence the confusion with
SDL_DOUBLEBUF and SDL_GL_DOUBLEBUFFER doing different things.

On Win32, I know that there’s a way to set-up a Device Context to
point to an arbitrary block of memory (say, an SDL surface), however
the only proof I have of that is an obscure MFC example and it looks
messy.

Can this be done on other platforms? What are my options if I want to
be able to do some post-processing on OpenGL-rendered graphics??–

Olivier A. Dagenais - Software Architect and Developer

That’s not accelerated in windows - you make a context for a DIB which gets
you the icky microsoft renderer

There is the pbuffer extension which is starting to show up in Windows, but
that’s not for an arbitrary chunk of memory - just an off screen chunk

So for post processing accelerated rendering, you’d really need to
glReadPixels, sdl or no

I know in windows & linux you can get a software renderer to memory, so I
suspect that’s available most anywhere.

-Manny

At 07:56 PM 4/13/2001 -0700, you wrote:>I was sure, when I picked SDL, that there was support for rendering

with OpenGL on arbitrary surfaces, yet reading the documentation and
video/wincommon/SDL_wingl.c (from the 1.2.0 release) I see that it
only renders to the current window, hence the confusion with
SDL_DOUBLEBUF and SDL_GL_DOUBLEBUFFER doing different things.

On Win32, I know that there’s a way to set-up a Device Context to
point to an arbitrary block of memory (say, an SDL surface), however
the only proof I have of that is an obscure MFC example and it looks
messy.

Can this be done on other platforms? What are my options if I want to
be able to do some post-processing on OpenGL-rendered graphics??

Olivier A. Dagenais - Software Architect and Developer