Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
updatestatetable.cc File Reference
Include dependency graph for updatestatetable.cc:

Go to the source code of this file.

Namespaces

 ion
 Copyright 2016 Google Inc.
 
 ion::gfx
 

Macros

#define ION_GET_ENUM(st_type, gl_enum)   GetEnum<StateTable::st_type>(gm, gl_enum)
 For brevity and clarity in the below functions. More...
 
#define ION_IS_SAME(func)   st->func == default_st.func
 
#define ION_RESET(condition, value_enum)
 
#define ION_RESET1(value_enum, func)   ION_RESET(ION_IS_SAME(func), value_enum)
 
#define ION_RESET2(value_enum, func1, func2)   ION_RESET(ION_IS_SAME(func1) && ION_IS_SAME(func2), value_enum)
 
#define ION_RESET4(value_enum, func1, func2, func3, func4)
 
#define ION_RESET6(value_enum, func1, func2, func3, func4, func5, func6)
 
#define ION_UPDATE_CLEAR_VALUE(enum_name, update_func)
 
#define ION_UPDATE_CLEAR_ONLY_VALUE(enum_name, clear_enum_name, update_func)
 
#define ION_UPDATE_VALUE(enum_name, update_func)
 

Functions

void ion::gfx::UpdateStateTable (int default_width, int default_height, GraphicsManager *gm, StateTable *st)
 Public functions. More...
 
void ion::gfx::ClearFromStateTable (const StateTable &new_state, StateTable *save_state, GraphicsManager *gm)
 This internal function can be used to update the Clear()-related OpenGL state (dithering, scissor test, write masks, scissor box, and clear values) managed by a GraphicsManager to match a StateTable, and updates save_state to contain the new state. More...
 
void ion::gfx::UpdateSettingsInStateTable (StateTable *st, GraphicsManager *gm)
 This internal function can be used to update a StateTable instance to match the current OpenGL settings as provided by a GraphicsManager instance. More...
 
void ion::gfx::UpdateFromStateTable (const StateTable &new_state, StateTable *save_state, GraphicsManager *gm)
 This internal function can be used to update the OpenGL state managed by a GraphicsManager to match a StateTable, with respect to another StateTable that contains the current state. More...
 

Macro Definition Documentation

#define ION_GET_ENUM (   st_type,
  gl_enum 
)    GetEnum<StateTable::st_type>(gm, gl_enum)

For brevity and clarity in the below functions.

Definition at line 456 of file updatestatetable.cc.

#define ION_IS_SAME (   func)    st->func == default_st.func
#define ION_RESET (   condition,
  value_enum 
)
Value:
if (condition) \
st->ResetValue(StateTable::value_enum)
#define ION_RESET1 (   value_enum,
  func 
)    ION_RESET(ION_IS_SAME(func), value_enum)
#define ION_RESET2 (   value_enum,
  func1,
  func2 
)    ION_RESET(ION_IS_SAME(func1) && ION_IS_SAME(func2), value_enum)
#define ION_RESET4 (   value_enum,
  func1,
  func2,
  func3,
  func4 
)
Value:
ION_RESET(ION_IS_SAME(func1) && ION_IS_SAME(func2) && \
ION_IS_SAME(func3) && ION_IS_SAME(func4), value_enum)
#define ION_RESET(condition, value_enum)
#define ION_IS_SAME(func)
#define ION_RESET6 (   value_enum,
  func1,
  func2,
  func3,
  func4,
  func5,
  func6 
)
Value:
ION_RESET(ION_IS_SAME(func1) && ION_IS_SAME(func2) && \
ION_IS_SAME(func3) && ION_IS_SAME(func4) && \
ION_IS_SAME(func5) && ION_IS_SAME(func6), value_enum)
#define ION_RESET(condition, value_enum)
#define ION_IS_SAME(func)
#define ION_UPDATE_CLEAR_ONLY_VALUE (   enum_name,
  clear_enum_name,
  update_func 
)
Value:
if (new_state.IsValueSet(StateTable::enum_name) && \
new_state.IsValueSet(StateTable::clear_enum_name)) \
update_func(save_state, new_state, gm)

Definition at line 706 of file updatestatetable.cc.

Referenced by ion::gfx::ClearFromStateTable().

#define ION_UPDATE_CLEAR_VALUE (   enum_name,
  update_func 
)
Value:
if (new_state.IsValueSet(StateTable::enum_name)) \
update_func(save_state, new_state, gm)

Definition at line 703 of file updatestatetable.cc.

Referenced by ion::gfx::ClearFromStateTable(), and ion::gfx::UpdateFromStateTable().

#define ION_UPDATE_VALUE (   enum_name,
  update_func 
)
Value:
if (new_state.IsValueSet(StateTable::enum_name)) \
update_func(*save_state, new_state, gm)

Definition at line 710 of file updatestatetable.cc.

Referenced by ion::gfx::UpdateFromStateTable().