textures, lightmaps, hardcoded texture hack for testing
[laserbrain_demo] / src / material.h
index f5c26ae..979bbd9 100644 (file)
@@ -1,16 +1,37 @@
 #ifndef MATERIAL_H_
 #define MATERIAL_H_
 
+#include <vector>
+#include <string>
 #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:
+       std::string name;
        Vec3 diffuse, specular;
        float shininess;
        float alpha;
 
+       Texture *stdtex[NUM_MTL_TEXTURES];
+       std::vector<Texture*> textures;
+
        Material();
        void setup() const;
+
+       void add_texture(Texture *tex, int type = MTL_TEX_UNKNOWN);
 };
 
 #endif // MATERIAL_H_