std::shared_ptr<UltraEngine::Interface> ui = UltraEngine::CreateInterface(window);
auto sz = ui->root->ClientSize();
ui->SetRenderLayers(128);
auto text = CreateTextField(0, 50, 100, 30, ui->root,UltraEngine::TEXTFIELD_DEFAULT);
text->SetText("Hello World!");
auto uicam = CreateCamera(world, PROJECTION_ORTHOGRAPHIC);
uicam->SetClearMode(CLEAR_DEPTH);
uicam->SetRenderLayers(128);
uicam->SetPosition(framebuffer->size.x / 2, framebuffer->size.y / 2);
//Main loop
while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
{
text->SetText("Hello World!");
while (PeekEvent()) {
auto event = WaitEvent();
ui->ProcessEvent(event);
}
world->Update();
world->Render(framebuffer);
}
Am I missing anything?
I have two camera, one camera runs the 3d world, one runs the interface;
But the 3d world camera seems to override the interface camera.