DrawImage

Syntax

Parameters

Returns

Returns the created Context. If the Context could not be created with the specified parameters, NULL is returned.

Example

window = Window:Create()
context = Context:Create(window)

--Load a texture
texture = Texture:Load("Materials/Grass/grass01.tex")

while true do
if window:Closed() or window:KeyHit(Key.Escape) then return false end

context:SetColor(0,0,1)
context:Clear()

context:SetColor(1,1,1)
context:DrawImage(texture,0,0,512,512)

context:Sync()
end