# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CTextureUser Class Reference

UTexture implementation. More...

#include <texture_user.h>

Inheritance diagram for NL3D::CTextureUser:

NL3D::UTexture NL3D::CTextureFileUser NL3D::CTextureRawUser List of all members.

Public Methods

virtual void setWrapS (TWrapMode mode)
virtual void setWrapT (TWrapMode mode)
virtual TWrapMode getWrapS () const
virtual TWrapMode getWrapT () const
virtual void setUploadFormat (TUploadFormat pf)
 Replace the uploaded format of the texture. More...

virtual TUploadFormat getUploadFormat () const
virtual void setFilterMode (TMagFilter magf, TMinFilter minf)
virtual TMagFilter getMagFilter () const
virtual TMinFilter getMinFilter () const
virtual bool mipMapOff () const
virtual bool mipMapOn () const
ITexturegetITexture ()
 Accessor for UMaterial imp. More...

Object
 CTextureUser (ITexture *text)
 This ctpor takes a freshly created texture!! UTexture will owns this texture (via smartptr). More...

virtual ~CTextureUser ()

Protected Attributes

CSmartPtr< ITexture_Texture

Detailed Description

UTexture implementation.

This Texture must keep a SmartPtr on the real ITexture. Because CMaterial attach texture with SmartPtr too!!

Author:
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 51 of file texture_user.h.


Constructor & Destructor Documentation

NL3D::CTextureUser::CTextureUser ITexture   text [inline]
 

This ctpor takes a freshly created texture!! UTexture will owns this texture (via smartptr).

Definition at line 61 of file texture_user.h.

References _Texture, NL3D_MEM_TEXTURE, and nlassert.

Referenced by NL3D::CTextureFileUser::CTextureFileUser, and NL3D::CTextureRawUser::CTextureRawUser.

virtual NL3D::CTextureUser::~CTextureUser   [inline, virtual]
 

Definition at line 73 of file texture_user.h.

References NL3D_MEM_TEXTURE.


Member Function Documentation

ITexture* NL3D::CTextureUser::getITexture   [inline]
 

Accessor for UMaterial imp.

Definition at line 138 of file texture_user.h.

References _Texture, and NL3D_MEM_TEXTURE.

virtual TMagFilter NL3D::CTextureUser::getMagFilter   const [inline, virtual]
 

Implements NL3D::UTexture.

Definition at line 115 of file texture_user.h.

References _Texture, NL3D_MEM_TEXTURE, and NL3D::UTexture::TMagFilter.

virtual TMinFilter NL3D::CTextureUser::getMinFilter   const [inline, virtual]
 

Implements NL3D::UTexture.

Definition at line 120 of file texture_user.h.

References _Texture, NL3D_MEM_TEXTURE, and NL3D::UTexture::TMinFilter.

virtual TUploadFormat NL3D::CTextureUser::getUploadFormat   const [inline, virtual]
 

Implements NL3D::UTexture.

Definition at line 105 of file texture_user.h.

References _Texture, NL3D_MEM_TEXTURE, and NL3D::UTexture::TUploadFormat.

virtual TWrapMode NL3D::CTextureUser::getWrapS   const [inline, virtual]
 

Implements NL3D::UTexture.

Definition at line 90 of file texture_user.h.

References _Texture, NL3D_MEM_TEXTURE, and NL3D::UTexture::TWrapMode.

virtual TWrapMode NL3D::CTextureUser::getWrapT   const [inline, virtual]
 

Implements NL3D::UTexture.

Definition at line 95 of file texture_user.h.

References _Texture, NL3D_MEM_TEXTURE, and NL3D::UTexture::TWrapMode.

virtual bool NL3D::CTextureUser::mipMapOff   const [inline, virtual]
 

Implements NL3D::UTexture.

Definition at line 125 of file texture_user.h.

References _Texture, and NL3D_MEM_TEXTURE.

virtual bool NL3D::CTextureUser::mipMapOn   const [inline, virtual]
 

Implements NL3D::UTexture.

Definition at line 130 of file texture_user.h.

References _Texture, and NL3D_MEM_TEXTURE.

virtual void NL3D::CTextureUser::setFilterMode TMagFilter    magf,
TMinFilter    minf
[inline, virtual]
 

Implements NL3D::UTexture.

Definition at line 110 of file texture_user.h.

References _Texture, NL3D_MEM_TEXTURE, NL3D::UTexture::TMagFilter, and NL3D::UTexture::TMinFilter.

virtual void NL3D::CTextureUser::setUploadFormat TUploadFormat    pf [inline, virtual]
 

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).

Implements NL3D::UTexture.

Definition at line 100 of file texture_user.h.

References _Texture, NL3D_MEM_TEXTURE, and NL3D::UTexture::TUploadFormat.

virtual void NL3D::CTextureUser::setWrapS TWrapMode    mode [inline, virtual]
 

  • MinFilter= LinearMipMapLinear.
NB: if multiple ITexture acces the same data via the sharing system (such as a CTextureFile), then:
  • WrapS/WrapT is LOCAL for each ITexture (ie each ITexture will have his own Wrap mode) => no duplication is made.
  • UploadFormat may duplicate the texture in video memory. There is one texture per different UploadFormat.
  • MinFilter may duplicate the texture in video memory in the same way, wether the texture has mipmap or not.

Implements NL3D::UTexture.

Definition at line 80 of file texture_user.h.

References _Texture, NL3D_MEM_TEXTURE, and NL3D::UTexture::TWrapMode.

virtual void NL3D::CTextureUser::setWrapT TWrapMode    mode [inline, virtual]
 

Implements NL3D::UTexture.

Definition at line 85 of file texture_user.h.

References _Texture, NL3D_MEM_TEXTURE, and NL3D::UTexture::TWrapMode.


Member Data Documentation

CSmartPtr<ITexture> NL3D::CTextureUser::_Texture [protected]
 

Definition at line 54 of file texture_user.h.

Referenced by NL3D::CTextureFileUser::allowDegradation, NL3D::CTextureFileUser::CTextureFileUser, CTextureUser, NL3D::CTextureFileUser::getFileName, getITexture, getMagFilter, getMinFilter, getUploadFormat, getWrapS, getWrapT, mipMapOff, mipMapOn, NL3D::CTextureFileUser::setAllowDegradation, NL3D::CTextureFileUser::setFileName, setFilterMode, setUploadFormat, setWrapS, and setWrapT.


The documentation for this class was generated from the following file: