DxSetTestMode: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Kevin Gross (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Client function}} | {{Client function}} | ||
__NOTOC__ | __NOTOC__ | ||
This function is used for testing scripts written using [[guiCreateFont]], [[dxCreateFont]], [[dxCreateShader]] and [[dxCreateRenderTarget]] | This function is used for testing scripts written using [[guiCreateFont]], [[dxCreateFont]], [[dxCreateShader]] and [[dxCreateRenderTarget]] | ||
Line 22: | Line 21: | ||
==Example== | ==Example== | ||
<section name="Client" class="client" show="true"> | |||
--Use /setmode [PARAM] to test. | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function testmode(cmd,param) | |||
if param then | |||
local value = tostring(param) | |||
dxSetTestMode(value) | |||
end | |||
end | |||
addCommandHandler("setmode",testmode) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
''Example by .:CiBeR:.'' | |||
==See Also== | ==See Also== | ||
{{Drawing_functions}} | {{Drawing_functions}} |
Revision as of 09:57, 2 February 2014
This function is used for testing scripts written using guiCreateFont, dxCreateFont, dxCreateShader and dxCreateRenderTarget
Each one of the 3 test modes should be used in turn to help highlight any potential problems.
Syntax
bool dxSetTestMode ( string testMode )
Required Arguments
- testMode : The test mode to be set. It can be one of the following values:
- none : Test mode disabled
- no_mem: Simulate no free video memory available for MTA.
- low_mem: Simulate little free video memory available for MTA.
- no_shader: Simulate shaders failing validation.
Returns
Returns true if the test mode was successfully set, false otherwise.
Example
Click to collapse [-]
Client--Use /setmode [PARAM] to test.
function testmode(cmd,param) if param then local value = tostring(param) dxSetTestMode(value) end end addCommandHandler("setmode",testmode)
Example by .:CiBeR:.
See Also
- dxConvertPixels
- dxCreateFont
- dxCreateRenderTarget
- dxCreateScreenSource
- dxCreateShader
- dxCreateTexture
- dxDrawCircle
- dxDrawImage
- dxDrawImageSection
- dxDrawLine
- dxDrawLine3D
- dxDrawMaterialLine3D
- dxDrawMaterialPrimitive
- dxDrawMaterialPrimitive3D
- dxDrawMaterialSectionLine3D
- dxDrawPrimitive
- dxDrawPrimitive3D
- dxDrawRectangle
- dxDrawText
- dxDrawWiredSphere
- dxGetBlendMode
- dxGetFontHeight
- dxGetMaterialSize
- dxGetPixelColor
- dxGetPixelsSize
- dxGetPixelsFormat
- dxGetStatus
- dxGetTextSize
- dxGetTextWidth
- dxGetTexturePixels
- dxIsAspectRatioAdjustmentEnabled
- dxSetAspectRatioAdjustmentEnabled
- dxSetBlendMode
- dxSetPixelColor
- dxSetRenderTarget
- dxSetShaderValue
- dxSetShaderTessellation
- dxSetShaderTransform
- dxSetTestMode
- dxSetTextureEdge
- dxSetTexturePixels
- dxUpdateScreenSource