Class SoGLDeviceSettings
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.devices.SoGLDeviceSettings
Device settings management class.
This class provides functions to query and modify information about OpenGL device settings. A setting is a vendor defined collection of device dependent parameters like "Stereo - Enable", "Antialiasing ? Mode" or "Vertical Sync". NVIDIA calls this a "driver profile". Parameters can be set as a group using
setSettingName()
, with a predefined name, or one by one using setParameter()
. Applications should only create an SoDeviceSettings object using the SoGLDevice
method getDeviceSettings() (see below).
Device settings should be changed before any rendering is done, i.e. before the OpenGL render context is created.
Setting and parameter changes do not take effect until applySettings()
is called.
Changes should only affect the current running application (but this may depend on the graphics board vendor and driver installed).
The settings and parameters that can be queried through this interface may not correspond to the parameters displayed by the graphics board vendor's "control panel" application. This depends on the vendor and the driver installed.
Set a predefined driver setting (profile) for an NVIDIA graphics board.
SoGLDevice gldevice = SoGLDevice.getDevice( 0 ); SoGLDeviceSettings devSettings = gldevice.getDeviceSettings(); if (devSettings != null) { devSettings.setSettingName( "Workstation App - Dynamic Streaming" ); devSettings.applySettings(); }
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Apply changes to the setting and/or parameters.getParameter
(String pParameterId) Returns current value of specified parameter in current setting.int
Returns number of parameters in current setting.getParameterIdbyIndex
(int index) Returns the name of the parameter with the specified index in the current setting.Returns the name of the current setting (vendor defined list of parameters).getSettingNameByIndex
(int index) Returns the name of the specified setting.int
Returns the number of vendor defined settings.boolean
setParameter
(String pParameterId, String pParameterValue) Set the value of a parameter in the current setting.boolean
setSettingName
(String pPredefinedSettingName) Set a setting (vendor defined list of parameters) by name.Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Method Details
-
getParameterCount
public int getParameterCount()Returns number of parameters in current setting. -
setSettingName
Set a setting (vendor defined list of parameters) by name. SeegetSettingsCount
andgetSettingNameByIndex
to retrieved predefined list of settings.- Returns:
- true if success, false otherwise
-
getParameterIdbyIndex
Returns the name of the parameter with the specified index in the current setting. UsegetParameterCount()
to get the number of parameters in the current setting. For example "Ambient Occlusion", "Anisotropic filtering mode", "Anisotropic filtering setting", "Antialiasing - Behavior Flags", "Preferred OpenGL GPU", etc. -
setParameter
Set the value of a parameter in the current setting.- Returns:
- true if success, false otherwise
-
getSettingsCount
public int getSettingsCount()Returns the number of vendor defined settings. Depends on the graphics board and driver version. -
getSettingName
Returns the name of the current setting (vendor defined list of parameters). -
applySettings
public boolean applySettings()Apply changes to the setting and/or parameters. -
getParameter
Returns current value of specified parameter in current setting. The value is converted to a string. -
getSettingNameByIndex
Returns the name of the specified setting. SeegetSettingsCount
to get the number of settings available.
-