Jump to content

Josh

Staff
  • Posts

    23,315
  • Joined

  • Last visited

Everything posted by Josh

  1. Hmmmm, I don't remember adding date stamps into the comments like that, but it's a really smart idea. I must be more clever than I thought!
  2. Well, that's not necessarily the cause. I don't know how that would even effect the program. If you have something like a random memory overwrite then a small unrelated change to the program or compilation step could cause it to appear fixed, simply because the memory on your computer is shifting around a different way.
  3. I would be interested in trying the project, if you would like to upload it. You're saying one copy of the program crashes, and another does not, on the same computer. It seems like that indicates something is wrong in that project somehow. I assume you did a clean and rebuild on this project?
  4. An update for 1.0.1 is up now. I made some adjustments to the shutdown procedure that may eliminate your problem. You can also call UltraEngine::Core::Shutdown() yourself, as long as it is the last command your program calls, but it should not be needed.
  5. An update for 1.0.1 is available now. There were some wrong window size events being emitted that might have caused your problem.
  6. This feature was actually implemented for brushes, but I agree this would be useful in general, and required for terrain.
  7. Updated 1.0.1 Fixed some window size events that were passing the wrong dimensions, eliminated some redundant events Reduced redundant GUI draw calls Made some adjustments to the shutdown procedure, which may have been causing this issue
  8. You can still use it just for a GUI application, without initializing graphics or requiring drivers. The executables are a little bit bigger than UAK, but still pretty small, around 6 mb when UPX compression is used.
  9. Well, right now it's an SDK. A visual editor is in development, and once that is out I think will mark the point where it will no longer be considered "early access": https://www.ultraengine.com/community/blogs/entry/2801-ultra-engine-sdk-early-access-now-available/?tab=comments#comment-15305 I don't have an expected release date, but it's coming along pretty quickly.
  10. No, Ultra Engine is C++. The .NET stuff in that repository is from the Unity project.
  11. UAK was released about 1.5 years ago when I finished the GUI system but had not finished the full 3D engine yet, so I released what I had for GUI application development. Now that the full engine is released I decided to make UAK free. Ultra Engine is currently in "early access" so there's no big demos of what it can do, but what it does offer is extremely good performance. You can try the benchmarks here if you like: https://github.com/UltraEngine/Benchmarks
  12. I like your example so much I added it to the docs: https://www.ultraengine.com/documentation?page=World_Pick
  13. Well, UAK is free but Ultra Engine is not free: https://www.ultraengine.com/community/store/category/1-software/ UAK is also compiled for Linux and Mac, but Ultra Engine does not yet support these platforms (although it is planned to in the future). Also, UAK has a 64 and 32-bit build for Windows, but Ultra Engine is 64-bit only.
  14. You are using Ultra App Kit from Steam, right? It's an older build. There's a couple of small API changes that were made for Ultra Engine, which is basically UAK + Vulkan graphics.
  15. Here you go. You were calling Hidden() instead of Hide/Show(). #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Joked", 0, 0, 800, 600, displays[0], WINDOW_TITLEBAR | WINDOW_CENTER); auto ui = CreateInterface(window); auto sz = ui->root->GetSize(); auto tabber = CreateTabber(10, 10, sz.x - 20, sz.y - 20, ui->root); tabber->AddItem("Main", true); tabber->AddItem("Settings"); std::array<std::shared_ptr<Widget>, 3> panels; sz = tabber->ClientSize(); panels[0] = CreatePanel(0, 0, sz.x, sz.y, tabber); panels[0]->SetColor(54.0 / 255.0, 57.0 / 255.0, 63.0 / 255.0, 1); panels[1] = CreatePanel(0, 0, sz.x, sz.y, tabber); panels[1]->SetColor(0.1, 0.15, 0.1, 1); panels[1]->Hide(); auto textfield = CreateTextField(20, 20, 300, 32, panels[0], TEXTFIELD_DEFAULT); textfield->SetText("Here is some text!"); textfield->SelectText(0, textfield->text.size()); //auto scriptEditing = CreateTextField(20, 20, 400,40, ui->root); while (true) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WIDGETACTION: Print("Item " + String(ev.data) + " action"); break; case EVENT_WIDGETSELECT: if (ev.source == tabber) { for (int n = 0; n < tabber->items.size(); ++n) { n == ev.data ? panels[n]->Show() : panels[n]->Hide(); } } break; break; case EVENT_QUIT: case EVENT_WINDOWCLOSE: return 0; break; default: break; } } return 0; }
  16. Close that drop down and the Continue button will be there, I think. You can switch to the category forum view mode on the main forum index page if you wish. There are two things going on here. One is that the sphere is using a different radius than the pick, so it looks wrong, but the radius is correct. The other is that the pick does seem to have some trouble on the edges of polygons, but you have the "closest" parameter set to false, so it isn't always picking the closest polygon, just the first one it encounters. Try this: #include "UltraEngine.h" using namespace UltraEngine; bool PickFilter(std::shared_ptr<Entity> entity, std::shared_ptr<Object> extra) { if (entity->GetCollider() == nullptr) { return false; } return true; } 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 camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 2, -3); camera->SetRotation(25, 0, 0); camera->AddPostEffect(LoadPostEffect("Shaders\\PostEffects\\FXAA.json")); auto light = CreateDirectionalLight(world); light->SetRotation(35, 45, 0); light->SetColor(5); auto floor = CreatePlane(world, 100, 100); floor->Move(0, -1, 0); auto b1 = CreateBox(world, 2.0f); b1->SetPosition(-3.0f, 0.0f, 0.0f); b1->SetColor(1, 0, 0); auto b2 = CreateBox(world, 2.0f); b2->SetColor(0.0f, 0.0f, 1.0f); b2->SetPosition(3.0f, 0.0f, 2.0f); b2->SetRotation(0.0f, 45.0f, 0.0f); auto pivot = CreatePivot(world); auto rod_scale = 5.0f; auto rod = CreateCylinder(world, 0.05f); rod->SetCollider(nullptr); rod->SetParent(pivot); rod->SetRotation(90.0f, 0.0f, 0.0f); rod->SetPosition(0.0f, 0.0f, rod_scale / 2.0f); rod->SetScale(1.0f, rod_scale, 1.0f); auto sphere = CreateSphere(world, 0.25f); sphere->SetCollider(nullptr); sphere->SetParent(pivot); sphere->SetColor(0, 1, 0); sphere->SetPosition(0.0f, 0.0f, rod_scale); camera->SetWireframe(true); auto spin_speed = 0.5f; while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { pivot->Turn(0.0f, spin_speed, 0.0f); auto target_pos = Vec3(0.0f, 0.0f, rod_scale); target_pos = TransformPoint(target_pos, Mat4(), pivot->GetMatrix(true).Inverse()); auto pick_info = world->Pick(pivot->GetPosition(true), target_pos, 0.25f, true, PickFilter, nullptr); if (pick_info.success) { sphere->SetPosition(pick_info.position, true); } else { sphere->SetPosition(target_pos, true); } world->Update(); world->Render(framebuffer); } return 0; }
  17. I made some changes, and now I am testing by running the Shutdown function in a game loop without any errors, so it's really functioning more like a "Sync all threads" function. I will have an update soon of 1.0.1.
  18. I would do this by creating a custom class derived from Object that stores the vector in a member, then passing that object as the extra parameter in the CreateThread function.
  19. There is a place in the shutdown procedure where it might be possible a problem could occur...I am looking into this more closely...
  20. I just tried this on a new project and did not experience any problem. I also uninstalled and reinstalled 1.0.1, cleaned the project, ran it again, and it worked correctly.
  21. If it's a thread that just runs until it is finished, while the main loop continues, you can use a mutex lock for that to change a variable that says "the results are ready".
  22. You are reading from and writing to several different variables in different threads, so the values you read could be totally random. Normally the way you would use these is the main thread has a semaphore that says "new work is ready" and the thread would have a semaphore that says "work is finished". This is based on the idea that the main thread has some point at which the work must be completed, and it will wait until the thread is finished.
  23. Another thing I sometimes do to avoid constantly resizing: if (v.capacity() == v.size()) v.reserve(v.size() * 1.3) v.push_back(i); This will make it so memory allocations only happen "once in a while" instead of constantly allocating and recopying the buffer.
×
×
  • Create New...