 |
BARE2D
|
|
Go to the documentation of this file.
149 while(SDL_PollEvent(&event)) {
157 case SDL_MOUSEMOTION:
166 case SDL_MOUSEBUTTONDOWN:
169 case SDL_MOUSEBUTTONUP:
std::unique_ptr< ScreenList > m_screenList
ScreenList * getScreenList()
Returns the screen list, where the program can add more screens, set entry points,...
void run()
Runs the program! Starts the update-draw loop.
void update(double dt)
Updates input, output, etc. Only for internal use.
void updateInput()
Updates any input, and throws it down the pipeline!
void init()
Initializes the applet and engine. Creates a window, held within this App. Only for internal use.
CEGUI::GUIContext * getContext()
void endTimer()
To be called at the end of a frame.
void handleSDLEvent(SDL_Event &evnt)
Handles and propagates input.
void draw()
Draws the current screen, based on that screen's drawing protocol.
void create(unsigned int flags)
This is a graphical window. It holds information about the GL context, as well as the SDL window cont...
void setDeltaTimeLimit(double minDt)
Sets the maximum value of dt. Naturally, there is no minimum. This doesn't take away from accuracy....
static BARECEGUI * getInstance()
Not only does the timer keep track of the current time and delta-times, it can do all the "fancy" cal...
void pollSDLInput()
Polls inputs from SDL and updates the inputmanager as appropriate.
InputManager * getInputManager()
void startTimer()
To be called at the start of a frame.
It's a graphical window, holds the contexts for GL and SDL.
bool integrateFrame()
IntegrateFrame gives an indication of whether we should be updatign again with dt or if we should exi...
void init()
Inits the required systems used by BARE2D.
Holds and connects all of the screens used in the program in a list. Keeps track of the previous scre...
InputManager * m_inputManager
void swapBuffer()
Swaps the buffer of the SDL window - used to draw to one while the other displays,...
unsigned int getWidth() const
Returns the width of the window.
void initGLErrorCallback(GLErrorSeverity minSeverity)
Initializes the GL Debug Message Callback function, and enables debug output straight from OpenGL.
void throwFatalError(BAREError err, std::string message)
Throws an error (fatal). Also calls displayErrors and exits the program.
unsigned int getHeight() const
Returns the height of the window.
void exitApp()
Calls the screen's exit function, and then cleans this class up for destruction.