Sign in to follow this  

Split Screen

This topic is 4534 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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
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
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
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

This topic is 4534 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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