#include <rTexture.h>


Public Member Functions | |
| rFileTexture (int group, char const *fileName, bool repx=0, bool repy=0, bool storeAlpha=false, tPath const *path=&tDirectories::Data()) | |
| constructor setting flags | |
| virtual | ~rFileTexture () |
| destructor | |
| tString const & | GetFileName (void) const |
| Gets the texture's filename. | |
| rFileTexture const & | GetFileName (tString &fileName) const |
| Gets the texture's filename. | |
Protected Member Functions | |
| virtual void | OnSelect () |
| Selects the texture for rendering (core part). | |
Private Member Functions | |
| rFileTexture & | SetFileName (tString const &fileName) |
| Sets the texture's filename. | |
Private Attributes | |
| tString | fileName_ |
| the texture's filename | |
| tPath const * | path_ |
Definition at line 161 of file rTexture.h.
| rFileTexture::rFileTexture | ( | int | group, | |
| char const * | fileName, | |||
| bool | repx = 0, |
|||
| bool | repy = 0, |
|||
| bool | storeAlpha = false, |
|||
| tPath const * | path = &tDirectories::Data() | |||
| ) |
constructor setting flags
| group | texture group ( floor/wall) | |
| fileName | the filename of the picture to load | |
| repx | flag indicating the x repeat mode | |
| repy | flag indicating the y repeat mode | |
| storeAlpha | flag indicating whether the alpha channel should be stored |
Definition at line 671 of file rTexture.cpp.
00672 : rISurfaceTexture( group, repx, repy, storeAlpha ) 00673 , fileName_( fileName ) 00674 , path_(path) 00675 { 00676 }
| rFileTexture::~rFileTexture | ( | void | ) | [virtual] |
| void rFileTexture::OnSelect | ( | ) | [protected, virtual] |
Selects the texture for rendering (core part).
Implements rISurfaceTexture.
Definition at line 700 of file rTexture.cpp.
References fileName_, rSurface::GetSurface(), rISurfaceTexture::OnSelect(), path_, rISurfaceTexture::s_reportErrors_, and rISurfaceTexture::Upload().
00701 { 00702 #ifndef DEDICATED 00703 // std::cerr << "loading texture " << fileName_ << "\n"; 00704 rSurface surface( fileName_, path_ ); 00705 if ( surface.GetSurface() ) 00706 { 00707 this->Upload( surface ); 00708 } 00709 else if (s_reportErrors_) 00710 { 00711 throw tGenericException( tOutput( "$texture_error_filenotfound", fileName_ ), tOutput("$texture_error_filenotfound_title") ); 00712 } 00713 rISurfaceTexture::OnSelect(); 00714 #endif 00715 }

| tString const & rFileTexture::GetFileName | ( | void | ) | const [inline] |
Gets the texture's filename.
Definition at line 387 of file rTexture.h.
References fileName_.
00388 { 00389 return this->fileName_; 00390 }
| rFileTexture const & rFileTexture::GetFileName | ( | tString & | fileName | ) | const [inline] |
Gets the texture's filename.
| fileName | the texture's filename to fill |
Definition at line 403 of file rTexture.h.
References fileName_.
00404 { 00405 fileName = this->fileName_; 00406 return *this; 00407 }
| rFileTexture & rFileTexture::SetFileName | ( | tString const & | fileName | ) | [inline, private] |
Sets the texture's filename.
| fileName | the texture's filename to set |
Definition at line 420 of file rTexture.h.
References fileName_.
00421 { 00422 this->fileName_ = fileName; 00423 return *this; 00424 }
tString rFileTexture::fileName_ [private] |
the texture's filename
Definition at line 171 of file rTexture.h.
Referenced by GetFileName(), OnSelect(), and SetFileName().
tPath const* rFileTexture::path_ [private] |
Reimplemented in rResourceTexture::InternalTex.
Definition at line 172 of file rTexture.h.
Referenced by OnSelect().
1.5.4