Time for another work log.
This time I have finally implemented the single largest change in design for the new engine - the Viewport. The last engine really only had one world and one camera that could be active for the frame to be rendered and this was something I wanted to change for HPL2.
The way the viewport system works is that one can create one or many viewport objects and each object can contain a World, Camera, Renderer, RenderTarget, etc. None of these objects need to be unique for a given Viewport, meaning that you can have multiple Viewports with the same World if you want to get many different views on the same scene. Each of these Viewports can also have different Renderers assigned to them. By using this functionality one can let different views be rendered in different ways, one wireframe, one normal, one heatvision and so on.
The view ports can also be rendered to textures letting you do TV screens that show display the view from a security camera or something completly different like a mini-game taking place in a totally sepperate game world. The possibilities are endless and this will make the new engine a lot more powerful and versatile.
The demo app for this work log renders one world, from 4 different views. This is done using 4 Viewports each with a unique Camera and all pointing to the same World. It also renders another world (only containing a spinning box) to a texture and displays it translucently on top of the other views. The Viewport that renders the texture with the box and large text has no World or Camera and is only used for 2D drawing.
Please check so it looks like the attached screenshot, else take a screenshot and post it below and I will try and fix.
DEMO DETAILS
---------------
Download Link:
http://www.unbirthgame.com/files/MultipleViews.zip
Minimum Requirements:
Radeon 9600 / Geforce FX
Controls:
F8: Screenshot
Comments:
Yeah, graphics look crap
I will soon start working on a proper renderer