ErhanK Posted September 4 Share Posted September 4 Hi. Is there a method that gets the current framebuffer? Like ActiveWindow(), entity-GetWorld(), or Context::GetCurrent() in LW? Quote Link to comment Share on other sites More sharing options...
Solution reepblue Posted September 4 Solution Share Posted September 4 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! Link to comment Share on other sites More sharing options...
Josh Posted September 4 Share Posted September 4 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. Link to comment Share on other sites More sharing options...
Josh Posted September 4 Share Posted September 4 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. 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.