ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. dxCreateScreenSource

Function

dxCreateScreenSource

ClientDrawing (dx)Identical to MTA:SA

Creates a screen source of a given size. dxUpdateScreenSource writes the game image into it (scaled), which you then draw or process with a shader.

Syntax

element dxCreateScreenSource(int width, int height)

Arguments

widthint
Width.
heightint
Height.

Returns

The source or false.

Example

local screen = dxCreateScreenSource(480, 270)
addEventHandler("onClientRender", root, function()
    dxUpdateScreenSource(screen)
    dxDrawImage(20, 20, 240, 135, screen)
end)

See also