Function bgfx_sys::bgfx_set_state
source · pub unsafe extern "C" fn bgfx_set_state(_state: u64, _rgba: u32)
Expand description
Set render states for draw primitive. @remarks
- To set up more complex states use:
BGFX_STATE_ALPHA_REF(_ref)
,BGFX_STATE_POINT_SIZE(_size)
,BGFX_STATE_BLEND_FUNC(_src, _dst)
,BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)
,BGFX_STATE_BLEND_EQUATION(_equation)
,BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)
BGFX_STATE_BLEND_EQUATION_ADD
is set when no other blend equation is specified.
@param[in] _state State flags. Default state for primitive type is
triangles. See: BGFX_STATE_DEFAULT
.
BGFX_STATE_DEPTH_TEST_*
- Depth test function.BGFX_STATE_BLEND_*
- See remark 1 about BGFX_STATE_BLEND_FUNC.BGFX_STATE_BLEND_EQUATION_*
- See remark 2.BGFX_STATE_CULL_*
- Backface culling mode.BGFX_STATE_WRITE_*
- Enable R, G, B, A or Z write.BGFX_STATE_MSAA
- Enable hardware multisample antialiasing.BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]
- Primitive type. @param[in] _rgba Sets blend factor used byBGFX_STATE_BLEND_FACTOR
andBGFX_STATE_BLEND_INV_FACTOR
blend modes.