Era Posted July 27, 2013 Share Posted July 27, 2013 I am supporting this game through kickstarter so I do not have access to all the forums yet so I am posting here. (Sorry if this is the wrong spot, but no access to the programming area). So I was playing with the trial and was banging my head against the wall on how to toggle fullscreen, well I figured it out and thought I would share here for others that are having a hard time. void Settings::SetFullScreen(bool isFullscreen) { if (isFullscreen != _vidSettings._fullscreen) { _vidSettings._fullscreen = isFullscreen; GetCore()->window->Release(); if (isFullscreen) { GetCore()->window = Window::Create( _vidSettings._title, 0, 0, _vidSettings._res.x, _vidSettings._res.y, Window::FullScreen); } else { GetCore()->window = Window::Create( _vidSettings._title, 0, 0, _vidSettings._res.x, _vidSettings._res.y, Window::Titlebar); } GetCore()->context = Context::Create(GetCore()->window); } } I have a class I pass around to everyone that pretty much just contains pointers to window, context, world, and camera that is what the GetCore() is (well it is a function that returns the core pointer but that is a personal coding style) 2 Quote 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.