SimpleGL  1.1.0
A framework for platform independent rendering
Public Member Functions | Protected Attributes | List of all members
sgl::ApplicationGL Class Reference

This class should get extended by the user when using the OpenGL backend. More...

#include <application_gl.hpp>

Inheritance diagram for sgl::ApplicationGL:
sgl::Application

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

BatchGLbatch
 The batch of this application. More...
 
TextureManagertextureManager
 The texture manager of this application. More...
 
ShaderManagershaderManager
 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...
 
Windowwindow
 The window of this application. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sgl::Application
 Application (void)
 Initializes a new application. More...
 

Detailed Description

This class should get extended by the user when using the OpenGL backend.

Definition at line 27 of file application_gl.hpp.

Constructor & Destructor Documentation

sgl::ApplicationGL::ApplicationGL ( int  width = 640,
int  height = 480,
std::string  title = "SimpleGL Application (OpenGL backend)" 
)

Creates a new application.

Parameters
widthThe width of the window, default is 640 pixel.
heightThe height of the window, default is 480 pixel.
titleThe 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.

Member Function Documentation

void sgl::ApplicationGL::clear ( )
overridevirtual

This method clears the color and depth buffers.

Implements sgl::Application.

Definition at line 33 of file application_gl.cpp.

void sgl::ApplicationGL::dispose ( )
overridevirtual

Disposes the application.

Reimplemented from sgl::Application.

Definition at line 37 of file application_gl.cpp.

Member Data Documentation

BatchGL* sgl::ApplicationGL::batch
protected

The batch of this application.

Definition at line 31 of file application_gl.hpp.

ShaderManager* sgl::ApplicationGL::shaderManager
protected

The shader manager of this application.

Definition at line 37 of file application_gl.hpp.

TextureManager* sgl::ApplicationGL::textureManager
protected

The texture manager of this application.

Definition at line 34 of file application_gl.hpp.


The documentation for this class was generated from the following files: