dxSetTexturePixels
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function sets the pixels of a texture element. It can be used with a standard texture, render target or screen source. Only 'plain' format pixels please.
Note
This function is slow and not something you want to be doing once a frame. It is very slow when setting pixels to a render target or screen source. And is very slow indeed if the texture format is not "argb" .
OOP Syntax Help! I don't understand this!
- Method:texture:setPixels(...)
Syntax
bool dxSetTexturePixels ( [ int surfaceIndex = 0 ], element texture, string pixels, [ int x = 0, int y = 0, int width = 0, int height = 0 ] )Required Arguments
- texture: MISSING_PARAM_DESC
- pixels: MISSING_PARAM_DESC
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- surfaceIndex (default: 0): Desired slice to set if the texture is a volume texture, or desired face to set if the texture is a cube map. (Cube map faces: 0=+X 1=-X 2=+Y 3=-Y 4=+Z 5=-Z)
- x (default: 0): MISSING_PARAM_DESC
- y (default: 0): MISSING_PARAM_DESC
- width (default: 0): MISSING_PARAM_DESC
- height (default: 0): MISSING_PARAM_DESC
Returns
- bool: value
Returns a string if successful, false if invalid arguments were passed to the function.
Code Examples
shared
TODOSee Also
Drawing Functions
- dxConvertPixels
- dxCreateFont
- dxCreateRenderTarget
- dxCreateScreenSource
- dxCreateShader
- dxCreateTexture
- dxDrawCircle
- dxDrawImage
- dxDrawImageSection
- dxDrawLine
- dxDrawLine3D
- dxDrawMaterialLine3D
- dxDrawMaterialPrimitive
- dxDrawMaterialPrimitive3D
- dxDrawMaterialSectionLine3D
- dxDrawModel3D
- dxDrawPrimitive
- dxDrawPrimitive3D
- dxDrawRectangle
- dxDrawText
- dxDrawWiredSphere
- dxGetBlendMode
- dxGetFontHeight
- dxGetMaterialSize
- dxGetPixelColor
- dxGetPixelsFormat
- dxGetPixelsSize
- dxGetStatus
- dxGetTextSize
- dxGetTexturePixels
- dxGetTextWidth
- dxIsAspectRatioAdjustmentEnabled
- dxSetAspectRatioAdjustmentEnabled
- dxSetBlendMode
- dxSetPixelColor
- dxSetRenderTarget
- dxSetShaderTessellation
- dxSetShaderTransform
- dxSetShaderValue
- dxSetTestMode
- dxSetTextureEdge
- dxSetTexturePixels
- dxUpdateScreenSource