rITexture Class Reference

abstract OpenGL texture base class More...

#include <rTexture.h>

Inheritance diagram for rITexture:

Inheritance graph
[legend]
Collaboration diagram for rITexture:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~rITexture ()=0
 destructor
void Select (bool enforce=false)
 Selects the texture for rendering.
void Unload ()
 Unloads the texture from OpenGL and memory.

Static Public Member Functions

static void UnloadAll ()
 Unloads all textures from memory.
static void LoadAll ()
 Loads all active textures.

Protected Member Functions

 rITexture ()
 constructor
virtual void OnSelect (bool enforce)=0
 Selects the texture for rendering.
virtual void OnUnload ()=0
 Unloads the texture from OpenGL and memory.

Private Member Functions

 rITexture (rITexture const &)
rITextureoperator= (rITexture const &)

Private Attributes

int id_
 ID number of this texture.

Static Private Attributes

static tList< rITextures_textures_
 list of all textures


Detailed Description

abstract OpenGL texture base class

Definition at line 96 of file rTexture.h.


Constructor & Destructor Documentation

rITexture::~rITexture ( void   )  [pure virtual]

destructor

Definition at line 339 of file rTexture.cpp.

References id_, tList< T, MALLOC, REFERENCE >::Remove(), and s_textures_.

00340 {
00341     s_textures_.Remove(this,id_);
00342 }

Here is the call graph for this function:

rITexture::rITexture ( void   )  [protected]

constructor

Definition at line 391 of file rTexture.cpp.

00392         : id_( -1 )
00393 {
00394 }

rITexture::rITexture ( rITexture const &   )  [private]


Member Function Documentation

static rCallbackBeforeScreenModeChange unload & rITexture::UnloadAll ( void   )  [static]

Unloads all textures from memory.

Definition at line 353 of file rTexture.cpp.

References GrowingArrayBase::Len(), and s_textures_.

Referenced by cleanup(), main(), and uMenu::Message().

00354 {
00355     for(int i=s_textures_.Len()-1;i>=0;i--)
00356     {
00357         s_textures_(i)->Unload();
00358     }
00359 }

Here is the call graph for this function:

Here is the caller graph for this function:

void rITexture::LoadAll ( void   )  [static]

Loads all active textures.

Definition at line 370 of file rTexture.cpp.

References GrowingArrayBase::Len(), and s_textures_.

Referenced by init_game_objects(), and gGame::StateUpdate().

00371 {
00372     // s_reportErrors=false;
00373     for(int i=s_textures_.Len()-1;i>=0;i--)
00374     {
00375         s_textures_(i)->Select();
00376         //if (i>=s_textures.Len())
00377         //    i=s_textures.Len()-1;
00378     }
00379     // s_reportErrors=true;
00380 }

Here is the call graph for this function:

Here is the caller graph for this function:

void rITexture::Select ( bool  enforce = false  )  [inline]

Selects the texture for rendering.

Parameters:
enforce when set to true, the texture should be loaded even if the configuration says it should not

Definition at line 358 of file rTexture.h.

References OnSelect().

Referenced by dir_eWall_select(), gLogo::Display(), gFloor::glFloorTexture(), gFloor::glFloorTexture_a(), gFloor::glFloorTexture_b(), gTextureCycle::gTextureCycle(), gWallRim_helper(), gCycle::Render(), rFontContainer::Render(), rFont::Render(), rResourceTexture::Select(), sky_select(), and sr_MotionBlurCore().

00359 {
00360     this->OnSelect( enforce );
00361 }

Here is the call graph for this function:

Here is the caller graph for this function:

void rITexture::Unload (  )  [inline]

Unloads the texture from OpenGL and memory.

Definition at line 372 of file rTexture.h.

References OnUnload().

Referenced by rISurfaceTexture::OnSelect(), and rResourceTexture::InternalTex::Release().

00373 {
00374     this->OnUnload();
00375 }

Here is the call graph for this function:

Here is the caller graph for this function:

void rITexture::OnSelect ( bool  enforce  )  [protected, pure virtual]

Selects the texture for rendering.

Parameters:
enforce enforce when set to true, the texture should be loaded even if the configuration says it should not

Implemented in rFont, rISurfaceTexture, rTextureRenderTarget, and gTextureCycle.

Definition at line 406 of file rTexture.cpp.

References tList< T, MALLOC, REFERENCE >::Add(), id_, and s_textures_.

Referenced by rISurfaceTexture::OnSelect(), and Select().

00407 {
00408     if ( id_ < 0 )
00409         s_textures_.Add(this,id_);
00410 }

Here is the call graph for this function:

Here is the caller graph for this function:

void rITexture::OnUnload ( void   )  [protected, pure virtual]

Unloads the texture from OpenGL and memory.

Implemented in rISurfaceTexture, and rTextureRenderTarget.

Definition at line 421 of file rTexture.cpp.

Referenced by rISurfaceTexture::OnUnload(), and Unload().

00422 {
00423 }

Here is the caller graph for this function:

rITexture& rITexture::operator= ( rITexture const &   )  [private]


Member Data Documentation

tList< rITexture > rITexture::s_textures_ [static, private]

list of all textures

Definition at line 113 of file rTexture.h.

Referenced by LoadAll(), OnSelect(), UnloadAll(), and ~rITexture().

int rITexture::id_ [private]

ID number of this texture.

Definition at line 114 of file rTexture.h.

Referenced by OnSelect(), and ~rITexture().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:52:54 2008 for Armagetron Advanced by  doxygen 1.5.4