You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
1.3 KiB

/******************************************************
* LEGACY CODE FROM EMBRYO VERY FIRST DRAFT *
* READ AT YOUR OWN RISK *
* I cannot be held responsible for any brain damage *
* caused by the reading of this code *
* It worked at some point, so it should be pretty *
* easy to reimplment it *
******************************************************/
#ifndef MATERIAL_H
#define MATERIAL_H
#include "ExternalLib/glad.h"
#include <string>
enum MaterialType
{
Texture, lightMap, opacityMap, LENGTH
};
class Material
{
public:
Material();
Material(MaterialType type, const char filename[], std::string glName);
~Material();
MaterialType type;
GLuint getGlId() const;
std::string getGlName() const;
bool operator==(Material const& rhs) const
{
if ( type == rhs.type &&
glId== rhs.getGlId() &&
glName == rhs.getGlName())
return true;
else
return false;
}
private:
GLuint glId; // GLuint id associated to the Material (for binding purposes)
std::string glName; // name used to allocate uniform variable on graphic card
};
#endif /* MATERIAL_H */