[SDL] Beginner question: OpenGL surface just as part of SDL window

David Olofson david at olofson.net
Mon Feb 19 09:37:01 PST 2007


On Monday 19 February 2007 18:32, 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?

I think the best way to do this (and the way many 3D modellers and 
similar apps do it) is to do it all in OpenGL, one way or another.

With a "normal" GUI toolkit you'd use one OpenGL context for each view 
(which has some advantages, at least if you have proper drivers and 
threading), but other options include using one context for all 
views, and using OpenGL for the entire window, GUI included. The 
latter options can be done with SDL 1.2.


//David Olofson - Programmer, Composer, Open Source Advocate

.-------  http://olofson.net - Games, SDL examples  -------.
|        http://zeespace.net - 2.5D rendering engine       |
|       http://audiality.org - Music/audio engine          |
|     http://eel.olofson.net - Real time scripting         |
'--  http://www.reologica.se - Rheology instrumentation  --'


More information about the SDL mailing list