DxUpdateScreenSource
Jump to navigation
Jump to search
This function updates the contents of a screen source texture with the screen output from GTA
Syntax
bool dxUpdateScreenSource ( element screenSource )
Required Arguments
- screenSource: The screen source element whose pixels we want to fill with the screen capture
Returns
Returns true if the screen was successfully captured, false otherwise.
Example
This example will update the screen capture when F7 is pressed
addEventHandler("onClientResourceStart", resourceRoot, function() myScreenSource = dxCreateScreenSource( 500, 500) -- Create a screen source texture which is 500 x 500 pixels end ) bindKey( "F7", "down", function() if myScreenSource then dxUpdateScreenSource( myScreenSource ) -- Capture the screen end end ) addEventHandler( "onClientRender", root, function() if myScreenSource then dxDrawImage ( 0, 0, 300, 300, myScreenSource ) -- Draw the result in top left corner end end )
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