CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

txtmgr.h File Reference

Texture manager interface. More...

#include "csutil/scf.h"

Go to the source code of this file.

Classes

struct  iRendererLightmap
 A lightmap registered with a renderer. More...
struct  iSuperLightmap
 A super light map. More...
struct  iTextureManager
 This is the standard texture manager interface. More...

Texture registration flags.

During texture registration you should tell the manager which way you're going to use the texture: whenever you're going to use it for 2D (DrawPixmap ()), for 3D (DrawPolygon ()), whenever the texture will be dynamically modified.

#define CS_TEXTURE_2D   0x00000001
 You're going to use the texture for 2D drawing.
#define CS_TEXTURE_3D   0x00000002
 You're going to use the texture for 3D drawing.
#define CS_TEXTURE_CLAMP   0x00000010
 This texture will not be tiled, and color lookups outside the 0.
#define CS_TEXTURE_DITHER   0x00000004
 Dither texture or not.
#define CS_TEXTURE_NOFILTER   0x00000020
 This texture will not be filtered, even if texture filtering is available.
#define CS_TEXTURE_NOMIPMAPS   0x00000008
 Create mipmaps for this texture? Sometimes we know in advance that some texture will need just one mipmap (or we just don't care about the mipmapping artifacts because of, say, how texture is looking (smoothed etc)).
#define CS_TEXTURE_NPOTS   0x00000040
 Store texture as non-power-of-two sized (NPOTS) if possible.


Detailed Description

Texture manager interface.

Definition in file txtmgr.h.


Define Documentation

#define CS_TEXTURE_2D   0x00000001
 

You're going to use the texture for 2D drawing.

Definition at line 51 of file txtmgr.h.

#define CS_TEXTURE_3D   0x00000002
 

You're going to use the texture for 3D drawing.

Definition at line 53 of file txtmgr.h.

#define CS_TEXTURE_CLAMP   0x00000010
 

This texture will not be tiled, and color lookups outside the 0.

.1 range will be clamped to the edge of the texture.

Definition at line 77 of file txtmgr.h.

#define CS_TEXTURE_DITHER   0x00000004
 

Dither texture or not.

Some renderers may use dithering while converting textures to internal format (say from truecolor to 8-bit paletted). For most textures dithering won't give any visual effect, but very seldom there are textures that looks relatively bad after being converted. In this case you can enable this per-texture flag.

Definition at line 62 of file txtmgr.h.

#define CS_TEXTURE_NOFILTER   0x00000020
 

This texture will not be filtered, even if texture filtering is available.

Definition at line 81 of file txtmgr.h.

#define CS_TEXTURE_NOMIPMAPS   0x00000008
 

Create mipmaps for this texture? Sometimes we know in advance that some texture will need just one mipmap (or we just don't care about the mipmapping artifacts because of, say, how texture is looking (smoothed etc)).

This flag is a hint for texture manager so that it will know this.

Note that if texture is not registered for 3D usage (i.e. if CS_TEXTURE_3D is not set) this flag does not matter - 2D textures do not use mipmaps.

Definition at line 72 of file txtmgr.h.

#define CS_TEXTURE_NPOTS   0x00000040
 

Store texture as non-power-of-two sized (NPOTS) if possible.

Remarks:
On a lot of hardware, support for NPOTS-texture is rather limited; for example, commonly only clamped and textures without mipmaps are supported, hence a texture may only be considered for NPOTS use if the CS_TEXTURE_CLAMP and CS_TEXTURE_NOMIPMAPS flags are also set. Some hardware may not support NPOTS textures at all. It is at the discretion of the renderer to decide whether a texture really becomes NPOTS or not. This flag serves merely as an expression of the wish that a texture should be NPOTS, if possible. If that cannot be granted, the flag will be removed (thus you can query whether a texture was stored NPOTS or not by checking if this flag is set on it).

Definition at line 95 of file txtmgr.h.


Generated for Crystal Space by doxygen 1.4.4