#include <texture_user.h>
Inheritance diagram for NL3D::CTextureRawUser:
Nevrax France
Definition at line 213 of file texture_user.h.
Public Types | |
enum | TMagFilter { Nearest = 0, Linear, MagFilterCount } |
enum | TMinFilter { NearestMipMapOff = 0, NearestMipMapNearest, NearestMipMapLinear, LinearMipMapOff, LinearMipMapNearest, LinearMipMapLinear, MinFilterCount } |
enum | TUploadFormat { Auto = 0, RGBA8888, RGBA4444, RGBA5551, RGB888, RGB565, DXTC1, DXTC1Alpha, DXTC3, DXTC5, Luminance, Alpha, AlphaLuminance, DsDt, UploadFormatCount } |
enum | TWrapMode { Repeat = 0, Clamp, WrapModeCount } |
Public Member Functions | |
CTextureRawUser () | |
ITexture * | getITexture () |
Accessor for UMaterial imp. | |
virtual TMagFilter | getMagFilter () const |
virtual TMinFilter | getMinFilter () const |
virtual NLMISC::CRGBA | getPixelColor (sint32 x, sint32 y) const |
virtual NLMISC::CRGBA | getPixelColor (sint32 x, sint32 y) const=0 |
virtual TUploadFormat | getUploadFormat () const |
virtual TWrapMode | getWrapS () const |
virtual TWrapMode | getWrapT () const |
virtual bool | mipMapOff () const |
virtual bool | mipMapOn () const |
virtual void | setFilterMode (TMagFilter magf, TMinFilter minf) |
virtual void | setReleasable (bool bReleasable) |
virtual void | setReleasable (bool bReleasable)=0 |
virtual void | setUploadFormat (TUploadFormat pf) |
virtual void | setWrapS (TWrapMode mode) |
virtual void | setWrapT (TWrapMode mode) |
Texture parameters. | |
virtual TMagFilter | getMagFilter () const=0 |
virtual TMinFilter | getMinFilter () const=0 |
virtual TUploadFormat | getUploadFormat () const=0 |
virtual TWrapMode | getWrapS () const=0 |
virtual TWrapMode | getWrapT () const=0 |
virtual bool | mipMapOff () const=0 |
virtual bool | mipMapOn () const=0 |
virtual void | setFilterMode (TMagFilter magf, TMinFilter minf)=0 |
virtual void | setUploadFormat (TUploadFormat pf)=0 |
virtual void | setWrapS (TWrapMode mode)=0 |
virtual void | setWrapT (TWrapMode mode)=0 |
Texture parameters. | |
virtual TMagFilter | getMagFilter () const=0 |
virtual TMinFilter | getMinFilter () const=0 |
virtual TUploadFormat | getUploadFormat () const=0 |
virtual TWrapMode | getWrapS () const=0 |
virtual TWrapMode | getWrapT () const=0 |
virtual bool | mipMapOff () const=0 |
virtual bool | mipMapOn () const=0 |
virtual void | setFilterMode (TMagFilter magf, TMinFilter minf)=0 |
virtual void | setUploadFormat (TUploadFormat pf)=0 |
virtual void | setWrapS (TWrapMode mode)=0 |
virtual void | setWrapT (TWrapMode mode)=0 |
Texture parameters. | |
virtual TMagFilter | getMagFilter () const=0 |
virtual TMinFilter | getMinFilter () const=0 |
virtual TUploadFormat | getUploadFormat () const=0 |
virtual TWrapMode | getWrapS () const=0 |
virtual TWrapMode | getWrapT () const=0 |
virtual bool | mipMapOff () const=0 |
virtual bool | mipMapOn () const=0 |
virtual void | setFilterMode (TMagFilter magf, TMinFilter minf)=0 |
virtual void | setUploadFormat (TUploadFormat pf)=0 |
virtual void | setWrapS (TWrapMode mode)=0 |
virtual void | setWrapT (TWrapMode mode)=0 |
Texture parameters. | |
virtual TMagFilter | getMagFilter () const=0 |
virtual TMinFilter | getMinFilter () const=0 |
virtual TUploadFormat | getUploadFormat () const=0 |
virtual TWrapMode | getWrapS () const=0 |
virtual TWrapMode | getWrapT () const=0 |
virtual bool | mipMapOff () const=0 |
virtual bool | mipMapOn () const=0 |
virtual void | setFilterMode (TMagFilter magf, TMinFilter minf)=0 |
virtual void | setUploadFormat (TUploadFormat pf)=0 |
virtual void | setWrapS (TWrapMode mode)=0 |
virtual void | setWrapT (TWrapMode mode)=0 |
Texture parameters. | |
virtual TMagFilter | getMagFilter () const=0 |
virtual TMinFilter | getMinFilter () const=0 |
virtual TUploadFormat | getUploadFormat () const=0 |
virtual TWrapMode | getWrapS () const=0 |
virtual TWrapMode | getWrapT () const=0 |
virtual bool | mipMapOff () const=0 |
virtual bool | mipMapOn () const=0 |
virtual void | setFilterMode (TMagFilter magf, TMinFilter minf)=0 |
virtual void | setUploadFormat (TUploadFormat pf)=0 |
virtual void | setWrapS (TWrapMode mode)=0 |
virtual void | setWrapT (TWrapMode mode)=0 |
Protected Attributes | |
CSmartPtr< ITexture > | _Texture |
|
Magnification mode. Same behavior as OpenGL. Definition at line 87 of file u_texture.h.
00088 { 00089 Nearest=0, 00090 Linear, 00091 00092 MagFilterCount 00093 }; |
|
Minifying mode. Same behavior as OpenGL. If the bitmap has no mipmap, and mipmap is required, then mipmaps are computed.
Definition at line 98 of file u_texture.h.
00099 { 00100 NearestMipMapOff=0, 00101 NearestMipMapNearest, 00102 NearestMipMapLinear, 00103 LinearMipMapOff, 00104 LinearMipMapNearest, 00105 LinearMipMapLinear, 00106 00107 MinFilterCount 00108 }; |
|
Definition at line 64 of file u_texture.h.
00065 { 00066 Auto= 0, 00067 RGBA8888, 00068 RGBA4444, 00069 RGBA5551, 00070 RGB888, 00071 RGB565, 00072 DXTC1, 00073 DXTC1Alpha, 00074 DXTC3, 00075 DXTC5, 00076 Luminance, 00077 Alpha, 00078 AlphaLuminance, 00079 DsDt, 00080 UploadFormatCount 00081 }; |
|
Definition at line 56 of file u_texture.h.
00057 { 00058 Repeat= 0, 00059 Clamp, 00060 00061 WrapModeCount 00062 }; |
|
Definition at line 218 of file texture_user.h.
00218 : CTextureUser(NULL) 00219 { 00220 } |
|
Accessor for UMaterial imp.
Definition at line 147 of file texture_user.h. References NL3D_MEM_TEXTURE.
00148 { 00149 NL3D_MEM_TEXTURE 00150 return _Texture; 00151 } |
|
Implements NL3D::UTexture. Definition at line 115 of file texture_user.h. References NL3D_MEM_TEXTURE, and uint32.
00116 { 00117 NL3D_MEM_TEXTURE 00118 return (UTexture::TMagFilter)(uint32)_Texture->getMagFilter(); 00119 } |
|
Implemented in NL3D::CTextureUser. |
|
Implements NL3D::UTexture. Definition at line 120 of file texture_user.h. References NL3D_MEM_TEXTURE, and uint32.
00121 { 00122 NL3D_MEM_TEXTURE 00123 return (UTexture::TMinFilter)(uint32)_Texture->getMinFilter(); 00124 } |
|
Implemented in NL3D::CTextureUser. |
|
Implements NL3D::UTexture. Definition at line 135 of file texture_user.h. References NL3D_MEM_TEXTURE, sint32, x, and y.
00136 { 00137 NL3D_MEM_TEXTURE 00138 return _Texture->getPixelColor(x,y); 00139 } |
|
Implemented in NL3D::CTextureUser. |
|
Implements NL3D::UTexture. Definition at line 105 of file texture_user.h. References NL3D_MEM_TEXTURE, and uint32.
00106 { 00107 NL3D_MEM_TEXTURE 00108 return (UTexture::TUploadFormat)(uint32)_Texture->getUploadFormat(); 00109 } |
|
Implemented in NL3D::CTextureUser. |
|
Implements NL3D::UTexture. Definition at line 90 of file texture_user.h. References NL3D_MEM_TEXTURE, and uint32.
00091 { 00092 NL3D_MEM_TEXTURE 00093 return (UTexture::TWrapMode)(uint32)_Texture->getWrapS(); 00094 } |
|
Implemented in NL3D::CTextureUser. |
|
Implements NL3D::UTexture. Definition at line 95 of file texture_user.h. References NL3D_MEM_TEXTURE, and uint32.
00096 { 00097 NL3D_MEM_TEXTURE 00098 return (UTexture::TWrapMode)(uint32)_Texture->getWrapT(); 00099 } |
|
Implemented in NL3D::CTextureUser. |
|
Set mipmap property to off If the texture is DXTC and has mipmap, the driver will NOT upload them in VRAM if the user dont want them. Implements NL3D::UTexture. Definition at line 125 of file texture_user.h. References NL3D_MEM_TEXTURE.
00126 { 00127 NL3D_MEM_TEXTURE 00128 return _Texture->mipMapOff(); 00129 } |
|
Set mipmap property to off If the texture is DXTC and has mipmap, the driver will NOT upload them in VRAM if the user dont want them. Implemented in NL3D::CTextureUser. |
|
Set mipmap property to on If the texture is DXTC and has no mipmap the driver will NOT create them. (This is due to performance: to create mipmap in DXTC the driver have to decompress the texture, create the mipmap and recompress the texture to upload it in VRAM. This is really time consuming and texture quality is altered, so the driver will not create them). Implements NL3D::UTexture. Definition at line 130 of file texture_user.h. References NL3D_MEM_TEXTURE.
00131 { 00132 NL3D_MEM_TEXTURE 00133 return _Texture->mipMapOn(); 00134 } |
|
Set mipmap property to on If the texture is DXTC and has no mipmap the driver will NOT create them. (This is due to performance: to create mipmap in DXTC the driver have to decompress the texture, create the mipmap and recompress the texture to upload it in VRAM. This is really time consuming and texture quality is altered, so the driver will not create them). Implemented in NL3D::CTextureUser. |
|
Implements NL3D::UTexture. Definition at line 110 of file texture_user.h. References NL3D_MEM_TEXTURE, and uint32.
00111 { 00112 NL3D_MEM_TEXTURE 00113 _Texture->setFilterMode((ITexture::TMagFilter)(uint32)magf, (ITexture::TMinFilter)(uint32)minf); 00114 } |
|
Implemented in NL3D::CTextureUser. |
|
Implements NL3D::UTexture. Definition at line 140 of file texture_user.h. References NL3D_MEM_TEXTURE.
00141 { 00142 NL3D_MEM_TEXTURE 00143 _Texture->setReleasable(bReleasable); 00144 } |
|
Implemented in NL3D::CTextureUser. |
|
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 NL3D_MEM_TEXTURE, and uint32.
00101 { 00102 NL3D_MEM_TEXTURE 00103 _Texture->setUploadFormat((ITexture::TUploadFormat)(uint32)pf); 00104 } |
|
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). Implemented in NL3D::CTextureUser. |
|
By default, parameters are:
NB: if multiple ITexture acces the same data via the sharing system (such as a CTextureFile), then:
Implements NL3D::UTexture. Definition at line 80 of file texture_user.h. References NL3D_MEM_TEXTURE, and uint32.
00081 { 00082 NL3D_MEM_TEXTURE 00083 _Texture->setWrapS((ITexture::TWrapMode)(uint32)mode); 00084 } |
|
By default, parameters are:
NB: if multiple ITexture acces the same data via the sharing system (such as a CTextureFile), then:
Implemented in NL3D::CTextureUser. |
|
Implements NL3D::UTexture. Definition at line 85 of file texture_user.h. References NL3D_MEM_TEXTURE, and uint32.
00086 { 00087 NL3D_MEM_TEXTURE 00088 _Texture->setWrapT((ITexture::TWrapMode)(uint32)mode); 00089 } |
|
Implemented in NL3D::CTextureUser. |
|
Definition at line 54 of file texture_user.h. |