Legacy/dxDrawMaterialSectionLine3D: Difference between revisions
Jump to navigation
Jump to search
(Legacy version) |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
Line 66: | Line 66: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Changelog== | ==Changelog== |
Latest revision as of 17:34, 7 November 2024
This function draws a textured 3D line between two points in the 3D world - rendered for one frame. This should be used in conjunction with onClientPreRender in order to display continuously.
The 3D line with a large width value effectively becomes a rectangle, so it it possible to construct basic shapes such as boxes with several large width lines and the appropriate values for 'faceToward'.
Example
This example draws corona like effects near the player
coronaTexture = dxCreateTexture("corona.png") red = tocolor(255,0,0) green = tocolor(0,255,0) blue = tocolor(0,0,255) addEventHandler("onClientPreRender",root, function() local x,y,z = getElementPosition(localPlayer) dxSetBlendMode("add") -- Add blend mode looks best for corona effects drawCorona( x+2, y+2, z+1, 1, red ) drawCorona( x+1, y+3, z+2, 1, green ) drawCorona( x-1, y+2, z+3, 1, blue ) dxSetBlendMode("blend") -- Restore default end ) -- Draw the corona texture function drawCorona( x, y, z, size, color ) dxDrawMaterialSectionLine3D ( x, y, z+size, x, y, z-size, 0,0,1,1, coronaTexture, size, color) end
Changelog
Version | Description |
---|
1.5.5-9.11998 | Added postGUI argument |
1.5.8-9.20862 | Added flipUV argument |
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