SimpleGL
1.1.0
A framework for platform independent rendering
Main Page
Namespaces
Classes
Files
File List
File Members
Backends
OpenGL
include
SimpleGL_gl
batching_gl.hpp
Go to the documentation of this file.
1
8
#ifndef BATCHING_GL_HPP
9
#define BATCHING_GL_HPP
10
11
#include <SimpleGL_gl/SimpleGL_gl_Export.h>
12
13
#include <string>
14
15
#include <
SimpleGL/batching.hpp
>
16
17
#include "
gl_general.hpp
"
18
#include "
vertex_array_object.hpp
"
19
#include "
vertex_buffer_object.hpp
"
20
#include "
shader_objects.hpp
"
21
#include "
texture_object.hpp
"
22
23
namespace
sgl
{
24
30
class
SIMPLEGL_GL_EXPORT
BatchGL
:
public
Batch
{
31
32
private
:
34
static
std::string vertexSource;
35
37
static
std::string fragmentSource;
38
40
static
Texture
* defaultTexture;
41
43
static
ShaderProgram
* defaultShaderProgram;
44
46
VertexArray
* vao;
47
49
Buffer
* vbo;
50
52
Buffer
* cbo;
53
55
Buffer
* tbo;
56
58
Buffer
* nbo;
59
61
ShaderProgram
* shaderProgram;
62
64
Primitive
mode;
65
66
public
:
73
BatchGL
(
int
capacity = 1024 * 1024);
74
76
~
BatchGL
(
void
);
77
79
void
begin()
override
;
80
86
void
begin(
Primitive
mode);
87
89
void
flush()
override
;
90
92
void
specifyVertexAttributes();
93
95
void
applyTransform();
96
98
void
resetShaderProgram();
99
105
ShaderProgram
* getShaderProgram();
106
112
void
setShaderProgram(
ShaderProgram
* program);
113
};
114
}
115
116
#endif
/* BATCHING_GL_HPP */
sgl::BatchGL
This class is used for batch rendering with OpenGL.
Definition:
batching_gl.hpp:30
sgl::Primitive
Primitive
This enum wraps Primitive types of OpenGL.
Definition:
gl_general.hpp:60
texture_object.hpp
batching.hpp
vertex_buffer_object.hpp
sgl::VertexArray
This class wraps an OpenGL vertex array object.
Definition:
vertex_array_object.hpp:54
sgl::ShaderProgram
This class wraps an OpenGL shader program.
Definition:
shader_objects.hpp:93
sgl::Buffer
This class wraps an OpenGL buffer object.
Definition:
vertex_buffer_object.hpp:106
sgl
Generic namespace for the SimpleGL framework.
Definition:
application.hpp:18
sgl::Texture
This class wraps an OpenGL texture object.
Definition:
texture_object.hpp:76
shader_objects.hpp
sgl::Batch
This class defines methods for batch rendering.
Definition:
batching.hpp:26
vertex_array_object.hpp
gl_general.hpp
Generated on Sat Jun 30 2018 21:55:23 for SimpleGL by
1.8.11