Saxum/game/material.hh

41 lines
1.2 KiB
C++
Raw Normal View History

#ifndef MATERIAL_HH_INCLUDED
#define MATERIAL_HH_INCLUDED
2014-10-20 17:09:34 +00:00
#include <string>
#include <set>
2014-10-22 21:17:18 +00:00
#include <ACGL/OpenGL/Creator/Texture2DCreator.hh>
#include <ACGL/OpenGL/Data/TextureLoadStore.hh>
#include <ACGL/OpenGL/Managers.hh>
2014-10-20 17:09:34 +00:00
using namespace ACGL::OpenGL;
class Material{
2014-10-20 17:09:34 +00:00
public:
Material(std::string filePath, float ambientFactor,
float diffuseFactor, float specularFactor, float shininess, bool movingTexture = false);
Material();
SharedTexture2D getReference();
~Material();
float getAmbientFactor();
float getDiffuseFactor();
float getSpecularFactor();
float getShininess();
bool isMoving();
static std::vector<SharedTexture2D>* getAllTextures();
2015-03-21 14:05:22 +00:00
static std::vector<Material*>* getAllMaterials();
int getTextureUnit();
2014-10-20 17:09:34 +00:00
private:
int textureUnit;
2014-10-22 21:17:18 +00:00
ACGL::OpenGL::SharedTexture2D reference;
float ambientFactor;
float diffuseFactor;
float specularFactor;
float shininess;
bool movingTexture;
static std::set<SharedTexture2D> allTexturesSet;
static std::vector<SharedTexture2D> allTexturesVector;
2014-10-20 17:09:34 +00:00
};
#endif