PDA

View Full Version : Splitscreen



Starnut coder
01-26-2001, 06:08 PM
Say im in 800x600x16 fullscreen mode.
I want to split the screen into two screens.
Like in two player racing games. Both should see diffrent parts of the world.
Does anyone have an idea how i could do that.
Thanks in advance.

2
01-27-2001, 07:44 PM
If you use GLUT, it's easy... just create a couple subwindows.

Starnut coder
01-27-2001, 08:03 PM
If you use GLUT, it's easy... just create a couple subwindows.

Sounds good:
Could you give me an example code.
Thanks

ZeeBoy
01-28-2001, 01:56 PM
too get a spli screen u will need to have 2 view ports

glViewport(....)
3d geometry
glViewport(....)
3d geometry

given thar ur resolution is 600x800 then the parameters for this will be

glViewport(0,0,800,300) and
glViewport(300,0,800,600) respectively

this will give u a horizontal split screen.

Hope that helps!!

Zee

Starnut coder
01-29-2001, 02:07 AM
Hope that helps!!

Thanks its just what i was looking for, I
got the splitscreen working now.
Thanks