ErhanK Posted September 4, 2024 Posted September 4, 2024 Hi. Is there a method that gets the current framebuffer? Like ActiveWindow(), entity-GetWorld(), or Context::GetCurrent() in LW? Quote
Solution reepblue Posted September 4, 2024 Solution Posted September 4, 2024 You can retrieve the framebuffer from the active window. 1 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 4, 2024 Posted September 4, 2024 Make sure you check to see if ActiveWindow returns NULL. It will not return a window if the window is not selected. 2 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Josh Posted September 4, 2024 Posted September 4, 2024 You also have the option to pass an extra object info the scene load function, which will be passed to each call of Component::Load. You could store the framebuffer there, or create your own class that stores all your game variables like this: struct MyGameStuff : public Object { shared_ptr<Window> window; shared_ptr<Framebuffer> framebuffer; table settings; }; 1 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.