The Osiris Application base class.
More...
#include <OsirisSDK/OApplication.h>
|
| OApplication (const char *title, int argc, char **argv, int windowPos_x=OAPPLICATION_DEFAULT_POSX, int windowPos_y=OAPPLICATION_DEFAULT_POSY, int windowWidth=OAPPLICATION_DEFAULT_WIDTH, int windowHeight=OAPPLICATION_DEFAULT_HEIGHT) |
| Class constructor. More...
|
|
virtual | ~OApplication () |
| Class destructor.
|
|
OCamera * | camera () |
| Returns the application camera object. More...
|
|
void | start () |
| Initializes the application and starts the main loop.
|
|
|
virtual void | init ()=0 |
|
virtual void | clearScreen () |
| Called in the begining of the render process for each loop to clear the previous screen.
|
|
virtual void | update (int timeIndex_ms)=0 |
|
virtual void | onKeyboardPress (unsigned char key, int mouse_x, int mouse_y) |
| Virtual method to process key strokes. More...
|
|
void | onWindowResize (int width, int height) |
| Virtual method called when the window is resized. More...
|
|
The Osiris Application base class.
This is the class that represents an application based on the Osiris Framework. It handles basic interaction with OpenGL, creating the window and handling main loop.
OApplication::OApplication |
( |
const char * |
title, |
|
|
int |
argc, |
|
|
char ** |
argv, |
|
|
int |
windowPos_x = OAPPLICATION_DEFAULT_POSX , |
|
|
int |
windowPos_y = OAPPLICATION_DEFAULT_POSY , |
|
|
int |
windowWidth = OAPPLICATION_DEFAULT_WIDTH , |
|
|
int |
windowHeight = OAPPLICATION_DEFAULT_HEIGHT |
|
) |
| |
Class constructor.
The constructor creates the window and initializes OpenGL.
- Parameters
-
title | Application window title. |
argc | Number of command line arguments |
argv | Command line arguments. |
windowPos_x | Window position on the X axis. |
windowPos_y | Window position on the Y axis. |
windowWidth | Window width. |
windowHeight | Window height. |
Returns the application camera object.
- Returns
- Pointer to the application camera object.
void OApplication::onKeyboardPress |
( |
unsigned char |
key, |
|
|
int |
mouse_x, |
|
|
int |
mouse_y |
|
) |
| |
|
protectedvirtual |
Virtual method to process key strokes.
- Parameters
-
key | ASCII key code. |
mouse_x | Position in the X axis of the mouse pointer. |
mouse_y | Position in the Y axis of the mouse pointer. |
void OApplication::onWindowResize |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
protected |
Virtual method called when the window is resized.
Camera and screen adjustments are already dealt by OApplication.
- Parameters
-
width | New window width. |
height | New window height. |
The documentation for this class was generated from the following files: