Running
Running
The viewer is run from a command line with a number of options.
Command Line Options
The general form for running the viewer is: OgreMaxSampleViewer.exe options FileName where the case-insensitive options are optional and FileName is the name of your scene file.
Options
- -LockViewCamera - Locks the main view camera to the currently selected camera. This will be used when viewing a scene with animated cameras. Note that if you adjust the view camera in any way (by moving the mouse, keyboard or gamepad) the locking is turned off. See controls for details on turning view camera locking on and off at runtime.
- -CameraMoveSpeed - Sets the speed, in units per second, of the user-controlled camera. The default is 100 units per second.
- -zUp - Indicates that the scene up axis should be the z axis. This is only used if a mesh file is being viewed. By default, the y up axis is used.
- -Width - Specifies the width of the render window. By default, the width is 800.
- -Height - Specifies the height of the render window. By default, the height is 600.
- -FullScreen - Indicates that the viewer should be run in full screen mode. By default, the viewer runs in windowed mode.
- -Direct3D or -D3D - Indicates that the Direct3D rendering system should be used. This is the default on Windows.
- -OpenGL or -OGL - Indicates that the OpenGL rendering system should be used. This is the default on non-Windows platforms.
- -VSync - Indicates vertical synchronization should be enabled. By default, vertical sync is disabled.
- -ScreenshotBaseName - Indicates base name that screenshot files will have. By default, the base name is Screenshot.
- -ScreenshotExtension - Indicates the file extension that screenshot files will have. The extension's leading '.' character is optional. By default, the file extension is .jpg.
- -WriteUserControlsFile - Indicates that the UserControls.xml file should be written when the viewer exits. This file is used to configure the viewer controls. By default, the UserControls.xml file is not written. Note that if this file is present it will always be read.
- -KeepLogFile - Indicates that the log file should not be deleted when the viewer exits. By default, the log file is deleted.
- -NVPerfHUD - Enables the NVidia performance heads-up display. By default, the heads-up display is not shown. Note that when using the NVidia PerfHUD tool, you must not resize the viewer window since it may cause a program crash. Also, for best results, use the newest version of the PerfHUD tool.
Example Usage
OgreMaxSampleViewer.exe -Width 800 -Height 600 -FullScreen -VSync -D3D -LockViewCamera -CameraMoveSpeed 120 -ScreenshotBaseName MyScreenshot -ScreenshotExtension .bmp "c:\My Directory\My Scene.scene"