DxSetBlendMode: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 19: Line 19:
==Example==  
==Example==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
TODO
--TODO
</syntaxhighlight>
</syntaxhighlight>



Revision as of 00:26, 17 April 2012

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

This template will be deleted.

See Also