|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CTextureMem Class ReferenceCTextureMem.
More...
#include <texture_mem.h>
Inheritance diagram for NL3D::CTextureMem:
List of all members.
Public Methods |
| CTextureMem () |
| Default constructor. More...
|
virtual | ~CTextureMem () |
| Destructor. More...
|
| CTextureMem (uint8 *data, uint32 length, bool _delete, bool isFile=true, uint width=0, uint height=0, CBitmap::TType texType=CBitmap::RGBA) |
| constructor. More...
|
void | setPointer (uint8 *data, uint32 length, bool _delete, bool isFile=true, uint width=0, uint height=0, CBitmap::TType texType=CBitmap::RGBA) |
| Set the pointer of the mem file containing the texture. More...
|
uint8 * | getPointer () const |
| Get the Pointer of the memory file containing the texture. More...
|
uint32 | getLength () const |
| Get length of the memory file containing the texture. More...
|
bool | isDeletable () const |
| Return true if the class handle the delete of the pointer. More...
|
void | doGenerate () |
| Generate the texture. More...
|
virtual bool | supportSharing () const |
| inherited from ITexture. More...
|
virtual std::string | getShareName () const |
| inherited from ITexture. More...
|
void | setShareName (const std::string &shareName) |
| Make this texture sharable by assigning it a share name. An empty share name means it is not sharable, which is the default. More...
|
virtual bool | allowDegradation () const |
| texture file may allow the driver to degrade (default is true). More...
|
void | setAllowDegradation (bool allow) |
| ===========================================================================. More...
|
virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| Todo: serialize a mem texture. More...
|
| NLMISC_DECLARE_CLASS (CTextureMem) |
Static Public Methods |
ITexture * | Create1x1WhiteTex () |
| ===========================================================================. More...
|
Private Attributes |
uint8 * | _Data |
uint32 | _Length |
bool | _Delete |
bool | _IsFile |
bool | _AllowDegradation |
std::string | _ShareName |
NLMISC::CBitmap::TType | _TexType |
uint | _TexWidth |
| keep size for textures that aren't from a file. More...
|
uint | _TexHeight |
| keep size for textures that aren't from a file. More...
|
Detailed Description
CTextureMem.
Definition at line 42 of file texture_mem.h.
Constructor & Destructor Documentation
NL3D::CTextureMem::CTextureMem |
( |
|
) |
[inline] |
|
virtual NL3D::CTextureMem::~CTextureMem |
( |
|
) |
[inline, virtual] |
|
NL3D::CTextureMem::CTextureMem |
( |
uint8 * |
data, |
|
|
uint32 |
length, |
|
|
bool |
_delete, |
|
|
bool |
isFile = true, |
|
|
uint |
width = 0, |
|
|
uint |
height = 0, |
|
|
CBitmap::TType |
texType = CBitmap::RGBA |
|
) |
[inline] |
|
|
constructor.
-
Parameters:
-
data |
Pointer of the file. |
length |
length, in bytes, of the datas. |
_delete |
Is true if the class must delete the pointer. |
isFile |
is true if the data must be interpreted as a texture file. Otherwise, it is interpreted as the raw datas of the texture, so the format and size of the texture must also have been set to match the raw datas |
width |
used only if isFile is set to false |
height |
used only if isFile is set to false |
texType |
relevant only when isFile is set to false. Gives the format to expand the texture to when it is generated. |
Definition at line 89 of file texture_mem.h.
References _AllowDegradation, _Data, _Delete, data, height, setPointer, and width. |
Member Function Documentation
virtual bool NL3D::CTextureMem::allowDegradation |
( |
|
) |
const [inline, virtual] |
|
ITexture * NL3D::CTextureMem::Create1x1WhiteTex |
( |
|
) |
[static] |
|
|
===========================================================================.
Definition at line 72 of file texture_mem.cpp.
References CTextureMem. |
void NL3D::CTextureMem::doGenerate |
( |
|
) |
[virtual] |
|
|
Generate the texture.
Implements NL3D::ITexture.
Definition at line 45 of file texture_mem.cpp.
References _Data, _Length, _TexHeight, _TexType, _TexWidth, NLMISC::CBitmap::buildMipMaps, NLMISC::CMemStream::fill, NLMISC::CBitmap::getPixels, NLMISC::CBitmap::load, NLMISC::CBitmap::makeDummy, and NLMISC::CBitmap::resize. |
uint32 NL3D::CTextureMem::getLength |
( |
|
) |
const [inline] |
|
|
Get length of the memory file containing the texture.
Definition at line 133 of file texture_mem.h.
References _Length. |
uint8* NL3D::CTextureMem::getPointer |
( |
|
) |
const [inline] |
|
|
Get the Pointer of the memory file containing the texture.
Definition at line 127 of file texture_mem.h.
References _Data. |
virtual std::string NL3D::CTextureMem::getShareName |
( |
|
) |
const [inline, virtual] |
|
bool NL3D::CTextureMem::isDeletable |
( |
|
) |
const [inline] |
|
|
Return true if the class handle the delete of the pointer.
Definition at line 139 of file texture_mem.h.
References _Delete. |
NL3D::CTextureMem::NLMISC_DECLARE_CLASS |
( |
CTextureMem |
|
) |
|
|
void NL3D::CTextureMem::setAllowDegradation |
( |
bool |
allow |
) |
|
|
void NL3D::CTextureMem::setPointer |
( |
uint8 * |
data, |
|
|
uint32 |
length, |
|
|
bool |
_delete, |
|
|
bool |
isFile = true, |
|
|
uint |
width = 0, |
|
|
uint |
height = 0, |
|
|
CBitmap::TType |
texType = CBitmap::RGBA |
|
) |
[inline] |
|
|
Set the pointer of the mem file containing the texture.
-
Parameters:
-
data |
Pointer of the file. |
length |
length, in bytes, of the datas. |
isFile |
is true if the data must be interpreted as a texture file. Otherwise, it is interpreted as the raw datas of the texture, so the format and size of the texture must also have been set to match the raw datas |
_delete |
Is true if the class must delete the pointer. |
texType |
relevant only when isFile is set to false. Gives the format to expand the texture to when it is generated. |
Definition at line 108 of file texture_mem.h.
References _Data, _Delete, _IsFile, _Length, _TexHeight, _TexType, _TexWidth, NL3D::ITexture::_Touched, data, height, and width.
Referenced by CTextureMem. |
void NL3D::CTextureMem::setShareName |
( |
const std::string & |
shareName |
) |
[inline] |
|
|
Make this texture sharable by assigning it a share name. An empty share name means it is not sharable, which is the default.
Definition at line 161 of file texture_mem.h.
References _ShareName. |
virtual bool NL3D::CTextureMem::supportSharing |
( |
|
) |
const [inline, virtual] |
|
Member Data Documentation
bool NL3D::CTextureMem::_AllowDegradation [private]
|
|
uint8* NL3D::CTextureMem::_Data [private]
|
|
bool NL3D::CTextureMem::_Delete [private]
|
|
bool NL3D::CTextureMem::_IsFile [private]
|
|
uint32 NL3D::CTextureMem::_Length [private]
|
|
std::string NL3D::CTextureMem::_ShareName [private]
|
|
uint NL3D::CTextureMem::_TexHeight [private]
|
|
uint NL3D::CTextureMem::_TexWidth [private]
|
|
The documentation for this class was generated from the following files:
|
|