|
PGR Copakond OpenGL Engine - Bowling
|
Defines surface properties and texture maps for rendering a mesh. More...
#include <material.h>
Public Member Functions | |
| Material () | |
| Material (const glm::vec3 &ambient, const glm::vec3 &diffuse, const glm::vec3 &specular) | |
| Material (const glm::vec3 &ambient, const glm::vec3 &diffuse, const glm::vec3 &specular, float shininess) | |
| Material (const glm::vec3 &ambient, const glm::vec3 &diffuse, const glm::vec3 &specular, float shininess, float alpha) | |
| ~Material () | |
| glm::vec3 & | ambient () |
| glm::vec3 & | diffuse () |
| glm::vec3 & | specular () |
| float & | shininess () |
| float & | alpha () |
| void | setDiffuseTexture (const std::string &textureFile, bool warpTexture=false, bool mipMap=true) |
| Loads and binds a diffuse texture map. | |
| bool | hasDiffuseTexture () const |
| void | clearDiffuseTexture () |
| void | setSpecularTexture (const std::string &textureFile) |
| bool | hasSpecularTexture () const |
| void | clearSpecularTexture () |
| void | setShininessTexture (const std::string &textureFile) |
| bool | hasShininessTexture () const |
| void | clearShininessTexture () |
| void | setAlphaTexture (const std::string &textureFile) |
| bool | hasAlphaTexture () const |
| void | clearAlphaTexture () |
| void | setNormalTexture (const std::string &textureFile) |
| bool | hasNormalTexture () const |
| void | clearNormalTexture () |
| GLuint | diffuseTextureUniform () const |
| GLuint | specularTextureUniform () const |
| GLuint | shininessTextureUniform () const |
| GLuint | alphaTextureUniform () const |
| GLuint | normalTextureUniform () const |
| void | setAlpha (float alpha) |
| float | getAlpha () const |
| void | setIsTextLabel (bool state) |
| bool | isTextLabel () const |
Protected Member Functions | |
| void | constructor (const glm::vec3 &ambient, const glm::vec3 &diffuse, const glm::vec3 &specular, float shininess, float alpha) |
Protected Attributes | |
| glm::vec3 | _ambient |
| glm::vec3 | _diffuse |
| glm::vec3 | _specular |
| float | _shininess |
| float | _alpha |
| GLuint | _diffuseTexture = 0 |
| GLuint | _specularTexture = 0 |
| GLuint | _shininessTexture = 0 |
| GLuint | _alphaTexture = 0 |
| GLuint | _normalTexture = 0 |
| bool | _hasDiffuseTexture |
| bool | _hasSpecularTexture |
| bool | _hasShininessTexture |
| bool | _hasAlphaTexture |
| bool | _hasNormalTexture |
| bool | _isTextLabel = false |
Defines surface properties and texture maps for rendering a mesh.
| copakond::Material::Material | ( | ) |
| copakond::Material::Material | ( | const glm::vec3 & | ambient, |
| const glm::vec3 & | diffuse, | ||
| const glm::vec3 & | specular ) |
| copakond::Material::Material | ( | const glm::vec3 & | ambient, |
| const glm::vec3 & | diffuse, | ||
| const glm::vec3 & | specular, | ||
| float | shininess ) |
| copakond::Material::Material | ( | const glm::vec3 & | ambient, |
| const glm::vec3 & | diffuse, | ||
| const glm::vec3 & | specular, | ||
| float | shininess, | ||
| float | alpha ) |
| copakond::Material::~Material | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void copakond::Material::setAlphaTexture | ( | const std::string & | textureFile | ) |
| void copakond::Material::setDiffuseTexture | ( | const std::string & | textureFile, |
| bool | warpTexture = false, | ||
| bool | mipMap = true ) |
Loads and binds a diffuse texture map.
| warpTexture | If true, applies GL_REPEAT wrapping. |
| mipMap | If true, generates mipmaps. |
|
inline |
| void copakond::Material::setNormalTexture | ( | const std::string & | textureFile | ) |
| void copakond::Material::setShininessTexture | ( | const std::string & | textureFile | ) |
| void copakond::Material::setSpecularTexture | ( | const std::string & | textureFile | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Flag to indicate if material is for a text label (changes shader blend logic)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |