SimpleGL
1.1.0
A framework for platform independent rendering
Main Page
Namespaces
Classes
Files
File List
File Members
Backends
OpenGL
src
application_gl.cpp
Go to the documentation of this file.
1
8
#include "
SimpleGL_gl/application_gl.hpp
"
9
10
#include "
SimpleGL_gl/gl_general.hpp
"
11
#include "
SimpleGL_gl/glfw_window_gl.hpp
"
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
();
18
textureManager
=
new
TextureManager
();
19
shaderManager
=
new
ShaderManager
();
20
}
21
22
ApplicationGL::~ApplicationGL
(
void
) {
23
/* Delete Texture Manager */
24
delete
textureManager
;
25
26
/* Delete Shader Manager */
27
delete
shaderManager
;
28
29
/* Delete batch */
30
delete
batch
;
31
}
32
33
void
ApplicationGL::clear
() {
34
GL::clear
(
ClearBit::COLOR_BUFFER_BIT
|
ClearBit::DEPTH_BUFFER_BIT
);
35
}
36
37
void
ApplicationGL::dispose
() {
38
textureManager
->
clear
();
39
shaderManager
->
clear
();
40
}
41
}
sgl::ApplicationGL::~ApplicationGL
~ApplicationGL(void)
Destroys the application.
Definition:
application_gl.cpp:22
sgl::BatchGL
This class is used for batch rendering with OpenGL.
Definition:
batching_gl.hpp:30
sgl::ClearBit::COLOR_BUFFER_BIT
Equivalent to GL_COLOR_BUFFER_BIT.
sgl::ShaderManager::clear
void clear() override
Removes all shaders and disposes them.
Definition:
manager_gl.cpp:76
sgl::ApplicationGL::dispose
void dispose() override
Disposes the application.
Definition:
application_gl.cpp:37
sgl::Application::window
Window * window
The window of this application.
Definition:
application.hpp:38
sgl::GL::clear
static void clear(ClearBit mask)
Clears the specified buffers.
Definition:
gl_general.cpp:71
sgl::ClearBit::DEPTH_BUFFER_BIT
Equivalent to GL_DEPTH_BUFFER_BIT.
sgl
Generic namespace for the SimpleGL framework.
Definition:
application.hpp:18
sgl::ApplicationGL::batch
BatchGL * batch
The batch of this application.
Definition:
application_gl.hpp:31
sgl::TextureManager
This class provides an class for managing textures.
Definition:
manager_gl.hpp:27
sgl::WindowGL
This class provides a GLFW window with OpenGL context.
Definition:
glfw_window_gl.hpp:24
sgl::ApplicationGL::ApplicationGL
ApplicationGL(int width=640, int height=480, std::string title="SimpleGL Application (OpenGL backend)")
Creates a new application.
Definition:
application_gl.cpp:15
sgl::ShaderManager
This class provides an class for managing shaders.
Definition:
manager_gl.hpp:56
sgl::ApplicationGL::shaderManager
ShaderManager * shaderManager
The shader manager of this application.
Definition:
application_gl.hpp:37
glfw_window_gl.hpp
sgl::TextureManager::clear
void clear() override
Removes all textures and disposes them.
Definition:
manager_gl.cpp:31
sgl::ApplicationGL::textureManager
TextureManager * textureManager
The texture manager of this application.
Definition:
application_gl.hpp:34
sgl::ApplicationGL::clear
void clear() override
This method clears the color and depth buffers.
Definition:
application_gl.cpp:33
application_gl.hpp
sgl::Application
This is the base class for an application.
Definition:
application.hpp:25
gl_general.hpp
Generated on Sat Jun 30 2018 21:55:23 for SimpleGL by
1.8.11