Canvas view camera element: Difference between revisions

Jump to navigation Jump to search
Line 55: Line 55:
{{Note|This section provides a rough overview for the potentiaal reviewer, which is also intended to be used as the commit message when/if this should get committed}}
{{Note|This section provides a rough overview for the potentiaal reviewer, which is also intended to be used as the commit message when/if this should get committed}}


This set of patches implements a new Canvas::Element by creating a sub-class named Canvas::View. The meat of it is in the constructor, i.e. Canvas::View::View(), where an offscreen camera (RTT/FBO) is set up, the FGCanvasSystemAdapter file has been extended to provide access to the FlightGear view manager to compute/obtain the view specific view matrix, which is then updated in Canvas::View::update() accordingly.  
This set of patches implements a new Canvas::Element by creating a sub-class named Canvas::View. The meat of it is in the constructor, i.e. Canvas::View::View(), where an offscreen camera (RTT/FBO) is set up, the FGCanvasSystemAdapter file has been extended to provide access to the FlightGear view manager to compute/obtain the view specific view matrix, which is then used to update the offscreen camera in Canvas::View::update() accordingly.  


To actually test the new element using the [[Nasal Console]] and paste the following snippet of code into it:
To actually test the new element using the [[Nasal Console]] and paste the following snippet of code into it:

Navigation menu