home *** CD-ROM | disk | FTP | other *** search
- #ifndef __Material_h__
- #define __Material_h__
-
- #include "Texture.h"
- #include "Shader.h"
-
- enum SurfaceTypes_e{
- MATERIAL_SURFACE_TYPE_METAL = 0,
- MATERIAL_SURFACE_TYPE_STONE,
- MATERIAL_SURFACE_TYPE_WOOD,
- MATERIAL_SURFACE_TYPE_DIRT,
-
- MATERIAL_NUM_SURFACE_TYPES
- };
-
- class Material{
- public:
- GLfloat color[4];
-
- Texture* texture;
- Texture* lightmap;
- Shader* shader;
-
- bool isTransparent;
- bool hasTexture;
- bool hasLightmap;
- bool hasShader;
- bool isTwoSided;
- unsigned int collisionFlags;
- int surfaceType;
-
- Material();
- Material(File* f);
- ~Material();
- void clearMaterial();
-
- void setup();
- void setdown();
- void setAttribs();
- int addTexture(Texture* tex);
- int addLightmap(Texture* tex);
- int addShader(Shader* sha);
-
- bool readFromFile(File* f);
- void dump();
- };
-
- #endif /* __Material_h__ */
-
-