Running

 

Running

It's possible to run the viewer by double-clicking its program icon, and to then drag and drop scene and mesh files on the program window to load them.

However, it's much more common to run the viewer from a command line so that options can be specified. This method is detailed below.

Command Line Options

The general form for running the viewer is: OgreMaxViewer.exe options FileName where the case-insensitive options are optional and FileName is the name of your scene or mesh file.

Options

File Name

The viewer will always check the file system to see if the scene file exists.

Example Usage

OgreMaxViewer.exe -Width 800 -Height 600 -FullScreen -VSync -D3D -LockViewCamera -ScreenshotBaseName MyScreenshot -ScreenshotExtension .bmp "c:\My Directory\My Scene.scene"

Scripting

You may write a Lua script file to control the viewer. Such a file is typically in the same directory as the viewed file, and must be named FileName.lua, where FileName is the file name (including the extension) passed into the viewer on startup. If present, this file will automatically be loaded. The following script functions will be called if they are defined: For a working demonstration of how to use a Lua scene script file see the MeshAnimation sample.

Drag-and-Drop

When running in windowed mode, the OgreMax Viewer supports drag and drop of files.