Jump to content

sdxsdx

Developers
  • Posts

    33
  • Joined

  • Last visited

Everything posted by sdxsdx

  1. The problem sovled after I reinstalled windows 11.
  2. Thank you for your reply. How could I set the transparent blue plane with penetration? I want the object can sink into the blue cube.
  3. the scene model has some blue cubes and if I want to make the cubes to be water(object can sink into the bottom), is that possible do it in ultra engine? Any help is appreciated. ------------------------------------------------------ edit: one way to do it is add coordinate y-offset value to the water surface. Any advice?
  4. to set the font color, I can't find any statements in document, is it there? For alternative, I can use sprite with coloring to draw text, but if the ui system has setting font color function that will be great.
  5. 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?
  6. CreateTextField does not work but CreateLabel works fine. May be I am setting something wrong?
  7. 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.
  8. 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.
  9. Thanks you, how could I increase the shadow rendering distance? I have tired world->SetLightQuality(2) or light->SetRange(10000) or light->SetRange(-10000,10000), it doesn't work.
  10. auto sprite = CreateSprite(world, font, "FPS", 18); sprite->SetRenderLayers(128); sprite->SetPosition(2, framebuffer->size.y - font->GetHeight(18) - 2, 0); sprite->SetRenderLayers(2); world->RecordStats(); auto uicam = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); uicam->SetClearMode(CLEAR_DEPTH); uicam->SetRenderLayers(2); uicam->SetPosition(framebuffer->size.x / 2, framebuffer->size.y / 2); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { sprite->SetText("FPS:" + (String)world->renderstats.framerate); while (PeekEvent()) { ui->ProcessEvent(WaitEvent()); } world->Update(); world->Render(framebuffer); } I modified some lines and this works for fps showing. The second question is still not answered.
  11. I have found: auto font = LoadFont("Fonts/arial.ttf"); auto sprite = CreateSprite(world, font, "", 18); sprite->SetRenderLayers(128); sprite->SetPosition(2, framebuffer->size.y - font->GetHeight(18) - 2, 0); //Main loop while (window->Closed() == false) { //Display the feamerate sprite->SetText("FPS: " + String(world->renderstats.framerate)); world->Update(); world->Render(framebuffer); } but I still can't see the fps.
  12. How to show FPS inside the game and how to increase the distance for shadow shading? Many thanks for any help.
  13. When I start a new project, I got this error message; Severity Code Description Project File Line Suppression State Error C1007 unrecognized flag '-Zc:nrvo' in 'p2' test C:\Users\xxx\Documents\Ultra Engine\Projects\test\LINK 1 I have tried 1.0,1.01.1.02,1.03 all versions. and the results are same. visual studio 2022,2019 are same too.
×
×
  • Create New...