Facepunch / garrysmod-issues

Garry's Mod issue tracker
141 stars 56 forks source link

DModelPanel #2790

Open h3xcat opened 8 years ago

h3xcat commented 8 years ago

Details

DModelPanel, the actual entity that is being rendered seems to be ignoring Z position of other DModelPanels

Steps to reproduce

if IsValid(TestPanel) then TestPanel:Remove() end

local icon = vgui.Create( "DModelPanel" )
icon:SetSize( ScrW(), ScrH() )
icon:SetModel( "models/props_c17/FurnitureWashingmachine001a.mdl" )
icon.Entity:SetPos(Vector(0,0,40))
icon.DoClick = function()
    icon:Remove()
end
TestPanel = icon
mandrewpowers commented 7 years ago

Looks like the 2D context isn't taken into account during 3D context rendering. This is probably because since Lua VGUI doesn't cache the paint like normal VGUI does (iirc) and the rendered models are being blown away by each other in real time. You may be able to get around it by changing the order the ClientsideModel or panels are created.