Gizmo3D

gzState.h File Reference

Base definitions for state management (textures, materials etc.). More...

#include "gzObject.h"
#include "gzMatrix.h"
#include "gzTexture.h"
#include "gzMaterial.h"
#include "gzTexEnv.h"
#include "gzTexGen.h"
#include "gzShader.h"

Go to the source code of this file.

Classes

class  gzStateAttribute
 Stores internal information for gzState. More...
class  gzState
 Contains the state attributes for a gzNode. More...

Enumerations

enum  gzActionStage {
  GZ_ACTION_STAGE_TRAVERSE = -1, GZ_ACTION_STAGE_DEFAULT = 3, GZ_ACTION_STAGE_UNDERLAY = 0, GZ_ACTION_STAGE_FRONT_TO_BACK = 1,
  GZ_ACTION_STAGE_USER_1 = 2, GZ_ACTION_STAGE_SORTED_TEXTURE = 3, GZ_ACTION_STAGE_SORTED_NOFLIP_TEXTURE = 4, GZ_ACTION_STAGE_MULTIPASS_TEXTURE = 5,
  GZ_ACTION_STAGE_SCENE_GRAPH_ORDER = 6, GZ_ACTION_STAGE_USER_2 = 7, GZ_ACTION_STAGE_BACK_TO_FRONT = 8, GZ_ACTION_STAGE_USER_3 = 9,
  GZ_ACTION_STAGE_ALPHA_SORTED_TRANSPARENCY = 10, GZ_ACTION_STAGE_SEPARATE_ALPHA_HIGHQ = 11, GZ_ACTION_STAGE_SEPARATE_ALPHA = 12, GZ_ACTION_STAGE_USER_4 = 13,
  GZ_ACTION_STAGE_SHADOWED_TRANSPARENCY = 14, GZ_ACTION_STAGE_NO_DEPTH_UPDATE = 15, GZ_ACTION_STAGE_SHADOW = 16, GZ_ACTION_STAGE_TRANSPARENCY = 17,
  GZ_ACTION_STAGE_USER_5 = 18, GZ_ACTION_STAGE_OVERLAY = 19, GZ_ACTION_STAGE_COUNT = 20, GZ_ACTION_STAGE_PRE_RENDER = 21,
  GZ_ACTION_STAGE_POST_RENDER = 22
}
enum  gzStateModeActivation { GZ_STATE_ON, GZ_STATE_OFF, GZ_STATE_GLOBAL }
 Define how you want to change the state in a gzState object. The GZ_STATE_GLOBAL leaves it as the parent hierarchy has defined it. More...
enum  gzStateMode {
  GZ_STATE_EMPTY = 0, GZ_STATE_LINE_STIPPLE = (1 << 0), GZ_STATE_POLYGON_MODE = (1 << 1), GZ_STATE_BLENDING = (1 << 2),
  GZ_STATE_TEXTURE = (1 << 3), GZ_STATE_MATERIAL = (1 << 4), GZ_STATE_TEXENV = (1 << 5), GZ_STATE_TEXGEN = (1 << 6),
  GZ_STATE_POLYGON_OFFSET = (1 << 7), GZ_STATE_ACTION_STAGE = (1 << 8), GZ_STATE_GENERATE_DEBUG_INFO = (1 << 9), GZ_STATE_ALPHA_FUNC = (1 << 10),
  GZ_STATE_GFX_PROGRAM = (1 << 11)
}
 Various features you can turn on/off in a gzState. More...
enum  gzPolygonModeType { GZ_POLYGON_MODE_FILL, GZ_POLYGON_MODE_LINE, GZ_POLYGON_MODE_POINT, GZ_POLYGON_MODE_CULL }
 Various modes for polygon modes. More...
enum  gzStateBlendFactor {
  GZ_BLEND_ZERO = GZ_ZERO, GZ_BLEND_ONE = GZ_ONE, GZ_BLEND_DST_COLOR = GZ_DST_COLOR, GZ_BLEND_SRC_COLOR = GZ_SRC_COLOR,
  GZ_BLEND_ONE_MINUS_DST_COLOR = GZ_ONE_MINUS_DST_COLOR, GZ_BLEND_ONE_MINUS_SRC_COLOR = GZ_ONE_MINUS_SRC_COLOR, GZ_BLEND_SRC_ALPHA = GZ_SRC_ALPHA, GZ_BLEND_ONE_MINUS_SRC_ALPHA = GZ_ONE_MINUS_SRC_ALPHA,
  GZ_BLEND_DST_ALPHA = GZ_DST_ALPHA, GZ_BLEND_ONE_MINUS_DST_ALPHA = GZ_ONE_MINUS_DST_ALPHA, GZ_BLEND_SRC_ALPHA_SATURATE = GZ_SRC_ALPHA_SATURATE
}
 A default set of blending factors. More...
enum  gzAlphaFuncFactor {
  GZ_ALPHA_FUNC_NEVER = GZ_NEVER, GZ_ALPHA_FUNC_ALWAYS = GZ_ALWAYS, GZ_ALPHA_FUNC_LESS = GZ_LESS, GZ_ALPHA_FUNC_LEQUAL = GZ_LEQUAL,
  GZ_ALPHA_FUNC_EQUAL = GZ_EQUAL, GZ_ALPHA_FUNC_GEQUAL = GZ_GEQUAL, GZ_ALPHA_FUNC_GREATER = GZ_GREATER, GZ_ALPHA_FUNC_NOTEQUAL = GZ_NOTEQUAL
}
 A defualt set of alpha functions. More...
enum  gzPolyOffsetMode { GZ_POLYGON_OFFSET_FILL_MODE = GZ_POLYGON_OFFSET_FILL, GZ_POLYGON_OFFSET_LINE_MODE = GZ_POLYGON_OFFSET_LINE, GZ_POLYGON_OFFSET_POINT_MODE = GZ_POLYGON_OFFSET_POINT }
enum  gzStateDebugMode { GZ_STATE_DEBUG_OFF = 0, GZ_STATE_DEBUG_SHOW_NORMALS = (1<<0), GZ_STATE_DEBUG_SHOW_BSPHERE = (1<<1), GZ_STATE_DEBUG_COLLECT_STATS = (1<<2) }
 Bitwize flags to enable various debugging features. More...

Functions

 GZ_USE_BIT_LOGIC (gzStateMode)
 GZ_USE_BIT_LOGIC (gzStateDebugMode)
gzString gzGraphicsStats (gzContext *context)
 Creates a debug output string of the collected statistics in the context.
 GZ_DECLARE_REFPTR (gzState)


Detailed Description

Base definitions for state management (textures, materials etc.).

Definition in file gzState.h.


Enumeration Type Documentation

enum gzActionStage
 

Definitions of the various stages a render does. You can select the rendering state with a gzState

Enumerator:
GZ_ACTION_STAGE_TRAVERSE  Special Traverse stage, no rendering.
GZ_ACTION_STAGE_DEFAULT  Defines the default rendering stage.
GZ_ACTION_STAGE_UNDERLAY  First stage, Scene Graph Order.
GZ_ACTION_STAGE_FRONT_TO_BACK  Sorts in depth.
GZ_ACTION_STAGE_USER_1  User available.
GZ_ACTION_STAGE_SORTED_TEXTURE  sorts in textures
GZ_ACTION_STAGE_SORTED_NOFLIP_TEXTURE  sorts in textures but without flip texture order
GZ_ACTION_STAGE_MULTIPASS_TEXTURE  additive multitexture pass
GZ_ACTION_STAGE_SCENE_GRAPH_ORDER  renders according to scene graph order
GZ_ACTION_STAGE_USER_2  User avail.
GZ_ACTION_STAGE_BACK_TO_FRONT  sorts in depth with Z buffer
GZ_ACTION_STAGE_USER_3  User avail.
GZ_ACTION_STAGE_ALPHA_SORTED_TRANSPARENCY  sorted transparency using alpha as sort
GZ_ACTION_STAGE_SEPARATE_ALPHA_HIGHQ  four pass, non sorted sorted transparency using separate 4 pass alpha
GZ_ACTION_STAGE_SEPARATE_ALPHA  two pass, non sorted sorted transparency using separate 2 pass alpha
GZ_ACTION_STAGE_USER_4  User avail.
GZ_ACTION_STAGE_SHADOWED_TRANSPARENCY  sorted transparency in depth back to front, shadowed
GZ_ACTION_STAGE_NO_DEPTH_UPDATE  non sorted transparency without depth update
GZ_ACTION_STAGE_SHADOW  late rendering, after all normal passes
GZ_ACTION_STAGE_TRANSPARENCY  sorted transparency in depth back to front
GZ_ACTION_STAGE_USER_5  User avail.
GZ_ACTION_STAGE_OVERLAY  overlay, no depth cull, Scene graph order
GZ_ACTION_STAGE_COUNT  How many stages... dont use..
GZ_ACTION_STAGE_PRE_RENDER  Stage in preRender.
GZ_ACTION_STAGE_POST_RENDER  Stage in postRender.

Definition at line 32 of file gzState.h.

enum gzAlphaFuncFactor
 

A defualt set of alpha functions.

Enumerator:
GZ_ALPHA_FUNC_NEVER  The fragment is never accepted.
GZ_ALPHA_FUNC_ALWAYS  The fragment is always accepted.
GZ_ALPHA_FUNC_LESS  True if fragment alpha < reference alpha.
GZ_ALPHA_FUNC_LEQUAL  True if fragment alpha = reference alpha.
GZ_ALPHA_FUNC_EQUAL  True if fragment alpha = reference alpha.
GZ_ALPHA_FUNC_GEQUAL  True if fragment alpha = reference alpha.
GZ_ALPHA_FUNC_GREATER  True if fragment alpha > reference alpha.
GZ_ALPHA_FUNC_NOTEQUAL  True if fragment alpha ? reference alpha.

Definition at line 120 of file gzState.h.

enum gzPolygonModeType
 

Various modes for polygon modes.

Enumerator:
GZ_POLYGON_MODE_FILL  Enable filled polygons (Default).
GZ_POLYGON_MODE_LINE  The polygons are drawn using lines between vertices.
GZ_POLYGON_MODE_POINT  The polygons are drawn using points for each vertex.
GZ_POLYGON_MODE_CULL  The polygons are not drawn.

Definition at line 95 of file gzState.h.

enum gzPolyOffsetMode
 

Enumerator:
GZ_POLYGON_OFFSET_FILL_MODE  Enables polygon offset for filled surfaces.
GZ_POLYGON_OFFSET_LINE_MODE  Enables polygon offset for lines.
GZ_POLYGON_OFFSET_POINT_MODE  Enables polygon offset for points.

Definition at line 132 of file gzState.h.

enum gzStateBlendFactor
 

A default set of blending factors.

Enumerator:
GZ_BLEND_ZERO  RGBA blend factor = (0, 0, 0, 0).
GZ_BLEND_ONE  RGBA blend factor = (1, 1, 1, 1).
GZ_BLEND_DST_COLOR  RGBA blend factor = (R_destination, G_destination, B_destination, A_destination).
GZ_BLEND_SRC_COLOR  RGBA blend factor = (R_source, G_source, B_source, A_source).
GZ_BLEND_ONE_MINUS_DST_COLOR  RGBA blend factor = (1-R_destination, 1-R_destination, 1-R_destination, 1-R_destination).
GZ_BLEND_ONE_MINUS_SRC_COLOR  RGBA blend factor = (1-R_source, 1-G_source, 1-B_source, 1-A_source).
GZ_BLEND_SRC_ALPHA  RGBA blend factor = (A_source, A_source, A_source, A_source).
GZ_BLEND_ONE_MINUS_SRC_ALPHA  RGBA blend factor = (1-A_source, 1-A_source, 1-A_source, 1-A_source).
GZ_BLEND_DST_ALPHA  RGBA blend factor = (A_destination, A_destination, A_destination, A_destination).
GZ_BLEND_ONE_MINUS_DST_ALPHA  RGBA blend factor = (1-A_destination, 1-A_destination, 1-A_destination, 1-A_destination).
GZ_BLEND_SRC_ALPHA_SATURATE  RGBA blend factor = (min(A_source, 1-A_destination), min(A_source, 1-A_destination), min(A_source, 1-A_destination), 1).

Definition at line 104 of file gzState.h.

enum gzStateDebugMode
 

Bitwize flags to enable various debugging features.

Enumerator:
GZ_STATE_DEBUG_OFF  Disable debug information.
GZ_STATE_DEBUG_SHOW_NORMALS  Normals is visible.
GZ_STATE_DEBUG_SHOW_BSPHERE  Bounding spheres is visible.
GZ_STATE_DEBUG_COLLECT_STATS  Collect number of drawn primitives during the rendering.

Definition at line 140 of file gzState.h.

enum gzStateMode
 

Various features you can turn on/off in a gzState.

Enumerator:
GZ_STATE_EMPTY 
GZ_STATE_LINE_STIPPLE  Enable line stipple parameters.
GZ_STATE_POLYGON_MODE  Enable polygon mode parameters.
GZ_STATE_BLENDING  Enable blending parameters.
GZ_STATE_TEXTURE  Enable textures.
GZ_STATE_MATERIAL  Enable materials.
GZ_STATE_TEXENV  Enable texture environment.
GZ_STATE_TEXGEN  Enable texture coord generation.
GZ_STATE_POLYGON_OFFSET  Enable polygon offset.
GZ_STATE_ACTION_STAGE  Set active rendering stage.
GZ_STATE_GENERATE_DEBUG_INFO  Generate debug info.
GZ_STATE_ALPHA_FUNC  Enable alpha func.
GZ_STATE_GFX_PROGRAM  Enable GFX Programs.

Definition at line 75 of file gzState.h.

enum gzStateModeActivation
 

Define how you want to change the state in a gzState object. The GZ_STATE_GLOBAL leaves it as the parent hierarchy has defined it.

Enumerator:
GZ_STATE_ON 
GZ_STATE_OFF 
GZ_STATE_GLOBAL 

Definition at line 61 of file gzState.h.


Function Documentation

GZ_DECLARE_REFPTR gzState   ) 
 

GZ_USE_BIT_LOGIC gzStateDebugMode   ) 
 

GZ_USE_BIT_LOGIC gzStateMode   ) 
 

gzString gzGraphicsStats gzContext context  ) 
 

Creates a debug output string of the collected statistics in the context.

Examples:
dbviewer.cpp, and tree.cpp.


Documentation for Gizmo3D generated at Wed Feb 20 11:54:14 2008 by   Saab Training Systems AB, ¸ (c) 2003-and beyond