View Issue Details

IDProjectCategoryView StatusLast Update
0009861Multi Theft Auto : San AndreasScriptingpublic2018-07-21 17:26
ReporterTGpieTAssigned Toccw 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target Version1.5.6Fixed in Version1.5.6 
Summary0009861: [REQUEST] postGUI argument for dxDrawMaterialLine3D
Description

Materials drawn using dxDrawMaterialLine3D always appear behind dx elements since there is no postGUI argument available for this function. The non-material variant of this function (dxDrawLine3D) does implement this and it works as expected, the lines will appear before any dx elements.

Would it be possible to add this functionality?

TagsNo tags attached.

Relationships

child of 0003344 acknowledged New Feature Requests Requested features tracker 

Activities

Pirulax

2018-05-13 17:50

reporter   ~~0026523

dx lines, and such are not elements.
In theory, you just need to draw it before the normal dxes, so in onClientPreRender.

CrosRoad95

2018-05-13 19:50

reporter   ~~0026524

you can use shaders to transform flat image to 3d

TGpieT

2018-05-13 22:54

viewer   ~~0026525

@Pirulax Tested and confirmed not working, there is a seperate drawing queue for 3D material elements. However there only is one while there are two for regular 3D lines, one which allows drawing postGUI (someone helped me find it in the source code of MTA itself).

@CrossRoad I don't think it's as flexible as using dxDrawMaterialLine3D? Also I think it makes sense to add this option since it's already available for dxDrawLine3D, a logical addition if you ask me. ^^

arranTuna

2018-06-01 19:21

manager   ~~0026544

https://github.com/multitheftauto/mtasa-blue/commit/bee6c7f245e962541e07a2abfe7ae41ea31f2d73

ccw

2018-06-01 22:10

administrator   ~~0026545

Please test with https://nightly.mtasa.com/mtasa-1.5.5-full_rc-11998-20180601.exe

Docs: https://wiki.multitheftauto.com/wiki/DxDrawMaterialLine3D

CrosRoad95

2018-06-02 12:08

reporter   ~~0026546

local img = dxCreateTexture("cat.png")
addEventHandler("onClientRender", root,
    function()
        dxDrawMaterialLine3D (0,0,15,0,0,3,img, 7, tocolor(255,255,255,255))
        dxDrawMaterialLine3D (30,0,15,30,0,3,img, 7, tocolor(255,255,255,255), true)
end)

working
https://i.imgur.com/hPeJaFK.jpg

Pirulax

2018-06-03 19:19

reporter   ~~0026547

I think you should test the postGui argument too (does it draws the materialLine on top of a 2d dx)

TGpieT

2018-06-04 18:06

viewer   ~~0026548

It works perfectly as I wanted.
Thank you!

Issue History

Date Modified Username Field Change