reepblue Posted September 20, 2023 Posted September 20, 2023 How would I use World::GetFrameCaptures() to have my app take a screenshot of the game? I know Steam can do this, but I'd like the application to be able to do this alone. void Program::TakeScreenshot() { if (mainapp != NULL) { auto f = stage->gameworld->GetFrameCaptures(); //auto game = mainapp->As<GraphicsWindow>(); //if (game) game->framebuffer->Capture(); } } Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
Josh Posted September 21, 2023 Posted September 21, 2023 Call Framebuffer::Capture to take the screenshot. The result will not be available immediately. In your main loop, call world->GetFrameCaptures() each loop, and handle any results it gives you there. In the next build this will be changed to Framebuffer::GetCaptures(), and it will return a resizable array of pixmaps. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
reepblue Posted September 21, 2023 Author Posted September 21, 2023 Ok, I'll probably wait until the update before returning to this. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
Josh Posted September 22, 2023 Posted September 22, 2023 It's ready now: https://www.ultraengine.com/learn/Framebuffer_Capture?lang=cpp 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
reepblue Posted September 22, 2023 Author Posted September 22, 2023 The example needs to be updated but I think I know how it works. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
Josh Posted September 22, 2023 Posted September 22, 2023 Ah, check the Lua example... 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
reepblue Posted September 22, 2023 Author Posted September 22, 2023 I now see the updated example. I'll implement this tonight, thank you! Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
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.