This section describes a sample application that you can use to see how to create a new NVSG Project using MFC. The sample code is located in the nvsgsdk/src/samples/SimpleViewer directory.
This simple application creates a viewer showing a simple model. You can rotate, zoom and pan the model by using the mouse.
- Rotate: left mouse button
- Pan: middle mouse button
- Zoom: left + middle mouse button
- View all (recenter): right mouse button
The application was created with the developer studios’ project wizard. (MFC project, single document application)
Additional include directories (General / Additional Include Directories):
- "\$(NVSGSDKHOME)\inc"
- "\$(NVSGSDKHOME)\inc\nvsg"
- "\$(NVSGSDKHOME)\inc\DevIL"
Enable run-time type information (Language / Enable Run-Time Type Info):
Additional library directories: (General / Additional Library Directories ):
- "\$(NVSGSDKHOME)\lib\$(ConfigurationName)"
Additional libs (Input / Additional Dependencies):
- glu32.lib
- opengl32.lib
- nvsg.lib
- nvsg10.dll
- Cg.dll
- CgGL.dll
- CgFXGL.dll
- CgFXParser.dll
- ILU.dll
- DevIL.dll
In the sources the relevant code for NVSG is marked by so it is very easy to identify the relevant code snippets.
The relevant classes for the “SimpleViewer” example are:
- SimpleViewer
- SimpleViewerDoc
- SimpleViewerView
You will find further explanation in the comments of the code.
Back to Fundamental Concepts of the NVSGSDK
Generated on Tue Mar 1 13:20:36 2005 for NVSGSDK by