CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

3D
[Graphics]


Compounds

struct  iEffectClient
 Effect client. More...

struct  iEffectDefinition
 Effect definition. More...

struct  iEffectLayer
 A layer in an effect pass. More...

struct  iEffectPass
 An effect pass. More...

struct  iEffectServer
 Effect server. More...

struct  iEffectTechnique
 An effect technique. More...

struct  csEffectVector4
 A simple 4-component vector, used by the effect system. More...

struct  csFog
 Fog structure. More...

class  G3DFogInfo
 Extra information for vertex fogging. More...

struct  G3DPolygonDFP
 Structure containing all info needed by DrawFogPolygon (DFP). More...

struct  G3DPolygonDP
 Structure containing all info needed by DrawPolygon (DP). More...

struct  G3DPolygonDPFX
 Structure containing all info needed by DrawPolygonFX (DPFX). More...

struct  G3DPolygonMesh
 Structure containing all info needed by DrawPolygonMesh. More...

class  G3DTexturePlane
 Information about a texture plane. More...

struct  G3DTriangleMesh
 Structure containing all info needed by DrawTriangeMesh. More...

struct  iGraphics3D
 This is the standard 3D graphics interface. More...

struct  csGraphics3DCaps
 Information about 3d renderer capabilities. More...

struct  iHalo
 iHalo: used to render halos (aka "light globes"). More...

struct  iMaterial
 This class represents a material as seen from the engine view. More...

struct  iMaterialHandle
 This class represents a material handle (compiled material) for the 3D rasterizer. More...

struct  iPolygonBuffer
 This interface represents a black-box polygon buffer. More...

struct  iRender3D
 New 3D Interface. More...

class  csRender3dCaps
 A triangle. More...

struct  iRenderBuffer
 This is a general buffer to be used by the renderer. More...

struct  iTextureHandle
 A texture handle as returned by iTextureManager. More...

struct  csTextureLayer
 This structure represents an extra texture layer which is applied on top of the previous one. More...

struct  iTextureManager
 This is the standard texture manager interface. More...

struct  iVertexBuffer
 This interface represents a black-box vertex buffer. More...

struct  iVertexBufferManager
 This interface represents the vertex buffer manager. More...

struct  iVertexBufferManagerClient
 Objects using services provided by the vertexbuffermanager can register with the manager to receive information about it current state, e.g. More...


Technique Validation Status

#define CS_TECHNIQUE_PASSED   0
 Technique is validated. More...

#define CS_TECHNIQUE_FAILED   1
 Validation failed. More...

#define CS_TECHNIQUE_NOTVALIDATED   2
 Not yet tested for validity. More...


Mix modes for DrawPolygonFX ()

The constants can be ORed together if they belong to different masks.

#define CS_FX_MASK_MIXMODE   0xF0000000
 SRC/DST mixing mode mask. More...

#define CS_FX_COPY   0x00000000
 =SRC. More...

#define CS_FX_MULTIPLY   0x10000000
 =SRC*DST. More...

#define CS_FX_MULTIPLY2   0x20000000
 =2*SRC*DST. More...

#define CS_FX_ADD   0x30000000
 =SRC+DST. More...

#define CS_FX_ALPHA   0x40000000
 =(1-alpha)*SRC + alpha*DST. More...

#define CS_FX_TRANSPARENT   0x50000000
 =DST. More...

#define CS_FX_KEYCOLOR   0x08000000
 color 0 is transparent. More...

#define CS_FX_GOURAUD   0x04000000
 Gouraud shading. More...

#define CS_FX_TILING   0x02000000
 Tiling. More...

#define CS_FX_MASK_ALPHA   0x000000FF
 alpha = 0..FF (opaque..transparent). More...

#define CS_FX_SETALPHA(alpha)   (CS_FX_ALPHA | uint (alpha * CS_FX_MASK_ALPHA))
 Macro for setting of alpha bits into mixmode (alpha between 0 and 1). More...

#define CS_FX_SETALPHA_INT(alpha)   (CS_FX_ALPHA | uint (alpha & CS_FX_MASK_ALPHA))
 Macro for setting of alpha bits into mixmode (alpha between 0 and 255). More...


iGraphics3D::BeginDraw() flags

#define CSDRAW_2DGRAPHICS   0x00000001
 We're going to draw 2D graphics. More...

#define CSDRAW_3DGRAPHICS   0x00000002
 We're going to draw 3D graphics. More...

#define CSDRAW_CLEARZBUFFER   0x00000010
 Clear Z-buffer ? More...

#define CSDRAW_CLEARSCREEN   0x00000020
 Clear frame buffer ? More...


Type of clipper (for iGraphics3D::SetClipper())

#define CS_CLIPPER_NONE   -1
 There is no clipper. More...

#define CS_CLIPPER_OPTIONAL   0
 Clipper is optional. More...

#define CS_CLIPPER_TOPLEVEL   1
 Clipper is top-level. More...

#define CS_CLIPPER_REQUIRED   2
 Clipper is required. More...


Clipping requirement for DrawTriangleMesh

#define CS_CLIP_NOT   0
 No clipping required. More...

#define CS_CLIP_NEEDED   1
 Clipping may be needed. More...

#define CS_CLIP_TOPLEVEL   2
 Clipping is not needed for the current clipper but it might be needed for the toplevel clipper. More...


Mix modes for DrawPolygonFX ()

The constants can be ORed together if they belong to different masks.

#define CS_FX_DESTALPHAADD   0x60000000
 =(dstalpha)*SRC + DST. More...


Light parameters

#define CS_LIGHTPARAM_POSITION   0
 Position of the light. More...

#define CS_LIGHTPARAM_DIFFUSE   1
 Diffuse color of the light. More...

#define CS_LIGHTPARAM_SPECULAR   2
 Specular color of the light. More...

#define CS_LIGHTPARAM_ATTENUATION   3
 Attenuation of the light. More...


Shadow states

#define CS_SHADOW_VOLUME_BEGIN   1
 Clear stencil. More...

#define CS_SHADOW_VOLUME_PASS1   2
 Setup for pass 1. More...

#define CS_SHADOW_VOLUME_PASS2   3
 Setup for pass 2. More...

#define CS_SHADOW_VOLUME_FAIL1   4
 Setup for carmack's reverse pass 1. More...

#define CS_SHADOW_VOLUME_FAIL2   5
 Setup for carmack's reverse pass 2. More...

#define CS_SHADOW_VOLUME_USE   6
 Setup for shadow masking. More...

#define CS_SHADOW_VOLUME_FINISH   7
 Restore states. 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. More...

#define CS_TEXTURE_3D   0x00000002
 You're going to use the texture for 3D drawing. More...

#define CS_TEXTURE_DITHER   0x00000004
 Dither texture or not. More...

#define CS_TEXTURE_NOMIPMAPS   0x00000008
 Create mipmaps for this texture? More...


Defines

#define CS_DEFMAT_DIFFUSE   0.7f
 Default material `diffuse' parameter. More...

#define CS_DEFMAT_AMBIENT   0.0f
 Default material `ambient' parameter. More...

#define CS_DEFMAT_REFLECTION   0.0f
 Default material `reflection' parameter. More...


Typedefs

typedef G3DPolygonDP G3DPolygonDPF
 Structure containing all info needed by DrawPolygonFlat (DPF). More...


Enumerations

enum  csZBufMode {
  CS_ZBUF_NONE = 0x00000000, CS_ZBUF_FILL = 0x00000001, CS_ZBUF_TEST = 0x00000002, CS_ZBUF_USE = 0x00000003,
  CS_ZBUF_FILLONLY = 0x00000004, CS_ZBUF_EQUAL = 0x00000005
}
 Z-buffer modes. More...

enum  G3D_RENDERSTATEOPTION {
  G3DRENDERSTATE_ZBUFFERMODE, G3DRENDERSTATE_DITHERENABLE, G3DRENDERSTATE_BILINEARMAPPINGENABLE, G3DRENDERSTATE_TRILINEARMAPPINGENABLE,
  G3DRENDERSTATE_TRANSPARENCYENABLE, G3DRENDERSTATE_MIPMAPENABLE, G3DRENDERSTATE_TEXTUREMAPPINGENABLE, G3DRENDERSTATE_LIGHTINGENABLE,
  G3DRENDERSTATE_INTERLACINGENABLE, G3DRENDERSTATE_MMXENABLE, G3DRENDERSTATE_INTERPOLATIONSTEP, G3DRENDERSTATE_MAXPOLYGONSTODRAW,
  G3DRENDERSTATE_GOURAUDENABLE, G3DRENDERSTATE_EDGES
}
 Graphics3D render state options. More...

enum  csVertexAttrib
 Vertex attributes. More...

enum  R3D_RENDERSTATEOPTION
 Graphics3D render state options. More...

enum  csRenderBufferType
 Where the buffer is placed CS_BUF_INDEX is special and only to be used by indexbuffers. More...

enum  csRenderBufferComponentType
 Type of components. More...

enum  csRenderBufferLockType
 Type of lock CS_BUF_LOCK_NORMAL: Just get a point to the buffer, nothing special CS_BUF_LOCK_RENDER: Special lock only to be used by renderer. More...

enum  csRenderMeshType
 Type of mesh. More...


Define Documentation

#define CS_CLIP_NEEDED   1
 

Clipping may be needed.

Depending on the type of the clipper (one of the CS_CLIPPER_??? flags) the renderer has to clip or not. (setting for clip_portal, clip_plane, or clip_z_plane).

Definition at line 337 of file graph3d.h.

#define CS_CLIP_NOT   0
 

No clipping required.

(setting for clip_portal, clip_plane, or clip_z_plane).

Definition at line 331 of file graph3d.h.

#define CS_CLIP_TOPLEVEL   2
 

Clipping is not needed for the current clipper but it might be needed for the toplevel clipper.

(setting for clip_portal, will never be used for clip_plane or clip_z_plane).

Definition at line 343 of file graph3d.h.

#define CS_CLIPPER_NONE   -1
 

There is no clipper.

Definition at line 310 of file graph3d.h.

#define CS_CLIPPER_OPTIONAL   0
 

Clipper is optional.

Definition at line 314 of file graph3d.h.

#define CS_CLIPPER_REQUIRED   2
 

Clipper is required.

Definition at line 322 of file graph3d.h.

#define CS_CLIPPER_TOPLEVEL   1
 

Clipper is top-level.

Definition at line 318 of file graph3d.h.

#define CS_DEFMAT_AMBIENT   0.0f
 

Default material `ambient' parameter.

Definition at line 34 of file ivideo/material.h.

#define CS_DEFMAT_DIFFUSE   0.7f
 

Default material `diffuse' parameter.

Definition at line 32 of file ivideo/material.h.

#define CS_DEFMAT_REFLECTION   0.0f
 

Default material `reflection' parameter.

Definition at line 36 of file ivideo/material.h.

#define CS_FX_ADD   0x30000000
 

=SRC+DST.

Definition at line 96 of file graph3d.h.

#define CS_FX_ALPHA   0x40000000
 

=(1-alpha)*SRC + alpha*DST.

Definition at line 98 of file graph3d.h.

#define CS_FX_COPY   0x00000000
 

=SRC.

Definition at line 90 of file graph3d.h.

#define CS_FX_DESTALPHAADD   0x60000000
 

=(dstalpha)*SRC + DST.

Definition at line 175 of file render3d.h.

#define CS_FX_GOURAUD   0x04000000
 

Gouraud shading.

Definition at line 104 of file graph3d.h.

#define CS_FX_KEYCOLOR   0x08000000
 

color 0 is transparent.

Definition at line 102 of file graph3d.h.

#define CS_FX_MASK_ALPHA   0x000000FF
 

alpha = 0..FF (opaque..transparent).

Definition at line 108 of file graph3d.h.

#define CS_FX_MASK_MIXMODE   0xF0000000
 

SRC/DST mixing mode mask.

Definition at line 88 of file graph3d.h.

#define CS_FX_MULTIPLY   0x10000000
 

=SRC*DST.

Definition at line 92 of file graph3d.h.

#define CS_FX_MULTIPLY2   0x20000000
 

=2*SRC*DST.

Definition at line 94 of file graph3d.h.

#define CS_FX_SETALPHA alpha       (CS_FX_ALPHA | uint (alpha * CS_FX_MASK_ALPHA))
 

Macro for setting of alpha bits into mixmode (alpha between 0 and 1).

Definition at line 111 of file graph3d.h.

#define CS_FX_SETALPHA_INT alpha       (CS_FX_ALPHA | uint (alpha & CS_FX_MASK_ALPHA))
 

Macro for setting of alpha bits into mixmode (alpha between 0 and 255).

Definition at line 114 of file graph3d.h.

#define CS_FX_TILING   0x02000000
 

Tiling.

Definition at line 106 of file graph3d.h.

#define CS_FX_TRANSPARENT   0x50000000
 

=DST.

Definition at line 100 of file graph3d.h.

#define CS_LIGHTPARAM_ATTENUATION   3
 

Attenuation of the light.

Definition at line 214 of file render3d.h.

#define CS_LIGHTPARAM_DIFFUSE   1
 

Diffuse color of the light.

Definition at line 204 of file render3d.h.

#define CS_LIGHTPARAM_POSITION   0
 

Position of the light.

Definition at line 199 of file render3d.h.

#define CS_LIGHTPARAM_SPECULAR   2
 

Specular color of the light.

Definition at line 209 of file render3d.h.

#define CS_SHADOW_VOLUME_BEGIN   1
 

Clear stencil.

Definition at line 225 of file render3d.h.

#define CS_SHADOW_VOLUME_FAIL1   4
 

Setup for carmack's reverse pass 1.

Definition at line 240 of file render3d.h.

#define CS_SHADOW_VOLUME_FAIL2   5
 

Setup for carmack's reverse pass 2.

Definition at line 245 of file render3d.h.

#define CS_SHADOW_VOLUME_FINISH   7
 

Restore states.

Definition at line 255 of file render3d.h.

#define CS_SHADOW_VOLUME_PASS1   2
 

Setup for pass 1.

Definition at line 230 of file render3d.h.

#define CS_SHADOW_VOLUME_PASS2   3
 

Setup for pass 2.

Definition at line 235 of file render3d.h.

#define CS_SHADOW_VOLUME_USE   6
 

Setup for shadow masking.

Definition at line 250 of file render3d.h.

#define CS_TECHNIQUE_FAILED   1
 

Validation failed.

Definition at line 41 of file eftech.h.

#define CS_TECHNIQUE_NOTVALIDATED   2
 

Not yet tested for validity.

Definition at line 43 of file eftech.h.

#define CS_TECHNIQUE_PASSED   0
 

Technique is validated.

Definition at line 39 of file eftech.h.

#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_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_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 CSDRAW_2DGRAPHICS   0x00000001
 

We're going to draw 2D graphics.

Definition at line 277 of file graph3d.h.

#define CSDRAW_3DGRAPHICS   0x00000002
 

We're going to draw 3D graphics.

Definition at line 279 of file graph3d.h.

#define CSDRAW_CLEARSCREEN   0x00000020
 

Clear frame buffer ?

Definition at line 283 of file graph3d.h.

#define CSDRAW_CLEARZBUFFER   0x00000010
 

Clear Z-buffer ?

Definition at line 281 of file graph3d.h.


Typedef Documentation

typedef G3DPolygonDP G3DPolygonDPF
 

Structure containing all info needed by DrawPolygonFlat (DPF).

Definition at line 219 of file graph3d.h.


Enumeration Type Documentation

enum csRenderBufferComponentType
 

Type of components.

Definition at line 56 of file rndbuf.h.

enum csRenderBufferLockType
 

Type of lock CS_BUF_LOCK_NORMAL: Just get a point to the buffer, nothing special CS_BUF_LOCK_RENDER: Special lock only to be used by renderer.

Definition at line 73 of file rndbuf.h.

enum csRenderBufferType
 

Where the buffer is placed CS_BUF_INDEX is special and only to be used by indexbuffers.

Definition at line 48 of file rndbuf.h.

enum csRenderMeshType
 

Type of mesh.

Definition at line 138 of file rndbuf.h.

enum csVertexAttrib
 

Vertex attributes.

Definition at line 125 of file render3d.h.

enum csZBufMode
 

Z-buffer modes.

Enumeration values:
CS_ZBUF_NONE  Don't test/write.
CS_ZBUF_FILL  write.
CS_ZBUF_TEST  test.
CS_ZBUF_USE  write/test.
CS_ZBUF_FILLONLY  only write.
CS_ZBUF_EQUAL  test if equal.

Definition at line 222 of file graph3d.h.

enum G3D_RENDERSTATEOPTION
 

Graphics3D render state options.

Enumeration values:
G3DRENDERSTATE_ZBUFFERMODE  Set Z-buffer fill/test/use mode (parameter is a csZBufMode).
G3DRENDERSTATE_DITHERENABLE  Enable/disable dithering (parameter is a bool).
G3DRENDERSTATE_BILINEARMAPPINGENABLE  Enable/disable bi-linear mapping (parameter is a bool).
G3DRENDERSTATE_TRILINEARMAPPINGENABLE  Enable/disable tri-linear mapping (parameter is a bool).
G3DRENDERSTATE_TRANSPARENCYENABLE  Enable/disable transparent textures (parameter is a bool).
G3DRENDERSTATE_MIPMAPENABLE  Enable/disable mip-mapping (parameter is a bool).
G3DRENDERSTATE_TEXTUREMAPPINGENABLE  Enable/disable textures (parameter is a bool).
G3DRENDERSTATE_LIGHTINGENABLE  Enable/disable lighting (parameter is a bool).
G3DRENDERSTATE_INTERLACINGENABLE  Enable/disable interlacing (parameter is a bool).
G3DRENDERSTATE_MMXENABLE  Enable/disable MMX instructions usage (parameter is a bool).
G3DRENDERSTATE_INTERPOLATIONSTEP  Set perspective-correction interpolation step (parameter is a int).
G3DRENDERSTATE_MAXPOLYGONSTODRAW  Set maximal number of polygons per frame to draw (parameter is a int).
G3DRENDERSTATE_GOURAUDENABLE  Enable/disable Gouraud shading (parameter is a bool).
G3DRENDERSTATE_EDGES  Enable/disable edge drawing (debugging) (parameter is a bool).

Definition at line 242 of file graph3d.h.

enum R3D_RENDERSTATEOPTION
 

Graphics3D render state options.

Definition at line 262 of file render3d.h.


Generated for Crystal Space by doxygen 1.2.14