Vizard 7 » Command Index » Vizard modules » viz » <viz>.go
7.6

<viz>.go

This command launches the Vizard rendering environment

<viz>.go(  
mode  
window = None  
)  
mode
Specifies a series of flags signifying the requested initialization states for Vizard's graphics rendering environment. The following states can be combined by using the logical "or" operator (see example below). Flag can include any number of the following Initialization modes, one of the Stereo modes, and any combination of the Display modes:

Initialization Modes

viz.PROMPT

When starting, pop-up a standard Vizard dialog box allowing the user to select startup mode (and check a few optional settings)

viz.FULLSCREEN

Create window in fullscreen mode

viz.EMBEDDED

Notify Vizard that the script will contain its own graphics loop.

viz.NO_DEFAULT_KEY

Disable the default key commands, which include:

  • Escape - Quit Vizard

  • F1 - Toggle HTML display

  • F2 - Toggle fullscreen mode

  • F3 - Toggle polygon, wire, and point rendering mode

  • F4 - Toggle framerate display

  • F8 - Reset active camera handler

  • Ctrl + F9 - Capture screenshot

  • Ctrl + F12 - Toggle AVI recording

  • Ctrl + F6 - Toggle docking of window within Vizard IDE

  • Alt + I - Float window and activate Vizard IDE interactive input

viz.TRACKER

Turn on the 'Tracker' option in the prompt dialog box

viz.OPTION1

Enable 'Option 1' in the prompt dialog box

viz.OPTION2

Enable 'Option 2' in the prompt dialog box

viz.STENCIL_BUFFER

Create the window with a stencil buffer. Must be specified if stencil buffer will be used in script.



Stereo Modes

viz.STEREO_HORZ

Left/Right eyes are rendered side by side

viz.STEREO_VERT

Left eye is rendered on top of the right eye.

viz.STEREO_RIGHT

Only render the right eye

viz.STEREO_LEFT

Only render the left eye

viz.ANAGLYPHIC

Anaglyphic stereo (i.e Red and blue 3d glasses)

viz.QUAD_BUFFER

Use OpenGL Quad Buffering. You need a graphics card that supports quad buffering.

viz.INTERLACE_VERT

Vertical Interlace. Each eye is rendered on every other vertical line.

viz.INTERLACE_HORZ

Horizontal Interlace. Each eye is rendered on every other horizontal line.

viz.CHECKERBOARD

Checkerboard Interlace. Each eye is rendered on every other pixel.

viz.ACTKERN

Create a stereo mode that is compatible with an ACT Kern stereo display monitor.

viz.STEREO_3DTV_SIDE_BY_SIDE

This flag is an alias for (viz.STEREO_HORZ | viz.HALF_RESOLUTION).

viz.STEREO_3DTV_TOP_AND_BOTTOM

This flag is an alias for (viz.STEREO_VERT | viz.HALF_RESOLUTION).



Display Modes

viz.HMD

The simulation is being viewed on a Head Mounted Display. This will display the window in fullscreen and use symmetric view frustums for both eyes.

viz.HALF_RESOLUTION

Used in conjunction with either of the split stereo modes (viz.STEREO_HORZ/viz.STEREO_VERT). This flag specifies that each eye will contain half the resolution of the overall display, which will be used when automatically computing the aspect ratio. This is typically used with HDMI based stereo displays (e.g. 3D TVs), where each eye is stretched to fill the entire display.

window = None
If specified, Vizard will render into this window. This must be a valid HWND handle to an existing window.

Remarks

Use this method to initialize the main graphics window. Without arguments, a single, standard 800 x 600 screen with perspective projection is assumed.

Return Value

None

Example

Example 1
#Start things up in standard mode
import viz
viz.go()

Example 2
# Or instead start with a prompt box, defaulted to stereo
import viz
viz.go(viz.PROMPT | viz.STEREO_HORZ)