OpenGL offscreen confusion

I’m trying to find a portable way to draw to an offscreen area with
openGL. I’d think this would be easy…but it’s not. As far as I can tell,
there are entirely different implementations on every platform, and some
don’t even seem to use the various (and window-manager specific?) openGL
extensions.

The reason I’m sending this to the SDL mailing list is that, unless
someone can enlighten me on a crossplatform offscreen buffer solution, it
seems like it would be a good addition to SDL.

Comments/criticism would be appreciated, I can’t figure out what the
hell’s going on (there’s no really good documentation on this sort of
thing, oddly).

–oberon

I’m trying to find a portable way to draw to an offscreen area with
openGL. I’d think this would be easy…but it’s not. As far as I can tell,
there are entirely different implementations on every platform, and some
don’t even seem to use the various (and window-manager specific?) openGL
extensions.

The reason I’m sending this to the SDL mailing list is that, unless
someone can enlighten me on a crossplatform offscreen buffer solution, it
seems like it would be a good addition to SDL.

Comments/criticism would be appreciated, I can’t figure out what the
hell’s going on (there’s no really good documentation on this sort of
thing, oddly).

–oberon

According to a recent thread here cross platform pbuffer support is
being added to SDL. Hopefully Sam will pop in and give you more details.
But, you migth try looking at the archive and looking in the CVS code
for it.

AFAIK pbuffers are pretty much the only solution to the problem.

Hope that helps,

	Bob PendletonOn Wed, 2003-09-17 at 20:47, oberon wrote:

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

±----------------------------------+

According to a recent thread here cross platform pbuffer support is
being added to SDL. Hopefully Sam will pop in and give you more details.

Yup, the new SDL 1.3 branch has support for offscreen render targets.
http://www.libsdl.org/cvs/SDL-1.3.tar.gz

The new functions are:
SDL_GL_CreateRenderTarget()
SDL_GL_GetRenderTargetAttribute()
SDL_GL_BindRenderTarget()
SDL_GL_LockRenderTarget()
SDL_GL_UnlockRenderTarget()
SDL_GL_FreeRenderTarget()
You can see a demo of them in the new testrendertarget.c file in the
test subdirectory.

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

“Sam Lantinga” ha scritto nel messaggio
news:E1A19JU-0007Fh-00 at twomix.devolution.com

According to a recent thread here cross platform pbuffer support is
being added to SDL. Hopefully Sam will pop in and give you more details.

Yup, the new SDL 1.3 branch has support for offscreen render targets.
http://www.libsdl.org/cvs/SDL-1.3.tar.gz

The new functions are:
SDL_GL_CreateRenderTarget()
SDL_GL_GetRenderTargetAttribute()
SDL_GL_BindRenderTarget()
SDL_GL_LockRenderTarget()
SDL_GL_UnlockRenderTarget()
SDL_GL_FreeRenderTarget()
You can see a demo of them in the new testrendertarget.c file in the
test subdirectory.

GREATS !!!

1.3 suport multi windows and multi viewport for ogl ??? (good to vrite a
multi platform editing engine …)

tnx sam

Ack, don’t make that assumption!

What was added was support for rendering out to a memory as opposed
to rendering straight to video display. Useful for so called
rendering to texture amoung other things. So no multiple windows,
yet. You can already have multiple windows in a single viewport
through standard OpenGL calls.

Goul_duKat wrote:

“Sam Lantinga” ha scritto nel messaggio
news:E1A19JU-0007Fh-00 at twomix.devolution.com

According to a recent thread here cross platform pbuffer support is
being added to SDL. Hopefully Sam will pop in and give you more
details.> >

Yup, the new SDL 1.3 branch has support for offscreen render targets.
http://www.libsdl.org/cvs/SDL-1.3.tar.gz

The new functions are:
SDL_GL_CreateRenderTarget()
SDL_GL_GetRenderTargetAttribute()
SDL_GL_BindRenderTarget()
SDL_GL_LockRenderTarget()
SDL_GL_UnlockRenderTarget()
SDL_GL_FreeRenderTarget()
You can see a demo of them in the new testrendertarget.c file in the
test subdirectory.

GREATS !!!

1.3 suport multi windows and multi viewport for ogl ??? (good to vrite a
multi platform editing engine …)

tnx sam


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

1.3 suport multi windows and multi viewport for ogl ??? (good to vrite a
multi platform editing engine …)

Probably best not to ask for or promise anything at this moment. :slight_smile:

–ryan.