PDA

View Full Version : OpenGL with split window



Nick
04-26-2000, 07:30 PM
Hi! Could anybody tell me how to draw in
several contexts at the same time if it's possible, and how to realize OpenGL with split window

Thanks

Nick

drumminj
04-27-2000, 05:25 AM
I'm not sure about having multiple contexts. If you're talking in windows, I believe you can only have one rendering context, but perhaps that's only per thread or window.

As far as a split screen, you can set up two different viewports, one for the top of the window and one for the bottom(if you want it split vertically). Say your window was 400x400. You can do the following:

glViewport(0,200,400,200);

<render top image>

glViewport(0,0,400,200);

<render bottom image>

Hope that's what you were looking for...