Open kevancress opened 2 years ago
nevermind, sheets were a total hack where I just rendered the view to an image, stored that as a buffer and then rendered that with an offset... Title block implementation would be better to pull from...
Got the basic transforms working by adapting the titleblock drawing code. 75bdfe71bb00eeb9540a589608476e257e97c0b8
Depth testing is going to be an issue, need to render and store each viewports depth buffer to test against... might be okay for vector rendering, not sure how we do it live for opengl rendering...
This also needs frustrum culling / clipping based on the viewport views camera...
Sheets are basically non-functional right now...
I think a better approach to this is to make a "Viewport" object that can be placed in the scene (attached to an empty) which renders the contents of a view (with appropriate camera transform and scale etc.
Viewports should still be able to reference views from other scenes, so that wall schedules etc. can all be defined cleanly in a seperate drawing space.
The core math for this is already there in sheets as they are now, but this would be a more familiar implementation that would be useable.
Steps for this are: