DxSetBlendMode

From Multi Theft Auto: Wiki
Revision as of 04:03, 1 February 2012 by Ccw (talk | contribs) (Created page with "{{Client function}} __NOTOC__ This function sets the current blend mode for the dxDraw functions. Changing the blend mode can increase the quality when drawing text or certain ot...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function sets the current blend mode for the dxDraw functions. Changing the blend mode can increase the quality when drawing text or certain other images to a render target. As a general guide use modulate_add when drawing text to a render target, and add when drawing the render target to the screen. Don't forget to restore the default blend at the end.

Syntax

bool dxSetBlendMode( string blendMode )

Required Arguments

  • blendMode : The blend mode to use which can be one of:
    • blend: The source textures are alpha blended to the screen/render target. The is the default mode for drawing and gives the results we all know and love.
    • add: The source textures are added to the screen/render target.
    • modulate_add: The source textures are multiplied by the alpha and then added to the screen/render target.

Returns

Returns true if successful, or false if invalid arguments were passed to the function.

Example

TODO

Requirements

Minimum server version n/a
Minimum client version 1.3.0-9.03782

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.3.0-9.03782" />

See Also