Euphoria
eu::render::StateChanger Struct Reference

A helper class to change both the opengl state and the cache. More...

Public Member Functions

 StateChanger (State *s)
StateChangercull_face (bool new_state)
StateChangerblending (bool new_state)
StateChangerdepth_test (bool new_state)
StateChangerdepth_mask (bool new_state)
StateChangerdepth_func (Compare new_state)
StateChangerstencil_test (bool new_state)
StateChangerstencil_mask (u32 new_state)
 Set a bitmask that is ANDed with the stencil value about to be written to the buffer.
StateChangerstencil_func (Compare func, i32 ref, u32 mask)
StateChangerrender_mode (RenderMode new_state)
StateChangerstencil_op (StencilAction stencil_fail, StencilAction depth_fail, StencilAction pass)
StateChangercull_face_mode (CullFace new_state)
StateChangerblend_mode (Blend src, Blend dst)
StateChangeractivate_texture (int new_texture)
StateChangerbind_texture_2d (int slot, unsigned int texture)
StateChangerbind_texture_cubemap (int slot, unsigned int texture)

Public Attributes

Statestates

Detailed Description

A helper class to change both the opengl state and the cache.

Definition at line 147 of file state.h.

Constructor & Destructor Documentation

◆ StateChanger()

eu::render::StateChanger::StateChanger ( State * s)
explicit

Member Function Documentation

◆ activate_texture()

StateChanger & eu::render::StateChanger::activate_texture ( int new_texture)

◆ bind_texture_2d()

StateChanger & eu::render::StateChanger::bind_texture_2d ( int slot,
unsigned int texture )

◆ bind_texture_cubemap()

StateChanger & eu::render::StateChanger::bind_texture_cubemap ( int slot,
unsigned int texture )

◆ blend_mode()

StateChanger & eu::render::StateChanger::blend_mode ( Blend src,
Blend dst )

◆ blending()

StateChanger & eu::render::StateChanger::blending ( bool new_state)

◆ cull_face()

StateChanger & eu::render::StateChanger::cull_face ( bool new_state)

◆ cull_face_mode()

StateChanger & eu::render::StateChanger::cull_face_mode ( CullFace new_state)

◆ depth_func()

StateChanger & eu::render::StateChanger::depth_func ( Compare new_state)

◆ depth_mask()

StateChanger & eu::render::StateChanger::depth_mask ( bool new_state)

◆ depth_test()

StateChanger & eu::render::StateChanger::depth_test ( bool new_state)

◆ render_mode()

StateChanger & eu::render::StateChanger::render_mode ( RenderMode new_state)

◆ stencil_func()

StateChanger & eu::render::StateChanger::stencil_func ( Compare func,
i32 ref,
u32 mask )
Parameters
functhe stencil test function that determines whether a fragment passes or is discarded. This test function is applied to the stored stencil value and the ref value.
refthe reference value for the stencil test. The stencil buffer's content is compared to this value.
maskthe mask that is ANDed with both the reference value and the stored stencil value before the test compares them.

◆ stencil_mask()

StateChanger & eu::render::StateChanger::stencil_mask ( u32 new_state)

Set a bitmask that is ANDed with the stencil value about to be written to the buffer.

◆ stencil_op()

StateChanger & eu::render::StateChanger::stencil_op ( StencilAction stencil_fail,
StencilAction depth_fail,
StencilAction pass )
Parameters
stencil_failaction to take if the stencil test fails.
depth_failaction to take if the stencil test passes, but the depth test fails.
passaction to take if both the stencil and the depth test pass.

◆ stencil_test()

StateChanger & eu::render::StateChanger::stencil_test ( bool new_state)

Member Data Documentation

◆ states

State* eu::render::StateChanger::states

Definition at line 149 of file state.h.


The documentation for this struct was generated from the following file: