garrysmod-issues icon indicating copy to clipboard operation
garrysmod-issues copied to clipboard

DModelPanel doesnt render if it's x or y coordinate is negative

Open cat-marislav opened this issue 1 year ago • 1 comments

If you create a DModelPanel that has negative coordinates, but is wide enough to be seen on the screen, then it wont be rendered. Here's an altered example from gmod wiki to reproduce this problem:

local Panel = vgui.Create( "DPanel" ) Panel:SetPos( -1, -1 ) Panel:SetSize( 200, 200 )

local icon = vgui.Create( "DModelPanel", Panel ) icon:SetSize(200,200) icon:SetModel( "models/player/alyx.mdl" ) function icon:LayoutEntity( Entity ) return end

cat-marislav avatar Dec 24 '23 13:12 cat-marislav

This is an issue inherited from https://wiki.facepunch.com/gmod/cam.Start3D

There was a issue for this at #1995 but it's a 404 for some reason now.

It maybe could be worked around with a render target. https://github.com/Facepunch/garrysmod-issues/issues/4958 I think might also be solved by that

robotboy655 avatar Jan 26 '24 17:01 robotboy655