Jump to content

Josh

Staff
  • Posts

    24,629
  • Joined

  • Last visited

Everything posted by Josh

  1. Whoa, same thing happens to me. What is going on...
  2. Fixed, I think, in next build. I definitely fixed something.
  3. The entity "owns" the component". Otherwise you would have to maintain a handle to every component, to prevent them from being deleted. If the component also has a shared pointer to the entity, it would create a circular reference, and neither would ever be deleted. Normally I would use a weak pointer and have a GetEntity() method, but for components this seemed annoying, so I just used a raw pointer. When the component is detached from the entity, this pointer is set to NULL automatically, so I think this is fairly safe.
  4. Fixed. I just had to change a path in the editor code.
  5. Finally fixed blurry font rendering on sprites. Text is much clearer now. Before: After:
  6. What you are doing with the mesh creation is actually not very different from the multiple sprites I am creating. Both are going to involve some amount of data sent to the GPU to update the visible geometry. I might try your approach later on, since all my geometry is just rectangles now.
  7. I tried it and the original code above worked on both screens with no issues. Please let me know if this continues to be a problem in the future. Flickering issues are also resolved.
  8. 1.0.3 Eliminated flickering text in GUI rendered with Vulkan. Interfaces rendered with Vulkan will be much snappier now due to elimination of redundant GUI rebuilds.
  9. This code also shows some bad flashing when the button is hovered over with the mouse..
  10. The current build on 1.0.3 addresses this issue. Please let me know what you think.
  11. 1.0.3 Meshes and materials now get held in memory until a new visibility list is received from the culling system. This prevents objects from disappearing for one frame when they are recreated, should prevent flashing in the built-in GUI system, and will help with dynamic mesh construction. Related: https://www.ultraengine.com/community/topic/62138-advanced-mesh-creation-and-modification-options/#comment-301806
  12. Here is an example that demonstrates the problem. It's not exactly a bug, but it can become a problem in different situations... #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto cam = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); cam->SetClearColor(0, 0, 1); cam->SetZoom(100); auto model = CreateModel(world); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { if (window->KeyDown(KEY_SPACE)) { model->Clear(); auto mesh = model->AddMesh(); mesh->AddVertex(0, 0, 0); mesh->AddVertex(1, 0, 0); mesh->AddVertex(1, 1, 0); mesh->AddPrimitive(0, 2, 1); mesh->UpdateBounds(); model->UpdateBounds(); } world->Update(); world->Render(framebuffer, false); } return 0; }
  13. 1.0.3 Fix for GUI widget child clipping.
  14. Although IMgui is using immediate mode to render, you still have an advantage with the Ultra architecture because all the mesh generation code is executing in the game logic thread (I assume). That means the only rendering cost is the bandwidth of uploading the updated mesh to the GPU, and it sounds like that mesh data is not huge.
  15. This can wait until after the first early access release.
  16. Okay, I think at this point these issues are completely fixed. Rounded corners and gradients are not going to be displayed in Vulkan at this time. I think the best way to do this is to rasterize a cache of images stored by dimensions and settings, and just use these to display these types of backgrounds. Widgets typically don't do a lot of resizing when rendered in a 3D viewport, so I think this will work well. But I am okay deferring that until after the early access release. There remains an issue of widgets momentarily disappearing when they change, but that is a more general culling problem I will try to solve.
  17. Here is a simplified example that shows the clipping of the child panel is off by one pixel in both H and V directions: #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto default_font = LoadFont("Fonts\\arial.ttf"); auto ui = CreateInterface(world, default_font, framebuffer->size); ui->root->SetColor(1,1,1,1); auto ui_camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); ui_camera->SetPosition((float)framebuffer->size.x * 0.5f, (float)framebuffer->size.y * 0.5f, 0); auto w1 = CreatePanel(1, 1, 100, 100, ui->root); auto w2 = CreatePanel(-10, 20, 200, 160, w1); w2->SetColor(1, 0, 0); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { while (PeekEvent()) { auto event = WaitEvent(); ui->ProcessEvent(event); } world->Update(); world->Render(framebuffer); } return 0; }
  18. This appears to be fixed in current build.
  19. Your example above works correctly now.
  20. 1.0.3 Simultaneous physics updates in multiple worlds should work now. Fixed sprite vertical text alignment, fixes GUI drawing problems. Sprite and GUI text will appear sharper now.
  21. In Ultra you can use the SetRenderLayers() method to control which entities are visible to which cameras.
  22. I'm going to try adding a mutex in the collider Newton shape creation function. That is where this is happening. I think the whole thing will be thread-safe with that change. I generally do not like to use mutexes and prefer total separation of data, but in this case it makes sense.
  23. Oh yeah, also I am experiencing some flashing when some widgets change, because they are creating new sprites for the 3D rendering, just like what klepto is experiencing with IMGUI. I have an idea for something I can do to solve this all at once.
  24. Here is what @klepto2's example looks like with the current build.
×
×
  • Create New...