Dreikblack Posted July 29, 2024 Posted July 29, 2024 #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 framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->Move(0, 2, -8); auto ground = CreateBox(world, 20, 1, 20); ground->SetPosition(0, -0.5, 0); ground->SetColor(0, 1, 0); auto light = CreatePointLight(world); //Main loop while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); if (window->KeyHit(KEY_SPACE)) { light = nullptr;//crash } } return 0; } Quote Check out Slipgate Tactics demo, which is made with Ultra Engine/Leadwerks 5: https://www.leadwerks.com/community/topic/61480-slipgate-tactics-demo/
Josh Posted July 29, 2024 Posted July 29, 2024 No problems here. I just made some small changes to make the light easier to see: #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 framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); world->SetAmbientLight(0); auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->Move(0, 2, -8); auto ground = CreateBox(world, 20, 1, 20); ground->SetPosition(0, -0.5, 0); ground->SetColor(0, 1, 0); auto light = CreatePointLight(world); light->SetPosition(0, 2, 0); light->SetRange(0.1, 20); //Main loop while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); if (window->KeyHit(KEY_SPACE)) { light = nullptr;//crash } } return 0; } Quote Let's build cool stuff and have fun.
Josh Posted July 29, 2024 Posted July 29, 2024 The location of the call stack indicates the crash is happening in the Nvidia driver. Maybe the shadow map is being used after deletion. Let me swap out GPUs and see what my Nvidia card does. Quote Let's build cool stuff and have fun.
Josh Posted July 29, 2024 Posted July 29, 2024 Okay, my Nvidia card does the same thing. Did this behavior start recently? It could be related to the use of bindless textures for shadow maps. Quote Let's build cool stuff and have fun.
Josh Posted July 29, 2024 Posted July 29, 2024 If I get rid of the call to glDeleteTextures() the problem goes away, so this seems very likely... Quote Let's build cool stuff and have fun.
Solution Josh Posted July 29, 2024 Solution Posted July 29, 2024 Quote Let's build cool stuff and have fun.
Josh Posted July 29, 2024 Posted July 29, 2024 Update is available now that fixes this. 1 Quote Let's build cool stuff and have fun.
Recommended Posts
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.