Voxellancer
0.3
A game about voxels in space
Main Page
Related Pages
Classes
Files
File List
All
Classes
Functions
Pages
voxelmesh.h
1
#pragma once
2
3
#include <string>
4
5
#include <GL/glew.h>
6
7
#include <glow/ref_ptr.h>
8
9
#include <glm/glm.hpp>
10
11
#include "etc/contextdependant.h"
12
13
14
namespace
glow {
15
class
Program;
16
class
VertexArrayObject;
17
class
Buffer;
18
};
19
20
21
class
VoxelMesh
:
public
ContextDependant
{
22
public
:
23
VoxelMesh
();
24
void
bindTo(glow::Program* program,
25
glow::VertexArrayObject* vao,
26
int
bindingIndex);
27
28
protected
:
29
bool
m_initialized;
30
glow::ref_ptr<glow::Buffer> m_vertexBuffer;
31
32
void
setupVertexAttribute(glow::Program* program, glow::VertexArrayObject* vao,
const
std::string& name, GLboolean normalised,
int
bindingNum, GLint offset);
33
34
void
initialize();
35
36
virtual
void
beforeContextDestroy()
override
;
37
virtual
void
afterContextRebuild()
override
;
38
};
39
ContextDependant
Definition:
contextdependant.h:7
VoxelMesh
Definition:
voxelmesh.h:21
src
voxeleffect
voxelmesh.h
Generated on Sun Mar 30 2014 13:32:32 for Voxellancer by
1.8.6