TorqueScript Reference
Functions
Windows Platform

Functions

void enableWinConsole (enable)
 
void getWinNTVersion ()
 
void GLEnableLogging (enable)
 
void GLEnableMetrics (enable)
 
void GLEnableOutline (bool)
 
void mathInit (extension)
 
void openFolder (folder)
 
Boolean shellExecute (executable, [args]?, [directory]?)
 
int shellExecuteBlocking (executable, [args]?, [directory]?)
 

Detailed Description

Function Documentation

◆ enableWinConsole()

void enableWinConsole ( enable  )

Use the enableWinConsole function to tell TGB to create an external console window, either as a separate DOS window or as a new window under OSX/Linux/*NIX. Subsequent calls to this function do nothing. Only one external console is allowed

Parameters
enableA boolean. If this value is set to true, a new console window will be created.
Returns
No return value.

◆ getWinNTVersion()

void getWinNTVersion ( )

◆ GLEnableLogging()

void GLEnableLogging ( enable  )

Use the GLEnableLogging function to enable/disable the gathering of OpenGL metrics. For this to work, the engine must have been compiled with either TORQUE_DEBUG or INTERNAL_RELEASE defined. Always be sure to do a disable after an enable to flush the last log data to the log file.

Parameters
enableA boolean value. If set to true, the engine will gather various OpenGL metrics and dump them to a file named gl_log.txt. If set to false, logging is stopped, the last writes to the log are flushed, and the file is closed.
Returns
No return value.
See also
GLEnableMetrics, metrics

◆ GLEnableMetrics()

void GLEnableMetrics ( enable  )

Use the GLEnableMetrics function to enable or disable logging of OpenGL texture and video metrics. For this to work, the engine must have been compiled with either TORQUE_DEBUG or INTERNAL_RELEASE defined. Use the metrics function to get at this information. Also, once this feature is enabled, the following globals will be available for inspection/examination: <OpenGL::triCount0 ? Terrain triangles, OpenGL::triCount1? DIF triangles, OpenGL::triCount2 ? DTS triangles, OpenGL::triCount3 ? Uncategorized triangles, OpenGL::primCount0 - Terrain primitives, OpenGL::primCount1 ? DIF primitives, OpenGL::primCount2 ? DTS primitives, OpenGL::primCount3 ? Uncategorized primitives>

Parameters
enableA boolean value. When this is set to true, texture and video (triangles and primitives) logging is enabled and dumped as part of calls to certain metrics.
Returns
No return value.
See also
GLEnableLogging, metrics

◆ GLEnableOutline()

void GLEnableOutline ( bool  )

Enables outlines with OpenGL

Parameters
enableBoolean value representing whether or not outlines should be enabled.
Returns
No Return Value.

◆ mathInit()

void mathInit ( extension  )

Use the MathInit function to install a specified math extensions, or to detect and enable all extensions. Generally speaking, the best extension choice is to used detect. This will automatically detected and enable all extensions supported by the current processor. It will also print out a list of the extension that were enabled to the console

Parameters
extensionCan be any of these:detect ? Detect all supported extensions and enable.C - Enable standard C extensions.FPU - Enable floating-point-unit extensions.MMX - Enable Intel MMX extensions.3DNOW - Enable AMD 3DNOW extensions.SSE - Enable Intel SSE extensions.
Returns
No return value.

◆ openFolder()

void openFolder ( folder  )

Opens a folder of the platform

◆ shellExecute()

Boolean shellExecute ( executable  ,
[args] ?  ,
[directory] ?   
)

Executes a process

Parameters
executableThe program to execute
argsArguments to pass to the executable
directoryThe directory in which the program is located
Returns
Returns true on success, false otherwise

◆ shellExecuteBlocking()

int shellExecuteBlocking ( executable  ,
[args] ?  ,
[directory] ?   
)
Parameters
executableThe program to execute
argsArguments to pass to the executable
directoryThe directory in which the program is located
Returns
Returns true on success, false otherwise