VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
exampleSimple

This example shows how to create a simple VR-Vantage application.

There are three required steps.

The first step is to create the DtVrvApplication.

// A DtVrvApplication wraps up all the components required to build a complete
// VR-Vantage application (DtDe, DtPluginManager, DtEventLoop, and a
// DtVrvApplicationConfiguration).
DtVrvApplication igApp;

Once the application has been created, it must be initialized.

// This causes the plugin manager to load plugins, cause a Display Configuration
// to be realized, creates the default environment, etc.
igApp.initialize(argc, argv);

Finally, the application's main event loop is started.

// Creates an event loop and begins running it, causing the creation of frames.
igApp.run();

Building the Example

VR-Vantage includes pre-built versions of the example application. To build it yourself, follow the instructions at Building VR-Vantage Examples, Applications, and Plug-ins.

Running the Example

This example is an application. You can run it by running ./bin/exampleSimple.exe (on Windows) or ./bin/exampleSimple (on Linux). For more information about running examples, please see Running Applications and Examples.

Example Source Files


exampleSimple.cxx

// /******************************************************************************
// ** Copyright (c) 2008 MAK Technologies, Inc.
// ** All rights reserved.
// ******************************************************************************/
// /******************************************************************************
// ** $RCSfile: exampleSimple.cxx,v $ $Revision: 1.13 $ $State: Exp $
// ******************************************************************************/
// Use the VR-Vantage namespace. All classes in VR-Vantage are in this namespace.
using namespace makVrv;
int main(int argc,char** argv)
{
// A DtVrvApplication wraps up all the components required to build a complete
// VR-Vantage application (DtDe, DtPluginManager, DtEventLoop, and a
// DtVrvApplicationConfiguration).
// This causes the plugin manager to load plugins, cause a Display Configuration
// to be realized, creates the default environment, etc.
igApp.initialize(argc, argv);
// Creates an event loop and begins running it, causing the creation of frames.
igApp.run();
}

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)