DImage Bug

This(top left checkered box) seems to happen when I do this:

[lua] local logo = vgui.Create(“DImage”, BB)
logo:SetImage( “myfile/mypic” )

Note that mypic is mypic.vtf in the file. myfile is located in materials in the garrysmod/garrysmod folder.

Anyone have any ideas?

BB is the DFrame

Does your mypic.vtf have a .vmt file properly attached to it?

No, just tried it and it worked, thank you.

What worked? Creating a .vmt file? :stuck_out_tongue:

Yes, it stopped the checker, but it’s black. Although that’s most likely a problem on my side with the vtf.

With the .vtf you always want to be sure to not change any settings when importing it. When you save it as a .vmt change it to VertexlitGeneric under the options. Hope this helped a lot, and I know this from creating a texture once for a model texture inside of MilkShape 3D. :stuck_out_tongue: