Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes

vl::TextureUnit Class Reference

The TextureUnit class associates a Texture object to an OpenGL texture unit. More...

#include <Shader.hpp>

Inheritance diagram for vl::TextureUnit:
vl::TextureState vl::RenderState vl::Object

List of all members.

Public Member Functions

virtual const char * className () const
 Returns the name of the class.
 TextureUnit (int texunit)
virtual ERenderState type () const
virtual void apply (const Camera *, OpenGLContext *ctx) const
 The parameter cameara is NULL if we are disabling the state, non-NULL if we are enabling it.
void setTexture (Texture *texture)
Texturetexture ()
const Texturetexture () const
bool hasTexture () const

Protected Attributes

ref< TexturemTexture

Detailed Description

The TextureUnit class associates a Texture object to an OpenGL texture unit.

See also:
Texture, TexParameter, Shader, TextureMatrix, TexEnv, TexGen, Effect, Actor

Definition at line 1154 of file Shader.hpp.


Constructor & Destructor Documentation

vl::TextureUnit::TextureUnit ( int  texunit ) [inline]

Definition at line 1158 of file Shader.hpp.

References VL_DEBUG_SET_OBJECT_NAME.


Member Function Documentation

virtual const char* vl::TextureUnit::className (  ) const [inline, virtual]

Returns the name of the class.

Reimplemented from vl::TextureState.

Definition at line 1157 of file Shader.hpp.

virtual ERenderState vl::TextureUnit::type (  ) const [inline, virtual]

Reimplemented from vl::RenderState.

Definition at line 1164 of file Shader.hpp.

References vl::RS_TextureUnit0.

void TextureUnit::apply ( const Camera camera,
OpenGLContext ctx 
) const [virtual]
void vl::TextureUnit::setTexture ( Texture texture ) [inline]

Definition at line 1167 of file Shader.hpp.

Texture* vl::TextureUnit::texture (  ) [inline]

Definition at line 1168 of file Shader.hpp.

Referenced by apply(), and vl::Rendering::fillRenderQueue().

const Texture* vl::TextureUnit::texture (  ) const [inline]

Definition at line 1169 of file Shader.hpp.

bool TextureUnit::hasTexture (  ) const

Definition at line 1023 of file Shader.cpp.

References mTexture.

Referenced by apply().


Member Data Documentation

Definition at line 1174 of file Shader.hpp.

Referenced by hasTexture().


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

Visualization Library v2011.07.1151 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Tue Jul 12 2011 00:23:48.
Permission is granted to use this page to write and publish articles regarding Visualization Library.