About Store Forum Documentation Contact



Post Reply 
[solved] Split screen via Gui & Viewports
Author Message
gwald Offline
Member

Post: #1
[solved] Split screen via Gui & Viewports
Hello,
I got viewports working fine for horizontal split screen.
I added a world and two chr's, it's all displaying fine.

I'm using your viewport example:
// fullscreen split Horiztonal
Gui+=viewport[0].create( Rect_C(0, 1, D.w()*2, D.h()*2), ViewportDraw,(Ptr)0); // create a viewport with 'user=0' to mark camera[0] usage
Gui+=viewport[1].create( Rect_C(0, -1, D.w()*2, D.h()*2),ViewportDraw,(Ptr)1); // create a viewport with 'user=1' to mark camera[1] usage



Now i'm adding the collision detection from the 17. Small Overlays example.


I notice that GUI/Viewports doesn't have as much 3d functionality like Display has.
And I get the feeling, that viewports aren't meant for split gaming (only for GUI).

Esenthel, can you confirm your library support 3d gaming via split screen?
Is there a better way rather then using GUI/Viewports?
Can I use the Display class to achieve split screen?

Hope you can help.
Mike.

My Blog
http://www.esenthel.com/community/showthread.php?tid=6043

I hang out at Esenthel IRC Channel
http://webchat.freenode.net/?channels=#Esenthel
(This post was last modified: 03-02-2013 10:39 AM by gwald.)
02-26-2013 12:07 PM
Visit this user's website Find all posts by this user Quote this message in a reply
cmontiel Offline
Member

Post: #2
RE: Split screen via Gui & Viewports
You can change the render rect and draw many times.

Code:
cam1.set();
D.viewFov(fov1);
D.viewRect(rect1);
Renderer(Render);

cam2.set();
D.viewFov(fov2);
D.viewRect(rect2);
Renderer(Render);

...

D.viewRect(NULL);

IRC: irc.freenode.net
Channel: #Esenthel
(This post was last modified: 02-26-2013 03:10 PM by cmontiel.)
02-26-2013 03:05 PM
Find all posts by this user Quote this message in a reply
gwald Offline
Member

Post: #3
RE: Split screen via Gui & Viewports
Thanks cmontiel!! smile
I thought it could be done that way, I wasn't sure what to look for.
Thank you, thank you, thank you grin
Cheers

Update: Yip works! very easy.. thanks again grin

My Blog
http://www.esenthel.com/community/showthread.php?tid=6043

I hang out at Esenthel IRC Channel
http://webchat.freenode.net/?channels=#Esenthel
(This post was last modified: 02-27-2013 12:00 AM by gwald.)
02-26-2013 11:20 PM
Visit this user's website Find all posts by this user Quote this message in a reply
cmontiel Offline
Member

Post: #4
RE: Split screen via Gui & Viewports
wink

IRC: irc.freenode.net
Channel: #Esenthel
02-27-2013 12:35 AM
Find all posts by this user Quote this message in a reply
Post Reply