GetWindow

This function gets the window a context belongs to.

Syntax

Returns

Returns the window this context was created on.

Example

#include "Leadwerks.h"

using namespace Leadwerks;

int main(int argc, const char *argv[])
{
Leadwerks::Window* window = Leadwerks::Window::Create();
Context* context = Context::Create(window);

while (true)
{
Leadwerks::Window* window = context->GetWindow();

if (window->Closed() || window->KeyDown(Key::Escape)) return false;

context->SetColor(0.0,0.0,1.0);
context->Clear();
context->Sync();
}
return 0;
}