SimpleGL
1.1.0
A framework for platform independent rendering
|
This class should get extended by the user when using the OpenGL backend. More...
#include <application_gl.hpp>
Public Member Functions | |
ApplicationGL (int width=640, int height=480, std::string title="SimpleGL Application (OpenGL backend)") | |
Creates a new application. More... | |
~ApplicationGL (void) | |
Destroys the application. More... | |
void | clear () override |
This method clears the color and depth buffers. More... | |
void | dispose () override |
Disposes the application. More... | |
Public Member Functions inherited from sgl::Application | |
~Application (void) | |
Destroys the application. More... | |
void | run () |
Starts the application. More... | |
void | init () |
Initializes the application. More... | |
void | mainLoop () |
The main loop is a fixed timestep loop. More... | |
virtual void | handleEvents (std::vector< Event * > events)=0 |
This method is intended to handle events like user input. More... | |
virtual void | updateScene (float delta)=0 |
This method is intended to update objects of the application. More... | |
virtual void | renderScene (float alpha)=0 |
This method is intended to used for drawing the scene. More... | |
Protected Attributes | |
BatchGL * | batch |
The batch of this application. More... | |
TextureManager * | textureManager |
The texture manager of this application. More... | |
ShaderManager * | shaderManager |
The shader manager of this application. More... | |
Protected Attributes inherited from sgl::Application | |
bool | running |
Tells if the application is running. More... | |
int | targetUps |
Stores the desired UPS. More... | |
int | targetFps |
Stores the desired FPS. More... | |
Window * | window |
The window of this application. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from sgl::Application | |
Application (void) | |
Initializes a new application. More... | |
This class should get extended by the user when using the OpenGL backend.
Definition at line 27 of file application_gl.hpp.
sgl::ApplicationGL::ApplicationGL | ( | int | width = 640 , |
int | height = 480 , |
||
std::string | title = "SimpleGL Application (OpenGL backend)" |
||
) |
Creates a new application.
width | The width of the window, default is 640 pixel. |
height | The height of the window, default is 480 pixel. |
title | The title of the window, default is "SimpleGL Application". |
Definition at line 15 of file application_gl.cpp.
sgl::ApplicationGL::~ApplicationGL | ( | void | ) |
Destroys the application.
Definition at line 22 of file application_gl.cpp.
|
overridevirtual |
This method clears the color and depth buffers.
Implements sgl::Application.
Definition at line 33 of file application_gl.cpp.
|
overridevirtual |
Disposes the application.
Reimplemented from sgl::Application.
Definition at line 37 of file application_gl.cpp.
|
protected |
The batch of this application.
Definition at line 31 of file application_gl.hpp.
|
protected |
The shader manager of this application.
Definition at line 37 of file application_gl.hpp.
|
protected |
The texture manager of this application.
Definition at line 34 of file application_gl.hpp.