#include <TextureGenerator.h>
Public Methods | |
void | GenTextureMap (CStreamlineMaterial material, float diffCoeff, float specCoeff) |
Generates texture map. More... | |
CTextureGenerator (int size) | |
GLubyte * | GetTextureMap () |
Returns pointer to texture map . | |
void | SetMapSize (int size) |
Sets size of one dimension of map, in fact width=size and heigth = size. | |
int | GetMapSize () |
Returns size of one dimension of map, , in fact width=size and heigth = size. | |
CTextureGenerator () | |
virtual | ~CTextureGenerator () |
The generated texture is stored in quasi-2-dimensional array(in fact its 1-dimensional) and can be used as 2-dimensional texture map with the gl-call:
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_TexGenerator.GetMapSize(), m_TexGenerator.GetMapSize(), 0, GL_RGBA, GL_UNSIGNED_BYTE, m_TexGenerator.GetTextureMap());
|
Generates texture map. AmbientRGB, diffuseRGB, specularRGB store the RGB values for the ambient, diffuse and specular colors as 3 unsigned bytes. diffCoeff is a correction coefficient for diffuse colors, specCoeff is the highlight coefficient. |