Weirdness

Started by
2 comments, last by Almo 18 years, 8 months ago
Okay, I'm writing the mutli-player split-screen test PC version of a game which will ship on the PSP. We're using Unreal Engine. Here's the problem: I create a large window, big enough to accomodate two game screens, with these window styles: style = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_THICKFRAME; Then I make a child window with these styles: style = WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS; These are attached to Viewports. The main window (with the title bar) is instructed to draw on the top half, and the child window is instructed to draw on the bottom half (I think). If I just draw the mainwindow viewport, it shows in the right place. If I draw both, the main one draws on the bottom, and the child draws on top. Here's the weird bit which may indicate what I've done wrong: If I make the child viewport half its normal width, it draws in the upperleft corner. The upper right corner is the left half of the main viewport, and the lower left corner is the right half of the main viewport. More background: I'm taking a strictly singleplayer game's codebase and hacking in the multiplayer. That's why I'm confused about something basic like this. :(
Almo!
Advertisement
Can you use one big window and use different viewports for the two split screens?
_______________________________________________________________________Hoo-rah.
Well, that was what I tried before writing the post above. It turns out that Unreal REALLY wants a viewport attached to each window, and a PlayerController attached to each viewport. As I followed the trail of stuff that would need to change to do this, I realized it probably wouldn't work that way. :(

Almo!
Fixed.

Was using the same space on the backbuffer for rendering, and I didn't know Present might be delayed. So I had rendered viewport 2 on top of 1 by the time the present happened. Fixed by rendering to different portions of the back buffer.
Almo!

This topic is closed to new replies.

Advertisement