3D
[Graphics]
Classes | |
struct | csAlphaMode |
Describes how to deal with alpha values in textures. More... | |
struct | csCoreRenderMesh |
Data required by the renderer to draw a mesh. More... | |
class | csRenderBufferHolder |
Holder of standard renderbuffers. More... | |
struct | csRenderMesh |
Mesh data as returned by mesh plugins. More... | |
struct | csRenderMeshModes |
Mesh render mode information. More... | |
class | csShaderVariable |
Storage class for "shader vars", inheritable variables in the shader system. More... | |
struct | iFireTexture |
Interface to the 'fire' procedural texture. More... | |
struct | iHalo |
iHalo: used to render halos (aka "light globes"). 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 | iMaterial |
This class represents a material as seen from the engine view. More... | |
struct | iProcTexture |
Interface to a texture factory. More... | |
struct | iRenderBuffer |
This is a general buffer. More... | |
struct | iRenderBufferAccessor |
Interface for renderbuffer accessor. More... | |
struct | iRendererLightmap |
A lightmap registered with a renderer. More... | |
struct | iShaderVariableAccessor |
Interface to an accessorcallback for shadervariables. More... | |
struct | iSuperLightmap |
A super light map. More... | |
struct | iTextureFactory |
Interface to a texture factory. More... | |
struct | iTextureHandle |
A texture handle as returned by iTextureManager. More... | |
struct | iTextureManager |
This is the standard texture manager interface. More... | |
struct | iTextureType |
Texture type. More... | |
struct | iTextureType |
Texture type. More... | |
Clipping requirement for DrawTriangleMesh | |
#define | CS_CLIP_NEEDED 1 |
Clipping may be needed. | |
#define | CS_CLIP_NOT 0 |
No clipping required. | |
Type of clipper (for iGraphics3D::SetClipper()) | |
#define | CS_CLIPPER_NONE -1 |
There is no clipper. | |
#define | CS_CLIPPER_OPTIONAL 0 |
Clipper is optional. | |
#define | CS_CLIPPER_REQUIRED 2 |
Clipper is required. | |
#define | CS_CLIPPER_TOPLEVEL 1 |
Clipper is top-level. | |
Mix mode: Default modes | |
A set of commonly used mix modes. | |
#define | CS_FX_ADD (CS_MIXMODE_BLEND(ONE, ONE) | CS_MIXMODE_ALPHATEST_DISABLE) |
Additive blending. Formula: =SRC+DST . | |
#define | CS_FX_ALPHA (CS_MIXMODE_BLEND(SRCALPHA, SRCALPHA_INV) | CS_MIXMODE_ALPHATEST_DISABLE) |
Alpha blending. | |
#define | CS_FX_COPY (CS_MIXMODE_TYPE_AUTO | CS_MIXMODE_ALPHATEST_AUTO) |
This mixmode uses alpha smooth blending, binary blending (ie enabled alpha test) and no blending depending on the contents of csRenderMesh::alphaMode. | |
#define | CS_FX_DESTALPHAADD (CS_MIXMODE_BLEND(DSTALPHA, ONE) | CS_MIXMODE_ALPHATEST_DISABLE) |
Multiply source color with destination alpha and add. | |
#define | CS_FX_FLAT (0x04000000) |
Flat shading flag. | |
#define | CS_FX_MASK_ALPHA (0x000000FF) |
Mixmode alpha part. | |
#define | CS_FX_MASK_MIXMODE (0xf0ff0000) |
Bit mask for bits relevant to mix mode comparison; contains type, alpha test flags and blending op factors. | |
#define | CS_FX_MESH (CS_MIXMODE_TYPE_MESH) |
Use the mix mode of the mesh mix mode. | |
#define | CS_FX_MULTIPLY (CS_MIXMODE_BLEND(DSTCOLOR, ZERO) | CS_MIXMODE_ALPHATEST_DISABLE) |
Multiplicative blending. Formula: =SRC*DST . | |
#define | CS_FX_MULTIPLY2 (CS_MIXMODE_BLEND(DSTCOLOR, SRCCOLOR) | CS_MIXMODE_ALPHATEST_DISABLE) |
Multiplicative doubling blending. Formula: =2*SRC*DST . | |
#define | CS_FX_PREMULTALPHA (CS_MIXMODE_BLEND(ONE, SRCALPHA_INV) | CS_MIXMODE_ALPHATEST_DISABLE) |
Multiply destination color with inverse source alpha and add source color. | |
#define | CS_FX_SRCALPHAADD (CS_MIXMODE_BLEND(SRCALPHA, ONE) | CS_MIXMODE_ALPHATEST_DISABLE) |
Multiply source color with source alpha and add. | |
#define | CS_FX_TRANSPARENT (CS_MIXMODE_BLEND(ZERO, ONE) | CS_MIXMODE_ALPHATEST_DISABLE) |
Transparent blending (keep framebuffer unmodified). | |
Mix mode: alpha helpers | |
#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). | |
#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). | |
Mix mode: Alpha test flags | |
Enabled alpha test (or binary alpha) means that a fragment is only drawn when its alpha component is above a certain threshold, and discarded otherwise. | |
#define | CS_MIXMODE_ALPHATEST_AUTO (0x00000000) |
Automatic alpha test. | |
#define | CS_MIXMODE_ALPHATEST_DISABLE (0x20000000) |
Unconditionally disable alpha test. | |
#define | CS_MIXMODE_ALPHATEST_ENABLE (0x10000000) |
Unconditionally enable alpha test. | |
#define | CS_MIXMODE_ALPHATEST_MASK (0x30000000) |
Bit mask to extract the alpha test flag from a mixmode specifier. | |
Mix mode: Blending mode helpers | |
#define | CS_MIXMODE_BLEND(Src, Dst) |
Helper macro to construct a blending operation mixmode Src and Dst are blending op factors , however sans the CS_MIXMODE_FACT_ prefix. | |
#define | CS_MIXMODE_BLENDOP_DST(mode) ((mode >> 16) & CS_MIXMODE_FACT_MASK) |
Helper macro to extract the dstFactor from a blending op mixmode. | |
#define | CS_MIXMODE_BLENDOP_SRC(mode) ((mode >> 20) & CS_MIXMODE_FACT_MASK) |
Helper macro to extract the srcFactor from a blending op mixmode. | |
Mix mode: Types | |
The mix mode specifies how a shaded fragment (denoted as SRC ) is mixed (or blended) with the framebuffer fragment (DST ). | |
#define | CS_MIXMODE_TYPE_AUTO (0x00000000) |
Automatic blending mode. | |
#define | CS_MIXMODE_TYPE_BLENDOP (0x40000000) |
Blend with a blending operation. | |
#define | CS_MIXMODE_TYPE_MASK (0xc0000000) |
Bit mask to extract the type from a mixmode specifier. | |
#define | CS_MIXMODE_TYPE_MESH (0x80000000) |
Use the mix mode of the mesh mix mode. | |
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_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. | |
#define | CS_TEXTURE_SCALE_DOWN 0x00000100 |
Texture resizing control flag. | |
#define | CS_TEXTURE_SCALE_UP 0x00000080 |
Texture resizing control flag. | |
iGraphics3D::BeginDraw() flags | |
#define | CSDRAW_2DGRAPHICS 0x00000001 |
We're going to draw 2D graphics. | |
#define | CSDRAW_3DGRAPHICS 0x00000002 |
We're going to draw 3D graphics. | |
#define | CSDRAW_CLEARSCREEN 0x00000020 |
Clear frame buffer ? | |
#define | CSDRAW_CLEARZBUFFER 0x00000010 |
Clear Z-buffer ? | |
Defines | |
#define | CS_BUFFER_MAKE_MASKABLE(x) (1<<(x)) |
#define | CS_DEFMAT_AMBIENT 0.0f |
Default material `ambient' parameter. | |
#define | CS_DEFMAT_DIFFUSE 0.7f |
Default material `diffuse' parameter. | |
#define | CS_DEFMAT_REFLECTION 0.0f |
Default material `reflection' parameter. | |
#define | CS_MATERIAL_TEXTURE_DIFFUSE "tex diffuse" |
Name string for the material "diffuse" texture. | |
#define | CS_MATERIAL_VARNAME_AMBIENT "mat ambient" |
Name string for the material "ambient" shader var. | |
#define | CS_MATERIAL_VARNAME_DIFFUSE "mat diffuse" |
Name string for the material "diffuse" shader var. | |
#define | CS_MATERIAL_VARNAME_FLATCOLOR "mat flatcolor" |
Name string for the material "flat color" shader var. | |
#define | CS_MATERIAL_VARNAME_REFLECTION "mat reflection" |
Name string for the material "reflection" shader var. | |
#define | CS_VATTRIB_GENERIC_FIRST 100 |
#define | CS_VATTRIB_GENERIC_LAST (CS_VATTRIB_GENERIC_FIRST + 15) |
#define | CS_VATTRIB_IS_GENERIC(va) ((va >= CS_VATTRIB_GENERIC_FIRST) && (va <=CS_VATTRIB_GENERIC_LAST)) |
#define | CS_VATTRIB_IS_SPECIFIC(va) ((va >= CS_VATTRIB_SPECIFIC_FIRST) && (va <=CS_VATTRIB_SPECIFIC_LAST)) |
#define | CS_VATTRIB_SPECIFIC_FIRST 0 |
#define | CS_VATTRIB_SPECIFIC_LAST 15 |
Enumerations | |
enum | { CS_MIXMODE_FACT_ZERO = 0x0, CS_MIXMODE_FACT_ONE = 0x1, CS_MIXMODE_FACT_SRCCOLOR = 0x2, CS_MIXMODE_FACT_SRCCOLOR_INV = 0x3, CS_MIXMODE_FACT_DSTCOLOR = 0x4, CS_MIXMODE_FACT_DSTCOLOR_INV = 0x5, CS_MIXMODE_FACT_SRCALPHA = 0x6, CS_MIXMODE_FACT_SRCALPHA_INV = 0x7, CS_MIXMODE_FACT_DSTALPHA = 0x8, CS_MIXMODE_FACT_DSTALPHA_INV = 0x9, CS_MIXMODE_FACT_COUNT = 0xa, CS_MIXMODE_FACT_MASK = 0xf } |
Mix mode: Blending op factors. More... | |
enum | csRenderBufferComponentType |
Type of components. More... | |
enum | csRenderBufferLockType { , CS_BUF_LOCK_READ, CS_BUF_LOCK_NORMAL } |
Type of lock of a render buffer. More... | |
enum | csRenderBufferName { , CS_BUFFER_INDEX, CS_BUFFER_POSITION, CS_BUFFER_NORMAL, CS_BUFFER_COLOR, CS_BUFFER_COLOR_UNLIT, CS_BUFFER_TEXCOORD0, CS_BUFFER_TEXCOORD1, CS_BUFFER_TEXCOORD2, CS_BUFFER_TEXCOORD3, CS_BUFFER_TEXCOORD_LIGHTMAP, CS_BUFFER_GENERIC0, CS_BUFFER_GENERIC1, CS_BUFFER_GENERIC2, CS_BUFFER_GENERIC3, CS_BUFFER_TANGENT, CS_BUFFER_BINORMAL, CS_BUFFER_COUNT } |
Defines the names of the renderbuffers as provided by the meshes. More... | |
enum | csRenderBufferNameMask { CS_BUFFER_INDEX_MASK = 1 << CS_BUFFER_INDEX, CS_BUFFER_POSITION_MASK = 1 << CS_BUFFER_POSITION, CS_BUFFER_NORMAL_MASK = 1 << CS_BUFFER_NORMAL, CS_BUFFER_COLOR_MASK = 1 << CS_BUFFER_COLOR, CS_BUFFER_COLOR_LIGHTING_MASK = 1 << CS_BUFFER_COLOR_UNLIT, CS_BUFFER_TEXCOORD0_MASK = 1 << CS_BUFFER_TEXCOORD0, CS_BUFFER_TEXCOORD1_MASK = 1 << CS_BUFFER_TEXCOORD1, CS_BUFFER_TEXCOORD2_MASK = 1 << CS_BUFFER_TEXCOORD2, CS_BUFFER_TEXCOORD3_MASK = 1 << CS_BUFFER_TEXCOORD3, CS_BUFFER_TEXCOORD_LIGHTMAP_MASK = 1 << CS_BUFFER_TEXCOORD_LIGHTMAP, CS_BUFFER_GENERIC0_MASK = 1 << CS_BUFFER_GENERIC0, CS_BUFFER_GENERIC1_MASK = 1 << CS_BUFFER_GENERIC1, CS_BUFFER_GENERIC2_MASK = 1 << CS_BUFFER_GENERIC2, CS_BUFFER_GENERIC3_MASK = 1 << CS_BUFFER_GENERIC3, CS_BUFFER_TANGENT_MASK = 1 << CS_BUFFER_TANGENT, CS_BUFFER_BINORMAL_MASK = 1 << CS_BUFFER_BINORMAL, CS_BUFFER_ALL_MASK = ~0 } |
Masks for renderbuffer accessors. More... | |
enum | csRenderBufferType { CS_BUF_DYNAMIC, CS_BUF_STATIC, CS_BUF_STREAM } |
Buffer usage type. More... | |
enum | csVertexAttrib { CS_VATTRIB_INVALID = -1, CS_VATTRIB_POSITION = CS_VATTRIB_SPECIFIC_FIRST + 0, CS_VATTRIB_WEIGHT = CS_VATTRIB_SPECIFIC_FIRST + 1, CS_VATTRIB_NORMAL = CS_VATTRIB_SPECIFIC_FIRST + 2, CS_VATTRIB_COLOR = CS_VATTRIB_SPECIFIC_FIRST + 3, CS_VATTRIB_PRIMARY_COLOR = CS_VATTRIB_SPECIFIC_FIRST + 3, CS_VATTRIB_SECONDARY_COLOR = CS_VATTRIB_SPECIFIC_FIRST + 4, CS_VATTRIB_FOGCOORD = CS_VATTRIB_SPECIFIC_FIRST + 5, CS_VATTRIB_TEXCOORD = CS_VATTRIB_SPECIFIC_FIRST + 8, CS_VATTRIB_TEXCOORD0 = CS_VATTRIB_SPECIFIC_FIRST + 8, CS_VATTRIB_TEXCOORD1 = CS_VATTRIB_SPECIFIC_FIRST + 9, CS_VATTRIB_TEXCOORD2 = CS_VATTRIB_SPECIFIC_FIRST + 10, CS_VATTRIB_TEXCOORD3 = CS_VATTRIB_SPECIFIC_FIRST + 11, CS_VATTRIB_TEXCOORD4 = CS_VATTRIB_SPECIFIC_FIRST + 12, CS_VATTRIB_TEXCOORD5 = CS_VATTRIB_SPECIFIC_FIRST + 13, CS_VATTRIB_TEXCOORD6 = CS_VATTRIB_SPECIFIC_FIRST + 14, CS_VATTRIB_TEXCOORD7 = CS_VATTRIB_SPECIFIC_FIRST + 15, CS_VATTRIB_0 = CS_VATTRIB_GENERIC_FIRST + 0, CS_VATTRIB_1 = CS_VATTRIB_GENERIC_FIRST + 1, CS_VATTRIB_2 = CS_VATTRIB_GENERIC_FIRST + 2, CS_VATTRIB_3 = CS_VATTRIB_GENERIC_FIRST + 3, CS_VATTRIB_4 = CS_VATTRIB_GENERIC_FIRST + 4, CS_VATTRIB_5 = CS_VATTRIB_GENERIC_FIRST + 5, CS_VATTRIB_6 = CS_VATTRIB_GENERIC_FIRST + 6, CS_VATTRIB_7 = CS_VATTRIB_GENERIC_FIRST + 7, CS_VATTRIB_8 = CS_VATTRIB_GENERIC_FIRST + 8, CS_VATTRIB_9 = CS_VATTRIB_GENERIC_FIRST + 9, CS_VATTRIB_10 = CS_VATTRIB_GENERIC_FIRST + 10, CS_VATTRIB_11 = CS_VATTRIB_GENERIC_FIRST + 11, CS_VATTRIB_12 = CS_VATTRIB_GENERIC_FIRST + 12, CS_VATTRIB_13 = CS_VATTRIB_GENERIC_FIRST + 13, CS_VATTRIB_14 = CS_VATTRIB_GENERIC_FIRST + 14 } |
Vertex attributes. More... | |
enum | csZBufMode { CS_ZBUF_NONE = 0x00000000, CS_ZBUF_FILL = 0x00000001, CS_ZBUF_TEST = 0x00000002, CS_ZBUF_USE = 0x00000003, CS_ZBUF_EQUAL = 0x00000004, CS_ZBUF_INVERT = 0x00000005, CS_ZBUF_MESH = 0x80000000, CS_ZBUF_MESH2 = 0x80000001 } |
Z-buffer modes. More... | |
Variables | |
static const size_t | csRenderBufferComponentSizes [CS_BUFCOMP_TYPECOUNT] |
Sizes of individual buffer components in bytes. |
Define Documentation
|
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). |
|
No clipping required. (setting for clip_portal, clip_plane, or clip_z_plane). |
|
There is no clipper.
|
|
Clipper is optional.
|
|
Clipper is required.
|
|
Clipper is top-level.
|
|
Default material `ambient' parameter.
Definition at line 38 of file material.h. |
|
Default material `diffuse' parameter.
Definition at line 36 of file material.h. |
|
Default material `reflection' parameter.
Definition at line 40 of file material.h. |
|
Additive blending. Formula:
|
|
Alpha blending.
Formula:
|
|
This mixmode uses alpha smooth blending, binary blending (ie enabled alpha test) and no blending depending on the contents of csRenderMesh::alphaMode.
Definition at line 327 of file graph3d.h. Referenced by csRenderMeshModes::csRenderMeshModes(), and csMeshObject::GetMixMode(). |
|
Multiply source color with destination alpha and add.
Formula: |
|
Flat shading flag.
|
|
Mixmode alpha part. Values range from 0(opaque) to 255 (transparent) (note that this is the reverse of the "common" alpha meaning). When this part is non-null, the renderer will scale the incoming color buffer alpha components by the (inverse of) this value.
|
|
Bit mask for bits relevant to mix mode comparison; contains type, alpha test flags and blending op factors.
|
|
Use the mix mode of the mesh mix mode.
|
|
Multiplicative blending. Formula:
|
|
Multiplicative doubling blending. Formula:
|
|
Multiply destination color with inverse source alpha and add source color.
Formula:
|
|
Macro for setting of alpha bits into mixmode (alpha between 0 and 1).
Definition at line 403 of file graph3d.h. Referenced by csNewParticleSystem::SetAlpha(), and csParticleSystem::SetAlpha(). |
|
Macro for setting of alpha bits into mixmode (alpha between 0 and 255).
|
|
Multiply source color with source alpha and add.
Formula: |
|
Transparent blending (keep framebuffer unmodified).
Formula:
|
|
Name string for the material "diffuse" texture.
Definition at line 51 of file material.h. |
|
Name string for the material "ambient" shader var.
Definition at line 45 of file material.h. |
|
Name string for the material "diffuse" shader var.
Definition at line 43 of file material.h. |
|
Name string for the material "flat color" shader var.
Definition at line 49 of file material.h. |
|
Name string for the material "reflection" shader var.
Definition at line 47 of file material.h. |
|
Automatic alpha test. Whether the texture is alpha-blended binarily is taken from csRenderMesh::alphaMode and whether the alpha part of the mixmode is non-zero. |
|
Unconditionally disable alpha test.
|
|
Unconditionally enable alpha test.
|
|
Bit mask to extract the alpha test flag from a mixmode specifier.
|
|
Value: (CS_MIXMODE_TYPE_BLENDOP \ | (CS_MIXMODE_FACT_ ## Src << 20) | (CS_MIXMODE_FACT_ ## Dst << 16)) E.g.: uint mixmode = CS_MIXMODE_BLEND(SRCALPHA, SRCALPHA_INV); |
|
Helper macro to extract the
|
|
Helper macro to extract the
|
|
Automatic blending mode. Whether the texture is alpha-blended or not is taken from csRenderMesh::alphaMode and whether the alpha part of the mixmode is non-zero. |
|
Blend with a blending operation.
The fragment value written to the framebuffer is computed from the formula |
|
Bit mask to extract the type from a mixmode specifier.
|
|
Use the mix mode of the mesh mix mode.
|
|
You're going to use the texture for 2D drawing.
|
|
You're going to use the texture for 3D drawing.
|
|
This texture will not be tiled, and color lookups outside the 0. .1 range will be clamped to the edge of the texture. |
|
This texture will not be filtered, even if texture filtering is available.
|
|
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. |
|
Store texture as non-power-of-two sized (NPOTS) if possible.
|
|
Texture resizing control flag. If a texture needs to be resized to power-of-two dimensions (either because non-power-of-two textures are not supported or just not requested), specify that powers of two smaller than or equal to the original dimensions should be selected.
|
|
Texture resizing control flag. If a texture needs to be resized to power-of-two dimensions (either because non-power-of-two textures are not supported or just not requested), specify that powers of two larger than or equal to the original dimensions should be selected.
|
|
We're going to draw 2D graphics.
|
|
We're going to draw 3D graphics.
|
|
Clear frame buffer ?
|
|
Clear Z-buffer ?
|
Enumeration Type Documentation
|
|
Type of components.
|
|
Type of lock of a render buffer.
|
|
Defines the names of the renderbuffers as provided by the meshes.
|
|
Masks for renderbuffer accessors.
|
|
Buffer usage type. Drivers may do some optimizations based on this value. Use a type that most closely matches the intended use. |
|
Vertex attributes.
|
|
Z-buffer modes.
|
Variable Documentation
|
Initial value: { sizeof (char), sizeof (unsigned char), sizeof (short), sizeof (unsigned short), sizeof (int), sizeof (unsigned int), sizeof (float), sizeof (double) }
Definition at line 88 of file rndbuf.h. Referenced by csRenderBuffer::GetElementDistance(). |
Generated for Crystal Space by doxygen 1.4.6