reepblue Posted September 20, 2023 Share 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! Link to comment Share on other sites More sharing options...
Josh Posted September 21, 2023 Share 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. Link to comment Share on other sites More sharing options...
reepblue Posted September 21, 2023 Author Share 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! Link to comment Share on other sites More sharing options...
Josh Posted September 22, 2023 Share 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. Link to comment Share on other sites More sharing options...
reepblue Posted September 22, 2023 Author Share 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! Link to comment Share on other sites More sharing options...
Josh Posted September 22, 2023 Share 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. Link to comment Share on other sites More sharing options...
reepblue Posted September 22, 2023 Author Share 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! Link to comment Share on other sites More sharing options...
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.