materials

I have this addon and I want to use a custom material. I put the vmt and vtf inside

addon->materials

and my lua file’s inside

addon->lua->autorun->client :
[lua]
//using this to draw :
render.SetMaterial( Material( “circle” ) )
render.DrawQuadEasy(v:GetPos(), Vector(0, 0, 1), 48, 48, Color( 255, 0, 0 ))
[/lua]
addon->lua->autorun->server
[lua]
resource.AddFile(“materials/circle.vtf”)
resource.AddFile(“materials/circle.vmt”)
[/lua]

it shows up red but with the blocks and if I use another filepath for the setmaterial it just shows up purple.

Try:
**[Surface.DrawTexturedRect

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Surface.DrawTexturedRect)**

Also its good optimisation not to use the Material() function inside a Draw function.
I recoment just doing:
[lua]
local Texture = Material( “circle” )
[/lua]
then use Texture in your draw function.