MinVR
0.9.0
A multi-platform virtual reality library
|
Base class for vr engines. More...
Public Member Functions | |
AbstractMVREngine () | |
virtual | ~AbstractMVREngine () |
virtual void | init (int argc, char **argv) |
Initialize the engine. More... | |
virtual void | init (ConfigMapRef configMap) |
Initialize the engine. More... | |
virtual void | runApp (AbstractMVRAppRef app) |
Start the main loop. More... | |
virtual void | runOneFrameOfApp (AbstractMVRAppRef app) |
Draws a frame of the graphics. More... | |
virtual void | initializeContextSpecificVars (int threadId, WindowRef window) |
Initialize thread specific variables. More... | |
virtual void | initializeLogging () |
Initialize Boost Log v2.0. More... | |
Protected Member Functions | |
virtual void | setupWindowsAndViewports () |
Creates windows and viewports. More... | |
virtual WindowRef | createWindow (WindowSettingsRef settings, std::vector< AbstractCameraRef > cameras)=0 |
Creates a window. More... | |
virtual void | setupInputDevices () |
Creates Input Devices. More... | |
virtual void | setupRenderThreads () |
Creates render threads. More... | |
virtual void | pollUserInput () |
Poll the input devices for input. More... | |
virtual void | updateProjectionForHeadTracking () |
Updates head positions. More... | |
Protected Attributes | |
AbstractMVRAppRef | _app |
ConfigMapRef | _configMap |
std::vector< EventRef > | _events |
std::vector< WindowRef > | _windows |
std::vector < AbstractInputDeviceRef > | _inputDevices |
std::vector< RenderThreadRef > | _renderThreads |
boost::mutex | _threadsInitializedMutex |
boost::condition_variable | _threadsInitializedCond |
boost::mutex | _startRenderingMutex |
boost::condition_variable | _startRenderingCond |
boost::mutex | _renderingCompleteMutex |
boost::condition_variable | _renderingCompleteCond |
boost::shared_ptr< boost::barrier > | _swapBarrier |
boost::posix_time::ptime | _syncTimeStart |
unsigned long | _frameCount |
The MVREngine handles creating the windows, threads, devices, and mainloop.
MinVR::AbstractMVREngine::AbstractMVREngine | ( | ) |
|
virtual |
|
protectedpure virtual |
Called from setupWindowsAndViewports to create a window
[in] | Window | settings specifying the dimensions, position, and properties of the window |
[in] | Array | of cameras corresponding with viewports for the new window. |
Implemented in MinVR::MVREngineGLFW.
|
virtual |
Reads config files and parameters based on 'standard' command line arguments then initializes graphics windows etc. based on this info.
|
virtual |
Use this version of init instead and pass it config settings in the configMap argument if you want to handle your own command line arguments
[in] | A | map of configuration parameters. |
[in] | Log | file. |
|
virtual |
Called from each renderthread to initialize needed variables
[in] | A | thread specific id |
[in] | Window | reference for the calling renderthread. |
|
virtual |
Sets up the logging file to the console and log file using Boost.Log v2.0
|
protectedvirtual |
Iterates through the input devices and windows polling each for input. the input is sorted based on increasing time.
|
virtual |
This version of run takes over the main loop of the program, call it after init when you are ready to start processing user input and rendering graphics
[in] | A | VR application reference. |
Reimplemented in MinVR::MVREngineGLFW.
|
virtual |
Use this version instead and call it repeatedly from your own mainloop if your program design requires you to manage your own mainloop
[in] | A | VR application reference. |
|
protectedvirtual |
Called from init to create input devices based on the vrsetup file
|
protectedvirtual |
Creates a new thread for each window specified in the vrsetup file. The threads are used for multi-threaded rendering.
|
protectedvirtual |
Called from init to create windows and viewports based on the vrsetup file
|
protectedvirtual |
Updates each camera in every window with the new head location.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |