sio2_state.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SIO2state

Enumerations

enum  SIO2_STATE_FLAGS {
  SIO2_FOG = ( 1 << 0 ), SIO2_BLEND = ( 1 << 1 ), SIO2_ALPHA_TEST = ( 1 << 2 ), SIO2_TEXTURE_2D0 = ( 1 << 3 ),
  SIO2_TEXTURE_2D1 = ( 1 << 4 ), SIO2_COLOR_MATERIAL = ( 1 << 5 ), SIO2_LIGHTING = ( 1 << 6 ), SIO2_NORMALIZE = ( 1 << 7 ),
  SIO2_POINT_SPRITE = ( 1 << 8 ), SIO2_POINT_SIZE_ARRAY = ( 1 << 9 ), SIO2_VERTEX_ARRAY = ( 1 << 10 ), SIO2_COLOR_ARRAY = ( 1 << 11 ),
  SIO2_NORMAL_ARRAY = ( 1 << 12 ), SIO2_TEXTURE_COORD_ARRAY0 = ( 1 << 13 ), SIO2_TEXTURE_COORD_ARRAY1 = ( 1 << 14 ), SIO2_DEPTH_TEST = ( 1 << 15 ),
  SIO2_CULL_FACE = ( 1 << 16 )
}

Functions

SIO2statesio2StateInit (void)
SIO2statesio2StateFree (SIO2state *)
unsigned char sio2StateEnable (SIO2state *, unsigned int)
unsigned char sio2StateDisable (SIO2state *, unsigned int)
unsigned char sio2StateSetActiveTexture (SIO2state *, int)
unsigned char sio2StateSetClientActiveTexture (SIO2state *, int)
unsigned char sio2StateSetBlendMode (SIO2state *, unsigned char)
unsigned char sio2StateSetAlphaFunc (SIO2state *, int, float)
unsigned char sio2StateSetColor (SIO2state *, vec4 *)


Enumeration Type Documentation

Enumerator:
SIO2_FOG  Value used to keep track of the OpenGL fog state.
SIO2_BLEND  Value used to keep track of the OpenGL blending state.
SIO2_ALPHA_TEST  Value used to keep track of the OpenGL alpha test state.
SIO2_TEXTURE_2D0  Value used to keep track of the OpenGL GL_TEXTURE2D on the first active client texture state.
SIO2_TEXTURE_2D1  Value used to keep track of the OpenGL GL_TEXTURE2D on the second active client texture state.
SIO2_COLOR_MATERIAL  Value used to keep track of the OpenGL GL_COLOR_MATERIAL state.
SIO2_LIGHTING  Value used to keep track of the OpenGL GL_LIGHTING state.
SIO2_NORMALIZE  Value used to keep track of the OpenGL GL_NORMALIZE when GL_LIGHTING is ON.
SIO2_POINT_SPRITE  Value used to keep track of the OpenGL point sprite.
SIO2_POINT_SIZE_ARRAY  Value used to keep track of the OpenGL point sprite size array is on.
SIO2_VERTEX_ARRAY  Value used to keep track of the OpenGL client vertex array.
SIO2_COLOR_ARRAY  Value used to keep track of the OpenGL client color array.
SIO2_NORMAL_ARRAY  Value used to keep track of the OpenGL client normal array.
SIO2_TEXTURE_COORD_ARRAY0  Value used to keep track of the OpenGL texture coordinate on the first channnel is on.
SIO2_TEXTURE_COORD_ARRAY1  Value used to keep track of the OpenGL texture coordinate on the second channnel is on.
SIO2_DEPTH_TEST  Value used to keep track of the OpenGL depth test.
SIO2_CULL_FACE  Value used to keep track of the OpenGL cull face.


Function Documentation

unsigned char sio2StateDisable ( SIO2state _SIO2state,
unsigned int  _mask 
)

unsigned char sio2StateEnable ( SIO2state _SIO2state,
unsigned int  _mask 
)

SIO2state* sio2StateFree ( SIO2state _SIO2state  ) 

Free a valid SIO2state.

_SIO2state: A valid SIO2state handle.

return a NULL SIO2state pointer.

SIO2state* sio2StateInit ( void   ) 

Initialize a plain SIO2state, using the default value that SIO2 is using.

return a new SIO2state handle.

unsigned char sio2StateSetActiveTexture ( SIO2state _SIO2state,
int  _texture 
)

Set the active texture channel.

_SIO2state: A valid SIO2state pointer.
_texture: The active texture to change to.

return 1 or 0 is the state have been changed.

References SIO2state::a_texture.

Referenced by sio2StateDisable(), and sio2StateEnable().

unsigned char sio2StateSetAlphaFunc ( SIO2state _SIO2state,
int  _mode,
float  _v 
)

Change the current alpha tested value.

_SIO2state: A valid SIO2state pointer.
_mode: A valid OpenGL test mode. ex: GL_GREATER _v: The value to use for the alpha test.

return 1 or 0 if the blend mode have been changed.

References SIO2state::alpha_value.

Referenced by sio2MaterialRender().

unsigned char sio2StateSetBlendMode ( SIO2state _SIO2state,
unsigned char  _blend 
)

Change the current blend mode.

_SIO2state: A valid SIO2state pointer.
_blend: The blend mode to change to.

return 1 or 0 if the blend mode have been changed.

References SIO2state::blend, SIO2_MATERIAL_ADD, SIO2_MATERIAL_COLOR, SIO2_MATERIAL_DIFFERENCE, SIO2_MATERIAL_DIVIDE, SIO2_MATERIAL_MULTIPLY, SIO2_MATERIAL_SCREEN, SIO2_MATERIAL_SUBTRACT, and SIO2_MATERIAL_VALUE.

Referenced by sio2MaterialRender(), and sio2MaterialReset().

unsigned char sio2StateSetClientActiveTexture ( SIO2state _SIO2state,
int  _texture 
)

Set the client active texture channel.

_SIO2state: A valid SIO2state pointer.
_texture: The active texture to change to.

return 1 or 0 is the state have been changed.

References SIO2state::c_texture.

Referenced by sio2StateDisable(), and sio2StateEnable().

unsigned char sio2StateSetColor ( SIO2state _SIO2state,
vec4 _col 
)

Change the current OpenGL pencil color.

_SIO2state: A valid SIO2state pointer.
_col: The color to change it for.

return 1 or 0 if the blend mode have been changed.

References SIO2state::col, vec4::w, vec4::x, vec4::y, and vec4::z.

Referenced by sio2MaterialRender(), sio2MaterialReset(), and sio2WidgetDebug().


Generated on Thu Mar 4 15:41:50 2010 for SIO2 Engine by  doxygen 1.5.6