projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
textures, lightmaps, hardcoded texture hack for testing
[laserbrain_demo]
/
src
/
material.h
diff --git
a/src/material.h
b/src/material.h
index
f5c26ae
..
979bbd9
100644
(file)
--- a/
src/material.h
+++ b/
src/material.h
@@
-1,16
+1,37
@@
#ifndef MATERIAL_H_
#define MATERIAL_H_
#ifndef MATERIAL_H_
#define MATERIAL_H_
+#include <vector>
+#include <string>
#include <gmath/gmath.h>
#include <gmath/gmath.h>
+#include "texture.h"
+
+enum {
+ MTL_TEX_DIFFUSE,
+ MTL_TEX_SPECULAR,
+ MTL_TEX_NORMALMAP,
+ MTL_TEX_LIGHTMAP,
+ MTL_TEX_ENVMAP,
+
+ MTL_TEX_UNKNOWN
+};
+
+#define NUM_MTL_TEXTURES MTL_TEX_UNKNOWN
class Material {
public:
class Material {
public:
+ std::string name;
Vec3 diffuse, specular;
float shininess;
float alpha;
Vec3 diffuse, specular;
float shininess;
float alpha;
+ Texture *stdtex[NUM_MTL_TEXTURES];
+ std::vector<Texture*> textures;
+
Material();
void setup() const;
Material();
void setup() const;
+
+ void add_texture(Texture *tex, int type = MTL_TEX_UNKNOWN);
};
#endif // MATERIAL_H_
};
#endif // MATERIAL_H_