-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmaterial.h
More file actions
executable file
·44 lines (31 loc) · 869 Bytes
/
material.h
File metadata and controls
executable file
·44 lines (31 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef MATERIAL_H
#define MATERIAL_H
#include <cstddef>
#include <vector>
#include <map>
#include <memory>
#include <stdexcept>
#if __GNUG__
# include <tr1/memory>
#endif
#include "cvec.h"
#include "matrix4.h"
#include "glsupport.h"
#include "uniforms.h"
#include "renderstates.h"
#include "geometry.h"
struct GlProgramDesc;
class Material {
public:
Material(const std::string& vsFilename, const std::string& fsFilename);
void draw(Geometry& geometry, const Uniforms& extraUniforms);
Uniforms& getUniforms() { return uniforms_; }
const Uniforms& getUniforms() const { return uniforms_; }
RenderStates& getRenderStates() { return renderStates_; }
const RenderStates& getRenderStates() const { return renderStates_; }
protected:
std::tr1::shared_ptr<GlProgramDesc> programDesc_;
Uniforms uniforms_;
RenderStates renderStates_;
};
#endif