GetColor
Syntax
Returns
Returns the context drawing color.
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)
{
if (window->Closed() || window->KeyHit(Key::Escape)) break;
Vec4 color = context->GetColor();
color.r = Math::Mod(color.r + 0.01 * Leadwerks::Time::GetSpeed(), 1);
color.g = Math::Mod(color.g + 0.012 * Leadwerks::Time::GetSpeed(), 1);
color.b = Math::Mod(color.b + 0.014 * Leadwerks::Time::GetSpeed(), 1);
context->SetColor(color);
context->Clear();
context->Sync();
}
return 0;
}