Vizard 8 » Reference » Application window » Application window basics
8.0

Application window basics

Vizard creates the "application window" or "graphics window" on your display and uses it to display your rendered world. This window has a set of properties including its appearance, its location on your display device, its frame rate, its splash screen at loading, etc. In addition to rendering worlds, the application window can be used to display HTML code.  Vizard also has commands for taking screenshots or videos of the application window.

Note: this section only deals with the graphics window. A separate section deals with Vizard's main window and subwindows.

Setting the application window on your display

Use viz.window.setPosition(<pixel coordinates>) to set the position of the application window on your display device. (Pixel coordinates begin at (0,0) in the upper left hand corner of your display and extend out to however many pixels your display has). You can also set the size of your application window in pixels using viz.window.setSize( <pixel dimensions> ). Use viz.window.setFullscreen() if you want the application window to fill the entire screen. To keep the application window on top of all other windows on your display, use viz.window.setFloat.

#Set the application window's position
#on the display with pixel coordinates.
viz.window.setPosition( 0, 0 )
#Set the application window's size
#in coordinates.
viz.window.setSize( 200, 200 )
#Set the window to stay on top.
viz.window.setFloat()

Application window appearance

You can also change the appearance of your graphics window by changing the title at the top of the window or by changing the border by either fixing it such that resizing is impossible or so that the border disappears completely.

#Set the title that will appear at the top of the window.
viz.window.setName( 'Clowny clown clown' )
#Set the border so that it cannot be resized.
viz.window.setBorder( viz.BORDER_FIXED )

Application window rendering parameters

To get the frame rate of the application window, use viz.window.setFrameRate(). You can also set the application window to render polygons, wireframes, or just points.

#Display filled in polygons.
vizact.onkeydown( '1', viz.window.setPolyMode, viz.POLY_FILL )
#Display wireframes.
vizact.onkeydown( '2', viz.window.setPolyMode, viz.POLY_WIRE )
#Display points.
vizact.onkeydown( '3', viz.window.setPolyMode, viz.POLY_POINT )

Setting a splashscreen

While a world is loading, the application window displays a splash screen. To replace the default image for the splash screen, add viz.splashScreen(<texture filename>) before you call viz.go().

viz.splashScreen( 'crosshair.png' ) #Use a new splash screen for the texture.
viz.go()

See also

In this section:

Taking screenshots and screen videos

Application Command Table

Other sections:

Global settings

Viewpoint & windows basics

Window basics

Event Reference