Torque3D Documentation / _generateds / GFXCardProfiler

GFXCardProfiler

Engine/source/gfx/gfxCardProfile.h

GFXCardProfiler provides a device independent wrapper around both the capabilities reported by the card/drivers and the exceptions recorded in various scripts.

More...

icpi Internal Card Profile Interface

This is the interface implemented by subclasses of this class in order to provide implementation-specific information about the current card/drivers.

Basically, the implementation needs to provide some unique strings:

  • mVersionString indicating the current driver version of the card in question. (For instance, "53.36")

  • mCardDescription indicating the name of the card ("Radeon 8500")

  • getRendererString() indicating the name of the renderer ("DX9", "GL1.2"). Each card profiler subclass must return a unique constant so we can keep data separate. Bear in mind that punctuation is stripped from filenames.

The profiler also needs to implement setupCardCapabilities(), which is responsible for querying the active device and setting defaults based on the reported capabilities, and _queryCardCap, which is responsible for recognizing and responding to device-specific capability queries.

bool
_queryCardCap(const String & query, U32 & foundResult)

Implementation specific query code.

bool
_queryFormat(const GFXFormat fmt, const GFXTextureProfile * profile, bool & inOutAutogenMips)

ecpi External Card Profile Interface

Called for a profile for a given device.

init()

Set load script files and generally initialize things.

Called to query a capability.

queryProfile(const String & cap, U32 defaultValue)

Same as queryProfile(), but a default can be specified to indicate what value should be returned if the profiler doesn't know anything about it.

setCapability(const String & cap, U32 value)

Set the specified capability to the specified value.

bool
checkFormat(const GFXFormat fmt, const GFXTextureProfile * profile, bool & inOutAutogenMips)

Queries support for the specified texture format, and texture profile.

helpergroup Helper Functions

Various helper functions.

loadProfileScript(const char * scriptName)

Load a specified script file from the profiles directory, if it exists.

loadProfileScripts(const String & render, const String & vendor, const String & card, const String & version)

Load the script files in order for the specified card profile tuple.

strippedString(const char * string)

Protected Attributes

Capability dictionary.

Detailed Description

GFXCardProfiler provides a device independent wrapper around both the capabilities reported by the card/drivers and the exceptions recorded in various scripts.

See the Torque Scripting Manual for more details.

icpi Internal Card Profile Interface

This is the interface implemented by subclasses of this class in order to provide implementation-specific information about the current card/drivers.

Basically, the implementation needs to provide some unique strings:

  • mVersionString indicating the current driver version of the card in question. (For instance, "53.36")

  • mCardDescription indicating the name of the card ("Radeon 8500")

  • getRendererString() indicating the name of the renderer ("DX9", "GL1.2"). Each card profiler subclass must return a unique constant so we can keep data separate. Bear in mind that punctuation is stripped from filenames.

The profiler also needs to implement setupCardCapabilities(), which is responsible for querying the active device and setting defaults based on the reported capabilities, and _queryCardCap, which is responsible for recognizing and responding to device-specific capability queries.

getVersionString()

getCardString()

getChipString()

getVideoMemoryInMB()

getRendererString()

Reimplemented by: GFXD3D11CardProfiler, GFXGLCardProfiler, GFXNullCardProfiler

setupCardCapabilities()

Reimplemented by: GFXD3D11CardProfiler, GFXGLCardProfiler, GFXNullCardProfiler

_queryCardCap(const String & query, U32 & foundResult)

Implementation specific query code.

This function is meant to be overridden by the specific implementation class.

Some query strings are handled by the external implementation while others must be done by the specific implementation. This is given first chance to return a result, then the generic rules are applied.

Parameters:

query

Capability being queried.

foundResult

Result to return to the caller. If the function returns true then this value is returned as the result of the query.

Reimplemented by: GFXD3D11CardProfiler, GFXGLCardProfiler, GFXNullCardProfiler

_queryFormat(const GFXFormat fmt, const GFXTextureProfile * profile, bool & inOutAutogenMips)

Reimplemented by: GFXD3D11CardProfiler, GFXGLCardProfiler, GFXNullCardProfiler

String mVersionString 
String mCardDescription 
String mChipSet 
U32 mVideoMemory 

ecpi External Card Profile Interface

GFXCardProfiler()

Called for a profile for a given device.

~GFXCardProfiler()

init()

Set load script files and generally initialize things.

Reimplemented by: GFXD3D11CardProfiler, GFXGLCardProfiler, GFXNullCardProfiler

queryProfile(const String & cap)

Called to query a capability.

Given a query string it returns a bool indicating whether or not the capability holds. If you call this and cap isn't recognized then it returns false and prints a console error.

queryProfile(const String & cap, U32 defaultValue)

Same as queryProfile(), but a default can be specified to indicate what value should be returned if the profiler doesn't know anything about it.

If cap is not recognized, defaultValue is returned and no error is reported.

setCapability(const String & cap, U32 value)

Set the specified capability to the specified value.

checkFormat(const GFXFormat fmt, const GFXTextureProfile * profile, bool & inOutAutogenMips)

Queries support for the specified texture format, and texture profile.

helpergroup Helper Functions

Various helper functions.

loadProfileScript(const char * scriptName)

Load a specified script file from the profiles directory, if it exists.

loadProfileScripts(const String & render, const String & vendor, const String & card, const String & version)

Load the script files in order for the specified card profile tuple.

strippedString(const char * string)

Protected Attributes

Map< String, U32 > mCapDictionary 

Capability dictionary.