[SDL] Beginner question: OpenGL surface just as part of SDL window
Scott Harper
lareon at comcast.net
Mon Feb 19 21:34:14 PST 2007
Unfortunately, there's no really "clean" way to do this, and the
method required can potentially be as sluggish (relatively) as
however many views you have times the single view render time.
You basically have to use glViewport for each, ah, view port you want
to have, then set the viewing parameters (orthographic, perspective,
camera angle/location, etc...) and render the scene, rinse and repeat
for each view.
It seems to me that a more code-clean situation might keep track of
different view areas and draw to them all, but seeing as how OpenGL
was designed to be simple, powerful, and fast, I understand why this
kind of thing is lacking. And really if you code it right it can
still be kept very clean indeed.
I ramble, but the long-and-short of it is:
4 views = 4 renders of the whole scene.
You can of course only render/enable certain things in each view if
you want. Perhaps rendering everything in the perspective view, then
switching over to an overhead-map view which only renders players (as
triangles), landscape, and buildings, but without any textures. That
would drastically simplify both the rendering requirements and the
interface. I mean, who wants to see specular and normal mapping in
their overhead map anyway, right?
Just some thoughts,
-- Scott
On Feb 19, 2007, at 10:32 AM, Jörgen Kornfeld wrote:
> Hi all,
> is it possible to place in one window (or fullscreen) 4 different
> views
> on some data? So 3 ones should display 2d slices and the fourth one
> should be opengl rendered. Easy to do or are sluggish work-arounds
> required?
>
> Thanks a lot,
> Jörgen
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
More information about the SDL
mailing list