OpenPolygon
1.0.0
OpenPolygon is a Rendering Engine
Main Page
Namespaces
Classes
Files
File List
include
Container
texturebufferobject.h
1
/*
2
Copyright (C) 2014 - 2016 Mutzii
3
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17
*/
18
#ifndef TEXTUREBUFFEROBJECT_H
19
#define TEXTUREBUFFEROBJECT_H
20
21
#include "index.h"
22
#include "eutils.h"
23
#include "shadermanager.h"
24
#include "meshmanager.h"
25
#include "texturemanager.h"
26
#include "gltexturebuffer.h"
27
28
namespace
Engine
29
{
30
#define GLSL_TBO_COMPATIBLE_VERSION 1.40
31
35
class
TextureBufferObject
36
{
37
public
:
38
explicit
TextureBufferObject
(
Mesh
* mesh ,
IShader
*shader );
39
~
TextureBufferObject
();
40
41
void
Create(
int
tbo_draws ,
int
amount_floats );
42
43
void
AddMatrixData( GLintptr offset , glm::mat4 matrix );
44
45
void
AddVector4f( GLintptr offset ,
const
Vector4f
& vector );
46
47
void
Active(
int
texture_unit );
48
49
void
ActiveSecond(
int
texture_unit );
50
51
void
Load(
void
);
52
53
void
ClearBuffer(
void
);
54
55
private
:
56
57
Mesh
* mMesh;
58
IShader
* mShader;
59
Texture
* mTBO;
60
61
GLTextureBuffer
* m_texture_buffer;
62
63
uint tbo_vbo_buffer;
64
int
mTBODraws;
65
int
mFloats;
66
67
bool
m_glsl_modern_compatible;
68
};
69
70
}
71
72
73
#endif // TEXTUREBUFFEROBJECT_H
Engine::Texture
The Texture class.
Definition:
texture.h:37
Engine
Definition:
element.h:23
Engine::IShader
The IShader - abstract / interface class.
Definition:
IShader.h:30
Engine::GLTextureBuffer
The GLTextureBuffer class.
Definition:
gltexturebuffer.h:30
Vector4< float >
Engine::TextureBufferObject
The TextureBufferObject class.
Definition:
texturebufferobject.h:35
Engine::Mesh
The Mesh class.
Definition:
mesh.h:32
Generated by
1.8.10