Interface for textures. More...
#include <texture.h>
Inherits NLMISC::CBitmap, NLMISC::CRefCount, and NLMISC::IStreamable.
Inherited by NL3D::CTextureBlank, NL3D::CTextureBlend, NL3D::CTextureBump, NL3D::CTextureCross, NL3D::CTextureCube, NL3D::CTextureDLM, NL3D::CTextureEmboss, NL3D::CTextureFar, NL3D::CTextureFile, NL3D::CTextureFont, NL3D::CTextureGrouped, NL3D::CTextureMem, NL3D::CTextureMultiFile, and NL3D::CTextureNear.
Classes | |
| class | CTextureCategory |
| Category String. More... | |
Public Types | |
| enum | TWrapMode { Repeat = 0, Clamp, WrapModeCount } |
| enum | TUploadFormat { Auto = 0, RGBA8888, RGBA4444, RGBA5551, RGB888, RGB565, DXTC1, DXTC1Alpha, DXTC3, DXTC5, Luminance, Alpha, AlphaLuminance, DsDt, UploadFormatCount } |
| enum | TMagFilter { Nearest = 0, Linear, MagFilterCount } |
Magnification mode. More... | |
| enum | TMinFilter { NearestMipMapOff = 0, NearestMipMapNearest, NearestMipMapLinear, LinearMipMapOff, LinearMipMapNearest, LinearMipMapLinear, MinFilterCount } |
Minifying mode. More... | |
Public Member Functions | |
| void | touch () |
| This method invalidates all the texture surface. | |
| void | touchRect (const NLMISC::CRect &rect) |
| This method invalidates a rectangle of the texture surface. | |
| bool | getReleasable () const |
| Return whether texture can be released. | |
| void | setReleasable (bool r) |
| Set if texture can be released If it is true, the driver will release the texture after generating it and upload it into the videomemory by calling release(). | |
| void | generate (bool async=false) |
| Generate the texture pixels. | |
| void | validateGenerateFlag () |
| Advanced. | |
| virtual void | release () |
| Release the texure (free memory). | |
| virtual bool | supportSharing () const |
| Does this texture support sharing system. | |
| virtual std::string | getShareName () const |
| Return the Unique ident/name of the texture, used for Driver sharing caps. | |
| bool | setupedIntoDriver () const |
| Tells if the texture has been setuped by the driver. | |
| void | releaseDriverSetup () |
| Release the Driver info for this texture (if any). Call it with care. | |
| virtual bool | allowDegradation () const |
| Does this texture allow the driver to degrade. | |
| virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| serial ITexture basic infos (clamp ...). | |
| virtual void | selectTexture (uint) |
| Select a texture among several other (if this texture is a set of texture such as CTextureMultiFile) The default does nothing. | |
| virtual bool | isSelectable () const |
| Test whether this texture is selectable. | |
| virtual ITexture * | buildNonSelectableVersion (uint) |
| If this texture is selectable, build a non selectable version of this texture that is setupped with the given slot. | |
| virtual bool | isBumpMap () const |
| virtual bool | isBloomTexture () const |
| void | setTextureCategory (NLMISC::CSmartPtr< CTextureCategory > &textCat) |
| void | setRenderTarget (bool enable) |
| Render target texture Active / disable render target abilities for this texture. | |
| bool | getRenderTarget () const |
| Render target texture Get render target abilities for this texture. | |
| CTextureCategory * | getTextureCategory () const |
| bool | isAllInvalidated () const |
| Return true if ALL the texture is invalidate, else return false. | |
| bool | touched (void) |
| This method return the touched flag. | |
| bool | filterOrWrapModeTouched () const |
| See if filter mode or wrap mode have been touched. | |
| void | clearTouched (void) |
| void | clearFilterOrWrapModeTouched () |
| ITexture () | |
| Object. | |
| ITexture (const ITexture &tex) | |
| see operator=. | |
| virtual | ~ITexture () |
| Need a virtual dtor. | |
| ITexture & | operator= (const ITexture &tex) |
| The operator= do not copy drv info, and set touched=true. _Releasable, WrapMode and UploadFormat are copied. | |
| virtual bool | isTextureCube () const |
| Cubic textures. | |
Texture parameters. | |
| void | setWrapS (TWrapMode mode) |
By default, parameters are:
| |
| void | setWrapT (TWrapMode mode) |
| TWrapMode | getWrapS () const |
| TWrapMode | getWrapT () const |
| void | setUploadFormat (TUploadFormat pf) |
| Replace the uploaded format of the texture. | |
| TUploadFormat | getUploadFormat () const |
| virtual void | setFilterMode (TMagFilter magf, TMinFilter minf) |
| TMagFilter | getMagFilter () const |
| TMinFilter | getMinFilter () const |
| bool | mipMapOff () const |
| bool | mipMapOn () const |
Public Attributes | |
| NLMISC::CRefPtr< CTextureDrvShare > | TextureDrvShare |
| std::list< NLMISC::CRect > | _ListInvalidRect |
| List of invalided rectangle. | |
Protected Member Functions | |
| virtual void | doGenerate (bool async=false)=0 |
| Generate the texture pixels. | |
Protected Attributes | |
| bool | _Touched: 1 |
| bool | _FilterOrWrapModeTouched: 1 |
Private Attributes | |
| bool | _GoodGenerate |
| bool | _Releasable |
| bool | _RenderTarget |
| TUploadFormat | _UploadFormat |
| TWrapMode | _WrapS |
| TWrapMode | _WrapT |
| TMinFilter | _MinFilter |
| TMagFilter | _MagFilter |
| NLMISC::CSmartPtr < CTextureCategory > | _TextureCategory |
Interface for textures.
Sharing System note: The deriver may implement sharing system by implement supportSharing() and getShareName(). Such a texture may return a Unique Name for sharing. If the driver already has this texture, it will reuse it. As a direct impact, you cannot invalidate part of the textures with shared texture. This is logic, since the Unique sharname of the texture must represent all of it.
Definition at line 113 of file texture.h.
| NL3D::ITexture::ITexture | ( | ) |
Object.
By default, a texture is releasable.
Definition at line 41 of file texture.cpp.
References _FilterOrWrapModeTouched, _GoodGenerate, _MagFilter, _MinFilter, _Releasable, _RenderTarget, _Touched, _UploadFormat, _WrapS, _WrapT, Auto, Linear, LinearMipMapLinear, and Repeat.
| NL3D::ITexture::ITexture | ( | const ITexture & | tex | ) | [inline] |
| NL3D::ITexture::~ITexture | ( | ) | [virtual] |
| virtual bool NL3D::ITexture::allowDegradation | ( | ) | const [inline, virtual] |
Does this texture allow the driver to degrade.
Reimplemented in NL3D::CTextureFile, and NL3D::CTextureMem.
Definition at line 366 of file texture.h.
Referenced by NL3D::CDriverD3D::generateD3DTexture(), NL3D::CDriverD3D::getD3DDestTextureFormat(), NL3D::CDriverGL::getGlTextureFormat(), NL3D::CDriverGL::setupTextureEx(), and NL3D::CDriverGL::uploadTexture().
If this texture is selectable, build a non selectable version of this texture that is setupped with the given slot.
NB : If this texture is selectable, you are ensured that the return pointer is not 'this'
Reimplemented in NL3D::CTextureCube, and NL3D::CTextureMultiFile.
Definition at line 382 of file texture.h.
Referenced by NL3D::CMeshBaseInstance::selectTextureSet().
| void NL3D::ITexture::clearFilterOrWrapModeTouched | ( | ) | [inline] |
Definition at line 495 of file texture.h.
References _FilterOrWrapModeTouched.
Referenced by NL3D::CDriverGL::setupTextureBasicParameters().
| void NL3D::ITexture::clearTouched | ( | void | ) | [inline] |
Definition at line 489 of file texture.h.
References _ListInvalidRect, and _Touched.
Referenced by NL3D::CDriverGL::setupTextureEx(), and NL3D::CDriverD3D::setupTextureEx().
| virtual void NL3D::ITexture::doGenerate | ( | bool | async = false |
) | [protected, pure virtual] |
Generate the texture pixels.
If the invalidate rect list is empty, generate() must rebuild all the texture. If the invalidate rect list is not empty, generate() rebuilds only the invalidate rectangles in the list.
Implemented in NL3D::CTextureBlank, NL3D::CTextureBlend, NL3D::CTextureBump, NL3D::CTextureCube, NL3D::CTextureDLM, NL3D::CTextureEmboss, NL3D::CTextureFar, NL3D::CTextureFile, NL3D::CTextureFont, NL3D::CTextureGrouped, NL3D::CTextureMem, NL3D::CTextureMultiFile, NL3D::CTextureNear, and NL3D::CTextureCross.
Referenced by generate().
| bool NL3D::ITexture::filterOrWrapModeTouched | ( | ) | const [inline] |
See if filter mode or wrap mode have been touched.
If this is the case, the driver should resetup them for that texture (If driver stores filter & wrap mode per texture (OpenGL) rather than globally (D3D))
Definition at line 482 of file texture.h.
References _FilterOrWrapModeTouched.
Referenced by NL3D::CDriverGL::setupTextureEx().
| void NL3D::ITexture::generate | ( | bool | async = false |
) | [inline] |
Generate the texture pixels.
This method is called by the driver when it needs to generate pixels of the texture. If the texture is used for the first time or if it is touched, the driver will call this method. For exemple, a texture file will load the bitmap in this method.
If the invalidate rect list is empty, generate() rebuild all the texture. If the invalidate rect list is not empty, generate() rebuilds only the invalidate rectangles in the list.
Don't clear the touch flag or the invalid rectangle list until updating the texture in generate(). It's the generate()'s caller jobs.
After generation, if the texture is releasable, the driver will release the texture by calling release().
NB: a flag is maintained to see if the generated bitmap is coherent with texture description (see touch*()). So if you do {generate(); generate();}, you only get 1 real bitmap generation...
If, after the doGenerate, the bitmap format is compressed (DXTC) and no mipmaps have been generated, the mipmap are disabled beacause the user probably don't want the driver to unpacks the texture, generates the mipmaps and repacks the dxtc texture (that takes a lot of CPU time).
| async | tells the texture if the call is made asynchronously or not. |
Definition at line 323 of file texture.h.
References _GoodGenerate, and doGenerate().
Referenced by NL3D::CShadowMapManager::allocateTexture(), NL3D::CCoarseMeshBuild::buildBitmap(), NL3D::CTextureCube::doGenerate(), NL3D::CDriverD3D::generateD3DTexture(), NL3D::CZoneLighter::getTexture(), NL3D::GetTextureSize(), NL3D::CTileBank::getTileNoiseMap(), NL3D::CZoneLighter::lightWater(), CEGUI::NeLTexture::loadFromMemory(), NL3D::CAsyncFileManager3D::CTextureLoad::run(), NL3D::CAsyncFileManager3D::CMeshLoad::run(), NL3D::CPSMultiTexturedParticle::setupMaterial(), and NL3D::CDriverGL::setupTextureEx().
| TMagFilter NL3D::ITexture::getMagFilter | ( | ) | const [inline] |
Definition at line 225 of file texture.h.
References _MagFilter.
Referenced by NL3D::CDriverGL::activateTexture(), NL3D::CDriverGL::setupTextureBasicParameters(), and NL3D::CDriverD3D::setupTextureWrapMode().
| TMinFilter NL3D::ITexture::getMinFilter | ( | ) | const [inline] |
Definition at line 226 of file texture.h.
References _MinFilter.
Referenced by NL3D::CDriverGL::activateTexture(), NL3D::CDriverGL::setupTextureBasicParameters(), and NL3D::CDriverD3D::setupTextureWrapMode().
| bool NL3D::ITexture::getReleasable | ( | ) | const [inline] |
Return whether texture can be released.
If it returns true, the driver will release the texture after generate it and upload it into the videomemory by calling release(). If it returns false, the driver won't release the texture.
Definition at line 281 of file texture.h.
References _Releasable.
Referenced by NL3D::CTextureGrouped::areValid(), NL3D::CTextureGrouped::doGenerate(), NL3D::CTextureBump::getNormalizationFactor(), NL3D::GetTextureSize(), NL3D::CShapeBank::processWaitingShapes(), NL3D::CShapeBank::processWSUploadTexture(), NL3D::CTextureGrouped::release(), NL3D::CTextureBlend::release(), NL3D::CDriverGL::setupTextureEx(), NL3D::CDriverD3D::setupTextureEx(), and NL3D::CAsyncTextureManager::uploadTexturePart().
| bool NL3D::ITexture::getRenderTarget | ( | ) | const [inline] |
Render target texture Get render target abilities for this texture.
Definition at line 410 of file texture.h.
References _RenderTarget.
Referenced by NL3D::CDriverD3D::generateD3DTexture(), NL3D::CDriverGL::setRenderTarget(), NL3D::CDriverD3D::setRenderTarget(), and NL3D::CDriverD3D::setupTextureEx().
| virtual std::string NL3D::ITexture::getShareName | ( | ) | const [inline, virtual] |
Return the Unique ident/name of the texture, used for Driver sharing caps.
Deriver should add a prefix for their texture type. eg "file::pipoland", "noise::4-4-2" etc....
Reimplemented in NL3D::CTextureBlend, NL3D::CTextureBump, NL3D::CTextureCube, NL3D::CTextureEmboss, NL3D::CTextureFile, NL3D::CTextureGrouped, NL3D::CTextureMem, and NL3D::CTextureMultiFile.
Definition at line 352 of file texture.h.
Referenced by NL3D::CCoarseMeshBuild::buildBitmap(), NL3D::CTextureCube::doGenerate(), NL3D::CZoneLighter::getTexture(), NL3D::IDriver::getTextureShareName(), NL3D::IDriver::profileTextureUsage(), NL3D::CCoarseMeshBuild::remapCoordinates(), and NL3D::CAsyncFileManager3D::CMeshLoad::run().
| CTextureCategory* NL3D::ITexture::getTextureCategory | ( | ) | const [inline] |
Definition at line 413 of file texture.h.
References _TextureCategory.
Referenced by NL3D::IDriver::profileTextureUsage().
| TUploadFormat NL3D::ITexture::getUploadFormat | ( | ) | const [inline] |
Definition at line 223 of file texture.h.
References _UploadFormat.
Referenced by NL3D::CTextureCube::doGenerate(), NL3D::CTextureBump::doGenerate(), NL3D::CDriverD3D::getD3DDestTextureFormat(), NL3D::CDriverGL::getGlTextureFormat(), NL3D::IDriver::getTextureShareName(), and NL3D::IDriver::profileTextureUsage().
| TWrapMode NL3D::ITexture::getWrapS | ( | ) | const [inline] |
Definition at line 215 of file texture.h.
References _WrapS.
Referenced by NL3D::CDriverGL::activateTexture(), NL3D::CZoneLighter::getTexture(), NL3D::UInstanceMaterial::getWrapS(), NL3D::CDriverGL::setupTextureBasicParameters(), and NL3D::CDriverD3D::setupTextureWrapMode().
| TWrapMode NL3D::ITexture::getWrapT | ( | ) | const [inline] |
Definition at line 216 of file texture.h.
References _WrapT.
Referenced by NL3D::CDriverGL::activateTexture(), NL3D::CZoneLighter::getTexture(), NL3D::UInstanceMaterial::getWrapT(), NL3D::CDriverGL::setupTextureBasicParameters(), and NL3D::CDriverD3D::setupTextureWrapMode().
| bool NL3D::ITexture::isAllInvalidated | ( | ) | const [inline] |
Return true if ALL the texture is invalidate, else return false.
Definition at line 463 of file texture.h.
References _ListInvalidRect, and _Touched.
Referenced by NL3D::CDriverGL::setupTextureEx(), NL3D::CDriverD3D::setupTextureEx(), and touchRect().
| virtual bool NL3D::ITexture::isBloomTexture | ( | ) | const [inline, virtual] |
Reimplemented in NL3D::CTextureBloom.
Definition at line 397 of file texture.h.
Referenced by NL3D::CTextureDrvInfosGL::initFrameBufferObject(), NL3D::CDriverGL::isTextureRectangle(), and NL3D::CDriverGL::setRenderTarget().
| virtual bool NL3D::ITexture::isBumpMap | ( | ) | const [inline, virtual] |
Reimplemented in NL3D::CTextureBump.
Definition at line 394 of file texture.h.
Referenced by NL3D::CDriverD3D::setupMaterial(), NL3D::CDriverGL::setupWaterPassARB(), NL3D::CDriverGL::setupWaterPassNV20(), and NL3D::CDriverGL::setupWaterPassR200().
| virtual bool NL3D::ITexture::isSelectable | ( | ) | const [inline, virtual] |
Test whether this texture is selectable.
Reimplemented in NL3D::CTextureCube, and NL3D::CTextureMultiFile.
Definition at line 377 of file texture.h.
Referenced by NL3D::CMeshBaseInstance::selectTextureSet().
| virtual bool NL3D::ITexture::isTextureCube | ( | ) | const [inline, virtual] |
Cubic textures.
Does this texture is a cube texture
Reimplemented in NL3D::CTextureCube.
Definition at line 390 of file texture.h.
Referenced by NL3D::CDriverGL::activateTexture(), NL3D::CDriverGL::bindTextureWithMode(), NL3D::CDriverGL::copyFrameBufferToTexture(), NL3D::CDriverD3D::generateD3DTexture(), NL3D::CShapeBank::processWSUploadTexture(), NL3D::CDriverGL::setTextureEnvFunction(), NL3D::CDriverD3D::setupMaterial(), NL3D::CDriverGL::setupTextureBasicParameters(), NL3D::CDriverGL::setupTextureEx(), NL3D::CDriverD3D::setupTextureEx(), touchRect(), NL3D::CDriverGL::uploadTexture(), NL3D::CDriverD3D::uploadTexture(), and NL3D::CDriverGL::uploadTextureCube().
| bool NL3D::ITexture::mipMapOff | ( | ) | const [inline] |
Definition at line 227 of file texture.h.
References _MinFilter, LinearMipMapOff, and NearestMipMapOff.
Referenced by NL3D::CDriverGL::isTextureRectangle(), mipMapOn(), and setFilterMode().
| bool NL3D::ITexture::mipMapOn | ( | ) | const [inline] |
Definition at line 228 of file texture.h.
References mipMapOff().
Referenced by NL3D::CDriverD3D::generateD3DTexture(), NL3D::IDriver::getTextureShareName(), NL3D::CShapeBank::processWSUploadTexture(), NL3D::CDriverGL::setupTextureEx(), and NL3D::CDriverGL::uploadTexture().
The operator= do not copy drv info, and set touched=true. _Releasable, WrapMode and UploadFormat are copied.
Reimplemented from NLMISC::CBitmap.
Reimplemented in NL3D::CTextureFile, and NL3D::CTextureGrouped.
Definition at line 72 of file texture.cpp.
References _FilterOrWrapModeTouched, _MagFilter, _MinFilter, _Releasable, _RenderTarget, _UploadFormat, _WrapS, _WrapT, and touch().
Referenced by ITexture().
| virtual void NL3D::ITexture::release | ( | void | ) | [inline, virtual] |
Release the texure (free memory).
Reimplemented in NL3D::CTextureBlend, NL3D::CTextureBump, NL3D::CTextureCube, NL3D::CTextureEmboss, and NL3D::CTextureGrouped.
Definition at line 341 of file texture.h.
References _GoodGenerate, and NLMISC::CBitmap::reset().
Referenced by NL3D::CZoneLighter::getTexture(), NL3D::GetTextureSize(), NL3D::CShapeBank::processWaitingShapes(), NL3D::CShapeBank::processWSUploadTexture(), NL3D::CDriverGL::setupTextureEx(), NL3D::CDriverD3D::setupTextureEx(), and NL3D::CAsyncTextureManager::update().
| void NL3D::ITexture::releaseDriverSetup | ( | ) |
Release the Driver info for this texture (if any). Call it with care.
Definition at line 64 of file texture.cpp.
References NLMISC::CRefPtr< T >::kill(), and TextureDrvShare.
Referenced by NL3D::CMeshBaseInstance::isAsyncTextureReady(), and ~ITexture().
| virtual void NL3D::ITexture::selectTexture | ( | uint | ) | [inline, virtual] |
Select a texture among several other (if this texture is a set of texture such as CTextureMultiFile) The default does nothing.
Reimplemented in NL3D::CTextureCube, and NL3D::CTextureMultiFile.
Definition at line 374 of file texture.h.
Referenced by NL3D::CCoarseMeshBuild::buildBitmap(), NL3D::CCoarseMeshBuild::remapCoordinates(), and NL3D::CAsyncFileManager3D::CMeshLoad::run().
| void NL3D::ITexture::serial | ( | NLMISC::IStream & | f | ) | throw (NLMISC::EStream) [virtual] |
serial ITexture basic infos (clamp ...).
Implements NLMISC::IStreamable.
Reimplemented in NL3D::CTextureBlend, NL3D::CTextureBump, NL3D::CTextureCube, NL3D::CTextureDLM, NL3D::CTextureEmboss, NL3D::CTextureFar, NL3D::CTextureFile, NL3D::CTextureFont, NL3D::CTextureGrouped, NL3D::CTextureMem, NL3D::CTextureMultiFile, NL3D::CTextureNear, and NL3D::CTextureCross.
Definition at line 143 of file texture.cpp.
Referenced by NL3D::CWaterShape::serial(), NL3D::CTextureMultiFile::serial(), NL3D::CTextureFile::serial(), NL3D::CTextureEmboss::serial(), NL3D::CTextureCube::serial(), NL3D::CTextureBump::serial(), NL3D::CTextureBlend::serial(), NL3D::CPSRibbon::serial(), NL3D::CFlareShape::serial(), and NL3D::CPSMultiTexturedParticle::serialMultiTex().
| void NL3D::ITexture::setFilterMode | ( | TMagFilter | magf, | |
| TMinFilter | minf | |||
| ) | [virtual] |
Reimplemented in NL3D::CTextureBump.
Definition at line 102 of file texture.cpp.
References _FilterOrWrapModeTouched, _MagFilter, _MinFilter, mipMapOff(), and touch().
Referenced by NL3D::CShadowMapManager::allocateTexture(), NL3D::CTextureDLM::CTextureDLM(), NL3D::CTextureFar::CTextureFar(), NL3D::CTextureFont::CTextureFont(), NL3D::CTextureGrouped::CTextureGrouped(), NL3D::CTextureNear::CTextureNear(), CEGUI::NeLTexture::loadFromMemory(), and NL3D::CVegetableManager::loadTexture().
| void NL3D::ITexture::setReleasable | ( | bool | r | ) | [inline] |
Set if texture can be released If it is true, the driver will release the texture after generating it and upload it into the videomemory by calling release().
If it is false, the driver won't release the texture.
| true | if texture can be released, false else |
Definition at line 292 of file texture.h.
References _Releasable.
Referenced by NL3D::CShadowMapManager::allocateTexture(), NL3D::CTextureDLM::CTextureDLM(), NL3D::CTextureFar::CTextureFar(), NL3D::CTextureFont::CTextureFont(), NL3D::CTextureNear::CTextureNear(), CEGUI::NeLTexture::loadFromMemory(), NL3D::CShapeBank::processWSUploadTexture(), NL3D::CWaterPoolManager::releaseBlendTextures(), NL3D::CWaterPoolManager::setBlendFactor(), and NL3D::CAsyncTextureManager::uploadTexturePart().
| void NL3D::ITexture::setRenderTarget | ( | bool | enable | ) |
Render target texture Active / disable render target abilities for this texture.
Definition at line 165 of file texture.cpp.
References _RenderTarget, and touch().
Referenced by NL3D::CShadowMapManager::allocateTexture(), and NL3D::CDriverD3D::getSurfaceTexture().
| void NL3D::ITexture::setTextureCategory | ( | NLMISC::CSmartPtr< CTextureCategory > & | textCat | ) | [inline] |
Definition at line 400 of file texture.h.
References _TextureCategory.
Referenced by NL3D::CShadowMapManager::allocateTexture(), NL3D::CLandscape::findTileTexture(), NL3D::CLandscape::getFarRenderPass(), and NL3D::CLandscape::getTileLightMap().
| bool NL3D::ITexture::setupedIntoDriver | ( | ) | const [inline] |
Tells if the texture has been setuped by the driver.
Definition at line 357 of file texture.h.
References TextureDrvShare.
| void NL3D::ITexture::setUploadFormat | ( | TUploadFormat | pf | ) |
Replace the uploaded format of the texture.
If "Auto", the driver use CBitmap::getPixelFormat() to find the best associated pixelFormat. When no alpha is wanted (RGB, Luminance....), texture default output is 1.0. For "Alpha" mode, RGB output is (0,0,0).
Definition at line 90 of file texture.cpp.
References _UploadFormat, and touch().
Referenced by NL3D::CTextureDLM::CTextureDLM(), NL3D::CTextureFar::CTextureFar(), NL3D::CTextureFont::CTextureFont(), NL3D::CTextureNear::CTextureNear(), NL3D::CLandscape::findTileTexture(), NL3D::CDriverGL::getSpecularCubeMap(), NL3D::CDriverD3D::setupMaterial(), and NL3D::CDriverGL::setupWaterPassARB().
| void NL3D::ITexture::setWrapS | ( | TWrapMode | mode | ) | [inline] |
By default, parameters are:
NB: if multiple ITexture acces the same data via the sharing system (such as a CTextureFile), then:
Definition at line 503 of file texture.h.
References _FilterOrWrapModeTouched, and _WrapS.
Referenced by NL3D::CShadowMapManager::allocateTexture(), NL3D::CTextureDLM::CTextureDLM(), NL3D::CTextureFar::CTextureFar(), NL3D::CTextureFont::CTextureFont(), NL3D::CLandscape::findTileTexture(), CEGUI::NeLTexture::loadFromMemory(), NL3D::CVegetableManager::loadTexture(), NL3D::CPSRibbonLookAt::serial(), NL3D::CSegRemanenceShape::setupMaterial(), NL3D::UInstanceMaterial::setWrapS(), and NL3D::CPSQuad::updateTexWrapMode().
| void NL3D::ITexture::setWrapT | ( | TWrapMode | mode | ) | [inline] |
Definition at line 510 of file texture.h.
References _FilterOrWrapModeTouched, and _WrapT.
Referenced by NL3D::CShadowMapManager::allocateTexture(), NL3D::CTextureDLM::CTextureDLM(), NL3D::CTextureFar::CTextureFar(), NL3D::CTextureFont::CTextureFont(), NL3D::CLandscape::findTileTexture(), CEGUI::NeLTexture::loadFromMemory(), NL3D::CVegetableManager::loadTexture(), NL3D::CSegRemanenceShape::setupMaterial(), NL3D::UInstanceMaterial::setWrapT(), and NL3D::CPSQuad::updateTexWrapMode().
| virtual bool NL3D::ITexture::supportSharing | ( | ) | const [inline, virtual] |
Does this texture support sharing system.
Reimplemented in NL3D::CTextureBlend, NL3D::CTextureBump, NL3D::CTextureCube, NL3D::CTextureEmboss, NL3D::CTextureFile, NL3D::CTextureGrouped, NL3D::CTextureMem, and NL3D::CTextureMultiFile.
Definition at line 346 of file texture.h.
Referenced by NL3D::CCoarseMeshBuild::buildBitmap(), NL3D::CZoneLighter::getTexture(), NL3D::IDriver::profileTextureUsage(), NL3D::CCoarseMeshBuild::remapCoordinates(), NL3D::CAsyncFileManager3D::CMeshLoad::run(), NL3D::CDriverGL::setupTextureEx(), NL3D::CDriverD3D::setupTextureEx(), and touchRect().
| void NL3D::ITexture::touch | ( | ) | [inline] |
This method invalidates all the texture surface.
When the driver calls generate, the texture will rebuild all the texture and the driver will update it.
Definition at line 238 of file texture.h.
References _GoodGenerate, _ListInvalidRect, and _Touched.
Referenced by NL3D::CTextureFile::CTextureFile(), operator=(), NL3D::CTextureMultiFile::selectTexture(), NL3D::CTextureCube::selectTexture(), NL3D::CTextureEmboss::setAmbient(), NL3D::CTextureBlend::setBlendFactor(), NL3D::CTextureBlend::setBlendTexture(), NL3D::CTextureEmboss::setDiffuse(), NL3D::CTextureMultiFile::setFileName(), NL3D::CTextureFile::setFileName(), setFilterMode(), NL3D::CTextureEmboss::setHeightMap(), NL3D::CTextureBump::setHeightMap(), NL3D::CTextureEmboss::setLightDir(), setRenderTarget(), NL3D::CDriverD3D::setRenderTarget(), NL3D::CTextureEmboss::setSlopeFactor(), NL3D::CTextureGrouped::setTextures(), and setUploadFormat().
| bool NL3D::ITexture::touched | ( | void | ) | [inline] |
This method return the touched flag.
If it is true, the driver will call generate to rebuild the texture.
Definition at line 473 of file texture.h.
References _Touched.
Referenced by NL3D::CDriverGL::setupTextureEx(), and NL3D::CDriverD3D::setupTextureEx().
| void NL3D::ITexture::touchRect | ( | const NLMISC::CRect & | rect | ) | [inline] |
This method invalidates a rectangle of the texture surface.
When the driver calls generate, the texture could rebuild only this part of texture and the driver will update only those rectangles.
This method is incompatible with textures which support sharing (see class description). This method is incompatible with compressed textures. This method is incompatible with cube textures.
Definition at line 255 of file texture.h.
References _GoodGenerate, _ListInvalidRect, _Touched, isAllInvalidated(), isTextureCube(), nlassert, and supportSharing().
Referenced by NL3D::CTextureFar::allocatePatch(), NL3D::CTextureDLM::copyRect(), NL3D::CTextureDLM::fillRect(), NL3D::CTextureFont::getLetterInfo(), NL3D::CTextureDLM::modulateAndfillRect565(), NL3D::CTextureDLM::modulateAndfillRect8888(), NL3D::CTextureDLM::modulateConstantAndfillRect(), NL3D::CTextureNear::refillRect(), and NL3D::CTextureFar::touchPatchULAndNext().
| void NL3D::ITexture::validateGenerateFlag | ( | ) | [inline] |
Advanced.
erase the _GoodGenerate=true. Special if you want to setup directly the bitmap without using generate(). USE IT WITH CARE!! (used by the CAsyncTextureManager)
Definition at line 336 of file texture.h.
References _GoodGenerate.
bool NL3D::ITexture::_FilterOrWrapModeTouched [protected] |
Definition at line 420 of file texture.h.
Referenced by clearFilterOrWrapModeTouched(), filterOrWrapModeTouched(), ITexture(), operator=(), setFilterMode(), setWrapS(), and setWrapT().
bool NL3D::ITexture::_GoodGenerate [private] |
Definition at line 437 of file texture.h.
Referenced by generate(), ITexture(), release(), touch(), touchRect(), and validateGenerateFlag().
| std::list<NLMISC::CRect> NL3D::ITexture::_ListInvalidRect |
List of invalided rectangle.
If the list is empty, generate() will rebuild all the texture.
Definition at line 457 of file texture.h.
Referenced by clearTouched(), NL3D::CTextureFont::doGenerate(), NL3D::CTextureFar::doGenerate(), isAllInvalidated(), NL3D::CDriverGL::setupTextureEx(), NL3D::CDriverD3D::setupTextureEx(), touch(), and touchRect().
TMagFilter NL3D::ITexture::_MagFilter [private] |
Definition at line 444 of file texture.h.
Referenced by getMagFilter(), ITexture(), operator=(), and setFilterMode().
TMinFilter NL3D::ITexture::_MinFilter [private] |
Definition at line 443 of file texture.h.
Referenced by getMinFilter(), ITexture(), mipMapOff(), operator=(), and setFilterMode().
bool NL3D::ITexture::_Releasable [private] |
Definition at line 438 of file texture.h.
Referenced by getReleasable(), ITexture(), operator=(), and setReleasable().
bool NL3D::ITexture::_RenderTarget [private] |
Definition at line 439 of file texture.h.
Referenced by getRenderTarget(), ITexture(), operator=(), and setRenderTarget().
Definition at line 445 of file texture.h.
Referenced by getTextureCategory(), and setTextureCategory().
bool NL3D::ITexture::_Touched [protected] |
Definition at line 419 of file texture.h.
Referenced by clearTouched(), NL3D::CTextureBump::getNormalizationFactor(), isAllInvalidated(), ITexture(), NL3D::CTextureMem::setPointer(), touch(), touched(), and touchRect().
TUploadFormat NL3D::ITexture::_UploadFormat [private] |
Definition at line 440 of file texture.h.
Referenced by getUploadFormat(), ITexture(), operator=(), and setUploadFormat().
TWrapMode NL3D::ITexture::_WrapS [private] |
Definition at line 441 of file texture.h.
Referenced by getWrapS(), ITexture(), operator=(), and setWrapS().
TWrapMode NL3D::ITexture::_WrapT [private] |
Definition at line 442 of file texture.h.
Referenced by getWrapT(), ITexture(), operator=(), and setWrapT().
Definition at line 451 of file texture.h.
Referenced by NL3D::CDriverGL::activeFrameBufferObject(), NL3D::CDriverGL::copyFrameBufferToTexture(), NL3D::CDriverD3D::getSurfaceTexture(), NL3D::CDriverD3D::getTextureD3D(), NL3D::getTextureGl(), NL3D::CDriverGL::getTextureHandle(), NL3D::CDriverD3D::getTextureHandle(), releaseDriverSetup(), NL3D::CDriverD3D::setRenderTarget(), setupedIntoDriver(), NL3D::CDriverGL::setupTextureEx(), NL3D::CDriverD3D::setupTextureEx(), NL3D::CDriverGL::uploadTexture(), NL3D::CDriverD3D::uploadTexture(), and NL3D::CDriverGL::uploadTextureCube().
1.6.1