render:GetHTMLMaterial() on a quad drawn to world not working
5 replies, posted
so I am using [url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index3319.html]this[/url] (the code in the usage section), and it's not working. i have the position configured and the background renders, but the HYML page itself never shows up. How do i fix it?
Try adding the following:
[lua]-- Upon initializing the panel
Panel:SetPaintedManually(true)
-- In the render hook
Panel:UpdateHTMLTexture()
locam mat = Panel:GetHTMLMaterial()[/lua]
[QUOTE=samm5506;42097153]Try adding the following:
[lua]-- Upon initializing the panel
Panel:SetPaintedManually(true)
-- In the render hook
Panel:UpdateHTMLTexture()
locam mat = Panel:GetHTMLMaterial()[/lua][/QUOTE]
It's not working, here is what i have -
[lua]
local function DrawSign()
-- Draw a background
surface.SetDrawColor(0, 0, 0, 255)
surface.DrawRect(0, 0, width, height)
-- Draw the screen
html:UpdateHTMLTexture()
local mat = html:GetHTMLMaterial()
render.SetMaterial( mat )
render.DrawQuad(Vector(0, 0, 0),
Vector(width, 0, 0),
Vector(width, height, 0),
Vector(0, height, 0))
end
[/lua]
[lua]
local html = vgui.Create( "HTML", main )
html:SetPaintedManually( true )
html:SetSize( ScrW() - 20, ScrH() - 65 )
html:SetPos( 5, 50 )
html:OpenURL( "www.youtube.com/embed/rz9rQsutfuo" )
[/lua]
everything else is the same as in the tut
bump
Maybe try DHTML?
I'm not sure if that matters, but DHTML is based on Awesomium.
DHTML is not working either
Sorry, you need to Log In to post a reply to this thread.