• render.DrawSprite creates an ugly black square
    0 replies, posted
I am trying to draw a sprite, but when I use glow02, the one I want, it shows up incorrectly and draws a black square box. It won't even show up green, when I set the fourth argument for render.DrawSprite to Color(0,255,0,255). Here's my code: [lua] include("shared.lua") local glow=Material("sprites/glow02") function ENT:Draw() self:DrawModel() local light=math.Round(self:GetLight()) if light==1 then render.SetMaterial(glow) render.DrawSprite(self:GetPos()+Vector(3,0,-12),10,10,Color(0,255,0,255)) end end [/lua] Any help? [editline]8/8/13 1:56 PM[/editline] Fixed. I had to assign glow to a material created with CreateMaterial().
Sorry, you need to Log In to post a reply to this thread.