API Frame CreateTexture

Creates a texture.
 texture = Frame:CreateTexture([name, drawLayer, templateName, subLevel])
==Arguments==
:;name: - The global variable name that will be assigned, or nil for an anonymous texture.
:;drawLayer: - The layer the texture should be drawn in.
:;templateName: - Comma-delimited list of names of virtual textures (created in XML) to inherit from.
:;subLevel: - The level of the sublayer if textures overlap.
==Returns==
:;texture: - The new texture object as a child of this frame.
==Example==
Shows a semi-transparent yellow texture.
local f = CreateFrame("Frame", nil, UIParent)
f:SetPoint("CENTER")
f:SetSize(64, 64)
f.tex = f:CreateTexture()
f.tex:SetAllPoints()
f.tex:SetColorTexture(1, 1, 0, 0.5)
API_Frame_CreateTexture_01.png|link=
==Patch history==