reepblue Posted March 8, 2024 Posted March 8, 2024 This event no longer gets emitted when the renderer has started. I use this event to hide my splash window and then show the game window. Put a break on the Print call and you'll notice it'll not get triggered. #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { while (PeekEvent()) { const auto e = WaitEvent(); if (e.id == EVENT_STARTRENDERER) { Print("Renderer has started with code: " + String(e.data)); } } world->Update(); world->Render(framebuffer); } return 0; } Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
Josh Posted March 8, 2024 Posted March 8, 2024 I will have an update ready tomorrow. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Josh Posted March 8, 2024 Posted March 8, 2024 Fixed for today's build, also added some new functionality: if (e.id == EVENT_STARTRENDERER) { Print("Renderer has started with code: " + String(e.data)); if (e.extra) { auto caps = e.extra->As<GraphicsCaps>(); Print(caps->vendor); Print(caps->device); Print(caps->driver); } } 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
reepblue Posted March 11, 2024 Author Posted March 11, 2024 @Josh This is broken again with the last update, please remove the solution tag. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
Solution Josh Posted March 12, 2024 Solution Posted March 12, 2024 Fixed. You may see more than one of these events emitted in the current build, but at least one will be. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
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.