GetWindow

This function gets the window a context belongs to.

Syntax

Returns

Returns the window this context was created on.

Example

--Create a window
local window = Window:Create()

--Create a rendering context
local context = Context:Create(window)

while true do
local window = context:GetWindow()

if (window:Closed() or window:KeyDown(Key.Escape)) then return false end

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