Wow api create texture issues

i am currently working on an addon for me and my guild to use in raids. currently i have some issues with creating a texture within a frame i have created. i have listed the code i am running within my addon for someone to help me fix this issue ive been having. i am new to lua and coding in general if that makes any diffrence

    local dps_frame = CreateFrame("Frame", nil, UIConfig, nil)
    dps_frame:SetSize(64, 64)
    dps_frame:SetPoint("CENTER")
    local DpsTexture = dps_frame:CreateTexture("texture", "background")
    DpsTexture:SetPoint("CENTER")
DpsTexture:SetTexture("Interface\\Addons\\RaidGroupManager\\textures\\Damage.blp")
    DpsTexture:SetSize(64, 64)
    DpsTexture:SetDrawLayer("Background", 0)
    DpsTexture:SetAllPoints(dps_frame)
    DpsTexture:show()

all this code is doing is creating a green square in the middle of my frame and if i use something like SetVertexColor whatever values i input just make the box black

Make sure the image file is in a dimension of two
https://wow.gamepedia.com/API_Texture_SetTexture

The method is :Show() instead of :show(), try enabling error reporting addons like BugSack

1 Like

A green texture is usually a sign for wrong path or invalid file format.

WoW supports tga and blp (converted from png). The color space / color palette should be 24bit or 32bit with alpha channels. 8bit and 16bit does not work with wow.

Another way: You can use DpsTexture:SetTexture("Interface\\buttons\\white8x8") with DpsTexture:SetVertexColor(0,0,0,1) for a black background.

greetings Hizuro