SimpleGL  1.1.0
A framework for platform independent rendering
application_gl.cpp
Go to the documentation of this file.
1 
9 
12 
13 namespace sgl {
14 
15  ApplicationGL::ApplicationGL(int width, int height, std::string title) : Application() {
16  window = new WindowGL(width, height, title);
17  batch = new BatchGL();
20  }
21 
23  /* Delete Texture Manager */
24  delete textureManager;
25 
26  /* Delete Shader Manager */
27  delete shaderManager;
28 
29  /* Delete batch */
30  delete batch;
31  }
32 
35  }
36 
40  }
41 }
~ApplicationGL(void)
Destroys the application.
This class is used for batch rendering with OpenGL.
Definition: batching_gl.hpp:30
Equivalent to GL_COLOR_BUFFER_BIT.
void clear() override
Removes all shaders and disposes them.
Definition: manager_gl.cpp:76
void dispose() override
Disposes the application.
Window * window
The window of this application.
Definition: application.hpp:38
static void clear(ClearBit mask)
Clears the specified buffers.
Definition: gl_general.cpp:71
Equivalent to GL_DEPTH_BUFFER_BIT.
Generic namespace for the SimpleGL framework.
Definition: application.hpp:18
BatchGL * batch
The batch of this application.
This class provides an class for managing textures.
Definition: manager_gl.hpp:27
This class provides a GLFW window with OpenGL context.
ApplicationGL(int width=640, int height=480, std::string title="SimpleGL Application (OpenGL backend)")
Creates a new application.
This class provides an class for managing shaders.
Definition: manager_gl.hpp:56
ShaderManager * shaderManager
The shader manager of this application.
void clear() override
Removes all textures and disposes them.
Definition: manager_gl.cpp:31
TextureManager * textureManager
The texture manager of this application.
void clear() override
This method clears the color and depth buffers.
This is the base class for an application.
Definition: application.hpp:25