M MY Multiplayer: Wiki
Side
Kind

dxUpdateScreenSource

Client

Copies the game's screen into a screen source.

bool dxUpdateScreenSource(texture screenSource [, bool resampleNow = false])

Parameters

NameTypeDescription
screenSourcetextureThe screen source from dxCreateScreenSource.
resampleNowboolCopy again even if it was already copied this frame. With a render target set, copies that render target instead of the screen.default false

Returns

true. An element that is not a screen source raises an error.

Without resampleNow, the copy happens at most once per frame.

Example

local screen = dxCreateScreenSource(320, 180)

addEventHandler("onClientRender", root, function()
    dxUpdateScreenSource(screen)
    dxDrawImage(20, 20, 320, 180, screen, 0, 0, 0, tocolor(255, 255, 255, 200))
end)

See also