What I want to do is create my graphics to be independent of the game framework. So basically the graphics won't know anything until it is told where things are. so the thought was that every GameObject would hold its own transform like here, but then I would also want to calculate the camera, and say a directional light based on these as well.
My thought was to in an update method:
- receive a container of objects,
- step through them to get the needed data to be rendered (full transform matrix, and enums resulting in model to be rendered, and texture/material to be applied)
3.0 put that data into something like a stack. 3.1. when the player object is found calculate the position of the camera behind/above the player at a determined downward angle, and a directional light in front of the player at the same orientation.
- 4.in the render method pop the information off the stack to be rendered to the screen.
- 5.possibly using the frustum of the camera to ignore some objects (can be overlooked)
I have gotten steps 1, 3.0 and 4 completely working, step 2 I can get the enums out, but I still don't know how to apply the transform matrix to be usable (answers to above link would be greatly appreciated), and then 3.1 is a total mystery to me. as stated 5 would be nice, but can be overlooked if not possible (formatting edit requested)