The Vish Visualization Shell 0.3
Vish
Protected Member Functions | List of all members
Wizt::GlossyLines Class Reference

A helper class to draw lines with a shiny, glossy texture. More...

#include <ocean/GLvish/GlossyTexture.hpp>

Protected Member Functions

RefPtr< GlossyTexturegetLineTexture (MemCore::Intercube &CacheObject, VGLRenderContext &Context, int TextureUnit=0) const
 Setup the line texture cached relative to the given object.
 
 GlossyLines (VObject *parent)
 Construct from VObject, this is usually the parent's class "this" pointer.
 
 ~GlossyLines ()
 Destructor.
 

Detailed Description

A helper class to draw lines with a shiny, glossy texture.

No shaders used here, this is an old standard OpenGL technique.

Constructor & Destructor Documentation

◆ ~GlossyLines()

Wizt::GlossyLines::~GlossyLines ( )
protected

Destructor.

It destructs.

Member Function Documentation

◆ getLineTexture()

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:

{
GlossyTexture::Render LINERENDER( *LineTexture, Context.CameraSettings );
glBegin(...);
glTexCoord(...) // must contain the tangential vectors
glEnd();
}
A set of variable names, with indices associated to each type.
Definition Context.hpp:18
A reference counting pointer class which keeps objects alive as long as strong pointers to these obje...
Definition RefPtr.hpp:405
RefPtr< GlossyTexture > getLineTexture(MemCore::Intercube &CacheObject, VGLRenderContext &Context, int TextureUnit=0) const
Setup the line texture cached relative to the given object.
Definition GlossyTexture.cpp:156
An exception-safe way to call the beginRender() and endRender() routines of the GlossyTexture.
Definition GlossyTexture.hpp:84

Note that tangential vectors \i must be defined during rendering for this glossy texture to work. They need to be specified as 3D texture coordinates.