Visualization Library 2.0.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Public Attributes | List of all members
vl::TexGen Class Reference

RenderState wrapping the OpenGL function glTexGen(), see also http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml for more information. More...

#include <Shader.hpp>

+ Inheritance diagram for vl::TexGen:

Public Member Functions

 TexGen ()
 The eye and object planes are not transformed by any matrix (unlike usually with OpenGL), which means that the object plane is specified in object coordinates and that, the eye plane is specified in camera coordinates. More...
 
virtual ERenderState type () const
 
virtual void apply (int index, const Camera *, OpenGLContext *ctx) const
 The parameter cameara is NULL if we are disabling the state, non-NULL if we are enabling it. More...
 
void setEyePlaneS (const fvec4 &plane)
 
void setObjectPlaneS (const fvec4 &plane)
 
void setGenModeS (ETexGenMode mode)
 
const fvec4eyePlaneS () const
 
const fvec4objectPlaneS () const
 
ETexGenMode genModeS () const
 
void setEyePlaneT (const fvec4 &plane)
 
void setObjectPlaneT (const fvec4 &plane)
 
void setGenModeT (ETexGenMode mode)
 
const fvec4eyePlaneT () const
 
const fvec4objectPlaneT () const
 
ETexGenMode genModeT () const
 
void setEyePlaneR (const fvec4 &plane)
 
void setObjectPlaneR (const fvec4 &plane)
 
void setGenModeR (ETexGenMode mode)
 
const fvec4eyePlaneR () const
 
const fvec4objectPlaneR () const
 
ETexGenMode genModeR () const
 
void setEyePlaneQ (const fvec4 &plane)
 
void setObjectPlaneQ (const fvec4 &plane)
 
void setGenModeQ (ETexGenMode mode)
 
const fvec4eyePlaneQ () const
 
const fvec4objectPlaneQ () const
 
ETexGenMode genModeQ () const
 
virtual ref< RenderStateclone () const
 
- Public Member Functions inherited from vl::RenderStateIndexed
 RenderStateIndexed ()
 
- Public Member Functions inherited from vl::RenderState
 RenderState ()
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Public Attributes

fvec4 mEyePlaneS
 
fvec4 mObjectPlaneS
 
fvec4 mEyePlaneT
 
fvec4 mObjectPlaneT
 
fvec4 mEyePlaneR
 
fvec4 mObjectPlaneR
 
fvec4 mEyePlaneQ
 
fvec4 mObjectPlaneQ
 
ETexGenMode mGenModeS
 
ETexGenMode mGenModeT
 
ETexGenMode mGenModeR
 
ETexGenMode mGenModeQ
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Detailed Description

RenderState wrapping the OpenGL function glTexGen(), see also http://www.opengl.org/sdk/docs/man/xhtml/glTexGen.xml for more information.

Note
A TexParameter defines a set of variables associated to a Texture while TexGen and TexEnv define a set of variables associated to a TextureSampler.
See also
Shader, TextureSampler, Texture, TexGen, TexParameter, Effect, Actor

Definition at line 1682 of file Shader.hpp.

Constructor & Destructor Documentation

◆ TexGen()

TexGen::TexGen ( )

The eye and object planes are not transformed by any matrix (unlike usually with OpenGL), which means that the object plane is specified in object coordinates and that, the eye plane is specified in camera coordinates.

Definition at line 946 of file Shader.cpp.

References vl::TGM_DISABLED.

Member Function Documentation

◆ apply()

void TexGen::apply ( int  index,
const Camera camera,
OpenGLContext ctx 
) const
virtual

The parameter cameara is NULL if we are disabling the state, non-NULL if we are enabling it.

Implements vl::RenderState.

Definition at line 963 of file Shader.cpp.

References vl::Log::bug(), vl::TGM_DISABLED, vl::TGM_EYE_LINEAR, vl::TGM_NORMAL_MAP, vl::TGM_OBJECT_LINEAR, vl::TGM_REFLECTION_MAP, VL_CHECK, VL_CHECK_OGL, and VL_TRAP.

◆ clone()

virtual ref<RenderState> vl::TexGen::clone ( ) const
inlinevirtual

Implements vl::RenderState.

Definition at line 1720 of file Shader.hpp.

◆ eyePlaneQ()

const fvec4& vl::TexGen::eyePlaneQ ( ) const
inline

Definition at line 1716 of file Shader.hpp.

◆ eyePlaneR()

const fvec4& vl::TexGen::eyePlaneR ( ) const
inline

Definition at line 1709 of file Shader.hpp.

◆ eyePlaneS()

const fvec4& vl::TexGen::eyePlaneS ( ) const
inline

Definition at line 1695 of file Shader.hpp.

◆ eyePlaneT()

const fvec4& vl::TexGen::eyePlaneT ( ) const
inline

Definition at line 1702 of file Shader.hpp.

◆ genModeQ()

ETexGenMode vl::TexGen::genModeQ ( ) const
inline

Definition at line 1718 of file Shader.hpp.

◆ genModeR()

ETexGenMode vl::TexGen::genModeR ( ) const
inline

Definition at line 1711 of file Shader.hpp.

◆ genModeS()

ETexGenMode vl::TexGen::genModeS ( ) const
inline

Definition at line 1697 of file Shader.hpp.

◆ genModeT()

ETexGenMode vl::TexGen::genModeT ( ) const
inline

Definition at line 1704 of file Shader.hpp.

◆ objectPlaneQ()

const fvec4& vl::TexGen::objectPlaneQ ( ) const
inline

Definition at line 1717 of file Shader.hpp.

◆ objectPlaneR()

const fvec4& vl::TexGen::objectPlaneR ( ) const
inline

Definition at line 1710 of file Shader.hpp.

◆ objectPlaneS()

const fvec4& vl::TexGen::objectPlaneS ( ) const
inline

Definition at line 1696 of file Shader.hpp.

◆ objectPlaneT()

const fvec4& vl::TexGen::objectPlaneT ( ) const
inline

Definition at line 1703 of file Shader.hpp.

◆ setEyePlaneQ()

void vl::TexGen::setEyePlaneQ ( const fvec4 plane)
inline

Definition at line 1713 of file Shader.hpp.

◆ setEyePlaneR()

void vl::TexGen::setEyePlaneR ( const fvec4 plane)
inline

Definition at line 1706 of file Shader.hpp.

◆ setEyePlaneS()

void vl::TexGen::setEyePlaneS ( const fvec4 plane)
inline

Definition at line 1692 of file Shader.hpp.

◆ setEyePlaneT()

void vl::TexGen::setEyePlaneT ( const fvec4 plane)
inline

Definition at line 1699 of file Shader.hpp.

◆ setGenModeQ()

void vl::TexGen::setGenModeQ ( ETexGenMode  mode)
inline

Definition at line 1715 of file Shader.hpp.

◆ setGenModeR()

void vl::TexGen::setGenModeR ( ETexGenMode  mode)
inline

Definition at line 1708 of file Shader.hpp.

◆ setGenModeS()

void vl::TexGen::setGenModeS ( ETexGenMode  mode)
inline

Definition at line 1694 of file Shader.hpp.

◆ setGenModeT()

void vl::TexGen::setGenModeT ( ETexGenMode  mode)
inline

Definition at line 1701 of file Shader.hpp.

◆ setObjectPlaneQ()

void vl::TexGen::setObjectPlaneQ ( const fvec4 plane)
inline

Definition at line 1714 of file Shader.hpp.

◆ setObjectPlaneR()

void vl::TexGen::setObjectPlaneR ( const fvec4 plane)
inline

Definition at line 1707 of file Shader.hpp.

◆ setObjectPlaneS()

void vl::TexGen::setObjectPlaneS ( const fvec4 plane)
inline

Definition at line 1693 of file Shader.hpp.

◆ setObjectPlaneT()

void vl::TexGen::setObjectPlaneT ( const fvec4 plane)
inline

Definition at line 1700 of file Shader.hpp.

◆ type()

virtual ERenderState vl::TexGen::type ( ) const
inlinevirtual

Reimplemented from vl::RenderState.

Definition at line 1689 of file Shader.hpp.

References vl::RS_TexGen.

Member Data Documentation

◆ mEyePlaneQ

fvec4 vl::TexGen::mEyePlaneQ

Definition at line 1734 of file Shader.hpp.

◆ mEyePlaneR

fvec4 vl::TexGen::mEyePlaneR

Definition at line 1732 of file Shader.hpp.

◆ mEyePlaneS

fvec4 vl::TexGen::mEyePlaneS

Definition at line 1728 of file Shader.hpp.

◆ mEyePlaneT

fvec4 vl::TexGen::mEyePlaneT

Definition at line 1730 of file Shader.hpp.

◆ mGenModeQ

ETexGenMode vl::TexGen::mGenModeQ

Definition at line 1739 of file Shader.hpp.

◆ mGenModeR

ETexGenMode vl::TexGen::mGenModeR

Definition at line 1738 of file Shader.hpp.

◆ mGenModeS

ETexGenMode vl::TexGen::mGenModeS

Definition at line 1736 of file Shader.hpp.

◆ mGenModeT

ETexGenMode vl::TexGen::mGenModeT

Definition at line 1737 of file Shader.hpp.

◆ mObjectPlaneQ

fvec4 vl::TexGen::mObjectPlaneQ

Definition at line 1735 of file Shader.hpp.

◆ mObjectPlaneR

fvec4 vl::TexGen::mObjectPlaneR

Definition at line 1733 of file Shader.hpp.

◆ mObjectPlaneS

fvec4 vl::TexGen::mObjectPlaneS

Definition at line 1729 of file Shader.hpp.

◆ mObjectPlaneT

fvec4 vl::TexGen::mObjectPlaneT

Definition at line 1731 of file Shader.hpp.


The documentation for this class was generated from the following files: