I've been working on application today and I know I probably mentioned the "*Core" system I used briefly, but I wasn't sure how much we discussed, and if we decided to use something similar.
currently the application class has some basic things like update,setTitle,isActive,quitRequested, etc. I also had it have as protected member variables
TimerCore timer;
InputCore input;
VideoCore video;
and so on (others that come to mind are GUI & Audio)
The thing I like the most about this system is that since these are protected members, a child class of Application can easily use them in an intuitive fashion, input.keyPressed(KEY_UP), video.setOrtho(), etc.
The other main advantage is that since some of these subsystems would have things that would need to be called every frame (input.updateEvents,video.swapBuffers,gui.drawElements, etc.) having the cores as a member of Application makes it possible to call Application::update which could do it's current work (checking for exit/focus events) as well as calling needed functoins in the cores)
It is also possible for us to have what would be in ExampleCore be a free function in example:: or to make the Core's more standard singletons (I use an interesting singleton variation for the cores I can show you if we decide to use them)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've been working on application today and I know I probably mentioned the "*Core" system I used briefly, but I wasn't sure how much we discussed, and if we decided to use something similar.
currently the application class has some basic things like update,setTitle,isActive,quitRequested, etc. I also had it have as protected member variables
TimerCore timer;
InputCore input;
VideoCore video;
and so on (others that come to mind are GUI & Audio)
The thing I like the most about this system is that since these are protected members, a child class of Application can easily use them in an intuitive fashion, input.keyPressed(KEY_UP), video.setOrtho(), etc.
The other main advantage is that since some of these subsystems would have things that would need to be called every frame (input.updateEvents,video.swapBuffers,gui.drawElements, etc.) having the cores as a member of Application makes it possible to call Application::update which could do it's current work (checking for exit/focus events) as well as calling needed functoins in the cores)
It is also possible for us to have what would be in ExampleCore be a free function in example:: or to make the Core's more standard singletons (I use an interesting singleton variation for the cores I can show you if we decide to use them)