Jump to content

Recommended Posts

Posted
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.

Posted

 

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.

Once the world is loaded, the interface is disappeared.

 

Posted

You need to create the 3D camera before the UI camera, or call camera->SetOrder() to adjust the order they render in.

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted
8 minutes ago, Josh said:

You need to create the 3D camera before the UI camera, or call camera->SetOrder() to adjust the order they render in.

 

CreateTextField does not work but CreateLabel works fine.

May be I am setting something wrong?

 

 

Posted

CreateLabel works fine.

CreateButton works fine.

CreateTextField does't work. It appeared in screen first but once the game world is complete loaded, the TextField becomes disappeared.

Maybe there is something wrong with CreateTextField?

Posted

That is possible. The UI rendering in Vulkan is something I have put off because I want to work on the editor right now.

My job is to make tools you love, with the features you want, and performance you can't live without.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...