Cockpit Camera in MFC Pane
This is a simple example illustrating how to create a cockpit camera (showing the cockpit of the controlled entity) in an MFC pane. File:CustomCamera.rar
Main highlights:
• Creating a normal extension project
• Adding a pane based on a dialog
• Wiring up a Start/End methods to the dialog for initialization and cleanup, based on the extension lifecycle
• Adding a picturebox control as a place holder for the viewport
• Creating the camera based on the viewport and the root AGI handle for the specific console
• Setting camera relative position, much like a preset view (in meters)
• Rendering the camera as a response to the event. The event is published by the engine and is signaling when is the appropriate time to render.
Please note that the attached project was created in VS2005. In order to update the project to VS2010, see Converting VS2005 projects to VS2010.