Sign in to follow this  
arithma

Split Screen

Recommended Posts

Guest Anonymous Poster   
Guest Anonymous Poster
As I understand it either by creating two devices or using swap chains.

Both techniques are described here:
http://www.codesampler.com/dx9src/dx9src_1.htm

Share this post


Link to post
Share on other sites
SpreeTree    396
Another simple way is to render to multiple textures and render each texture as a slit screen.

Yout have to be aware of aspect ratio issues and what-not regardless of what method you use.

Spree

Share this post


Link to post
Share on other sites
Muhammad Haggag    1358
Use viewports. You should never create 2 devices in the same time. No need for swapchains or render-to-texture.

Lookup D3DVIEWPORT9 and IDirect3DDevice9::SetViewport. You basically set a viewport that covers half of the screen, render everything from the view player 1, then change the viewport to cover the other half and render everything from the view of player 2.

Share this post


Link to post
Share on other sites
d000hg    1199
Do you mean split-screen on a single monitor, or using multiple monitors, one for each player?

For the first, you just want to look into Viewports. To support multiple monitors it depends if this is D3D or DDraw. For D3D you basically create a device for each monitor, attached to a window on the monitor. I have some code for this if you're interested?

Share this post


Link to post
Share on other sites
helix    301
One caveat with viewports is that they (or even a tiny section) can't be offscreen. VERY bad things happen. But your split-screen shouldn't have that issue if created properly.

Share this post


Link to post
Share on other sites
d000hg    1199
But why would you want to? What does happen out of interest - I'd have thought SetViewport would return an error if it's going to cause rendering to break things...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this