#include <Images.h>
Inheritance diagram for TTexture:
Public Member Functions | |
const TString & | GetName (void) const |
Returns texture name - name of file from which texture was loaded. | |
TTexture * | CopyShallow (void) |
Creates shallow copy of this texture. | |
void | Release (void) |
Release texture. | |
TRendererTextureImage * | GetDeviceTexture (void) |
Return device texture stored inside this object. | |
TTextureManager * | GetTextureManager (void) |
Returns texture manager where texture was created. | |
Friends | |
class | TTextureManager |
class | TArrayPtrs< TTexture > |
Texture contains its TRendererTexture for using in renderer and also contains name of file from which it was loaded.
This class has no public constructor - may be created only from texture manaager. Also can be destroyed only via texture manager.
When TTexture is created TRendererTexture is stored inside. Number of references to this device texture is always 1 - only number of references to TTexture is changing in application.
You get TTexture from TTextureManager - it find or load texture from file, increase number of references and return pointer to texture. After this you may use this texture. When you finish work with texture you call Release method that decrease number of references and destroy texture.
USING: You get texture from TTextureManager::GetTexture After work is finished call TTexture::Release.
Definition at line 301 of file Images.h.
|
Creates shallow copy of this texture. This means number of references is increased and pointer to this object is returned. This has the same effect as call method TTextureManager::GetTexture with name of this texture. |
|
Return device texture stored inside this object. This method DO NOT increase number of references to device texture. You should use this method only when you can set texture to device - e.g. SetTexture(tex->GetDeviceTexture()). If you can use texture for long term then you must call AddRefs and manage texture resource properly. |
|
Returns texture name - name of file from which texture was loaded.
|
|
Returns texture manager where texture was created.
|
|
Release texture. After calling this method texture pointer is invalid!!! Definition at line 1707 of file Images.cpp. References DBGASSERT, and TTextureManager::DestroyTexture(). Here is the call graph for this function: ![]() |
|
|
|
|