vsTASKER 7 User Manual
×
Menu
Index

OpenGL

 
OpenGL viewer is a module available in /Runtime/OpenGL under vt_opengl.cpp name.
It creates and display an windows whose size can be setup either using the Viewer property window.
 
The viewer will be linked against all plugin libraries selected in Database::Plugins::Sim.
Appropriate code will be automatically generated.
 
If user want to change representations on the 2D window, code can be modified in plugins/ directory.
If the DLL part is modified, the change will be shown in vsTASKER GUI map display.
If the LIB part is modified, the change will appear in the OpenGL Sim engine associated (viewer) display.
 
   OpenGL
1

Source

1. Source
Source code can be modified into this window or directly from Visual Studio from the solution (or any other text editor).
If code is modified, it will be automatically saved when OK button is depressed.
It is a good idea to save the modified code under another file to keep the original one unchanged. Use button for that.
Refer to "Understanding Runtime" in the Tutorial document of vsTASKER.
Do not forget that all provided source code in vsTASKER environment is subject to change from one revision to one another. So, it is a good practice to change the name of any cpp wrapper if any change must be applied on it.
2

Help

2. Help
Put here all text explanations or documentation content needed to maintain this Viewer.
The Help content is saved but is not inserted into the generated code.
It will be used for the automatic document generation (see Make Documents)
 
3

Main File

3. Main File
Wrapper main file used to display a 2D OpenGL display as an output of the simulation engine.
/runtime/opengl/vt_opengl.cpp is the default wrapper file.
 
4

Background

4. Background
Set the OpenGL window background color. Default is white.
 
5

Position

5. Position
Specify here the position on the desktop of the upper-left corner of the window. Desktop (0,0) is the upper-left corner of the screen.
 
6

Dimensions

6. Dimensions
Specify the dimension of the OpenGL window, in pixels.
The window will be positioned top left of the desktop.
It is not possible yet to resize the OpenGL once created.
7

Allow Pan

7.
If enabled, the mouse can pan the displayed map/terrain on the window.
If disabled, the map center is fixed on the window.
There is no scroll bar for the displayed map on the OpenGL window, so, panning can only be available through the mouse action.
Maintain down the right mouse button or combining CTRL key and left mouse button.
8

Allow Zoom

8.
If checked, zooming on the map is allowed.
 
9

Zoom by Wheel

9.
If enabled, the mouse wheel is used to control the zoom.
If disabled, the zoom is done using the mouse motion by combining the CTRL key and mouse right key.
 
10

Allow Select

10.
If enabled, the mouse left button can be used to select entities or whatever can be selected on the map, like during design time.
If disabled, nothing can be selected.
 
11

Allow Entity Move

11.
If checked, mouse click can select any displayed entity. Repositioning the selected entity is possible (maintain the left mouse button down while dragging).
 
12

Layer

12. Layer
Select which layer to use to create the OpenGL window.
OpenGL: default, pure OpenGL main window
Glut: main using glut32 (3.7.6 version) enhanced library to support mouse wheel. Useful when menus are requested.
 
13

Enabled

13. Enabled
One viewer must be at least enabled for the simulation to compile. Enabling one viewer disable all the other one.
When unchecked, all specific viewer code (and third party software API) are not generated and do not impact the makefile.