VISH
0.2
|
A helper class to draw lines with a shiny, glossy texture. More...
#include </home/werner/origo/vish/ocean/GLvish/GlossyTexture.hpp>
A helper class to draw lines with a shiny, glossy texture.
No shaders used here, this is an old standard OpenGL technique.
Wizt::GlossyLines::~GlossyLines | ( | ) | [protected] |
Destructor.
It destructs.
RefPtr< GlossyTexture > Wizt::GlossyLines::getLineTexture | ( | MemCore::Intercube & | CacheObject, |
VGLRenderContext & | Context, | ||
int | TextureUnit = 0 |
||
) | const [protected] |
Setup the line texture cached relative to the given object.
This may be a data field, or just the object's local State object.
What is then left to do is to active the texture by constructing a GlossyTexture::Render object. Code looks like this for instance:
RefPtr<GlossyTexture> LineTexture = getLineTexture(...); { GlossyTexture::Render LINERENDER( *LineTexture, Context.CameraSettings ); glBegin(...); glTexCoord(...) // must contain the tangential vectors glEnd(); }
Note that tangential vectors must be defined during rendering for this glossy texture to work. They need to be specified as 3D texture coordinates.