Macros
MK_DISCARD_ALLdefine
Constant for discard all.
MK_DISCARD_BINDINGSdefine
Constant for discard bindings.
MK_DISCARD_INDEX_BUFFERdefine
Constant for discard index buffer.
MK_DISCARD_INSTANCE_DATAdefine
Constant for discard instance data.
MK_DISCARD_NONEdefine
Constant for discard none.
MK_DISCARD_STATEdefine
Constant for discard state.
Constant for discard transform.
MK_DISCARD_VERTEX_STREAMSdefine
MK_DISCARD_VERTEX_STREAMS
Constant for discard vertex streams.
MK_STATE_BLEND_ADDdefine
Constant for state blend add.
MK_STATE_BLEND_ALPHAdefine
Constant for state blend alpha.
MK_STATE_BLEND_DST_ALPHAdefine
Constant for state blend dst alpha.
MK_STATE_BLEND_DST_COLORdefine
Constant for state blend dst color.
MK_STATE_BLEND_FUNCdefine
MK_STATE_BLEND_FUNC(src, dst)
Constant for state blend func.
MK_STATE_BLEND_FUNC_SEPARATEdefine
MK_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)
Constant for state blend func separate.
MK_STATE_BLEND_INV_DST_ALPHAdefine
MK_STATE_BLEND_INV_DST_ALPHA
Constant for state blend inv dst alpha.
MK_STATE_BLEND_INV_DST_COLORdefine
MK_STATE_BLEND_INV_DST_COLOR
Constant for state blend inv dst color.
MK_STATE_BLEND_INV_SRC_ALPHAdefine
MK_STATE_BLEND_INV_SRC_ALPHA
Constant for state blend inv src alpha.
MK_STATE_BLEND_INV_SRC_COLORdefine
MK_STATE_BLEND_INV_SRC_COLOR
Constant for state blend inv src color.
MK_STATE_BLEND_ONEdefine
Constant for state blend one.
MK_STATE_BLEND_SRC_ALPHAdefine
Constant for state blend src alpha.
MK_STATE_BLEND_SRC_ALPHA_SATdefine
MK_STATE_BLEND_SRC_ALPHA_SAT
Constant for state blend src alpha sat.
MK_STATE_BLEND_SRC_COLORdefine
Constant for state blend src color.
MK_STATE_BLEND_ZEROdefine
Constant for state blend zero.
MK_STATE_CULL_CCWdefine
Constant for state cull ccw.
MK_STATE_CULL_CWdefine
Constant for state cull cw.
MK_STATE_DEFAULTdefine
Constant for state default.
MK_STATE_DEFAULT_2Ddefine
Constant for state default 2D.
MK_STATE_DEFAULT_BLENDdefine
Constant for state default blend.
MK_STATE_DEPTH_TEST_ALWAYSdefine
MK_STATE_DEPTH_TEST_ALWAYS
Constant for state depth test always.
MK_STATE_DEPTH_TEST_EQUALdefine
MK_STATE_DEPTH_TEST_EQUAL
Constant for state depth test equal.
MK_STATE_DEPTH_TEST_GEQUALdefine
MK_STATE_DEPTH_TEST_GEQUAL
Constant for state depth test gequal.
MK_STATE_DEPTH_TEST_GREATERdefine
MK_STATE_DEPTH_TEST_GREATER
Constant for state depth test greater.
MK_STATE_DEPTH_TEST_LEQUALdefine
MK_STATE_DEPTH_TEST_LEQUAL
Constant for state depth test lequal.
MK_STATE_DEPTH_TEST_LESSdefine
Constant for state depth test less.
MK_STATE_DEPTH_TEST_NEVERdefine
MK_STATE_DEPTH_TEST_NEVER
Constant for state depth test never.
MK_STATE_DEPTH_TEST_NOTEQUALdefine
MK_STATE_DEPTH_TEST_NOTEQUAL
Constant for state depth test notequal.
MK_STATE_FRONT_CCWdefine
Constant for state front ccw.
MK_STATE_MSAAdefine
Constant for state msaa.
MK_STATE_PT_LINESdefine
Constant for state pt lines.
MK_STATE_PT_LINESTRIPdefine
Constant for state pt linestrip.
MK_STATE_PT_POINTSdefine
Constant for state pt points.
MK_STATE_PT_TRISTRIPdefine
Constant for state pt tristrip.
MK_STATE_WRITE_Adefine
Constant for state write a.
MK_STATE_WRITE_Bdefine
Constant for state write b.
MK_STATE_WRITE_Gdefine
Constant for state write g.
MK_STATE_WRITE_MASKdefine
Constant for state write mask.
MK_STATE_WRITE_Rdefine
Constant for state write r.
MK_STATE_WRITE_RGBdefine
Constant for state write rgb.
MK_STATE_WRITE_Zdefine
Constant for state write z.
MK_STENCIL_FUNC_REFdefine
Constant for stencil func ref.
MK_STENCIL_FUNC_RMASKdefine
Stencil read/compare mask.
Since bgfx 2026-07 this byte is also the stencil WRITE mask, so passing 0 disables stencil writes entirely. Use 0xff (or MK_STENCIL_NONE) when you only mean "compare against everything".
MK_STENCIL_FUNC_WMASKdefine
Alias making the dual read/write role of the mask byte explicit.
MK_STENCIL_NONEdefine
Constant for stencil none.
MK_STENCIL_OP_FAIL_S_DECRdefine
MK_STENCIL_OP_FAIL_S_DECR
Constant for stencil op fail s decr.
MK_STENCIL_OP_FAIL_S_DECRSATdefine
MK_STENCIL_OP_FAIL_S_DECRSAT
Constant for stencil op fail s decrsat.
MK_STENCIL_OP_FAIL_S_INCRdefine
MK_STENCIL_OP_FAIL_S_INCR
Constant for stencil op fail s incr.
MK_STENCIL_OP_FAIL_S_INCRSATdefine
MK_STENCIL_OP_FAIL_S_INCRSAT
Constant for stencil op fail s incrsat.
MK_STENCIL_OP_FAIL_S_INVERTdefine
MK_STENCIL_OP_FAIL_S_INVERT
Constant for stencil op fail s invert.
MK_STENCIL_OP_FAIL_S_KEEPdefine
MK_STENCIL_OP_FAIL_S_KEEP
Constant for stencil op fail s keep.
MK_STENCIL_OP_FAIL_S_REPLACEdefine
MK_STENCIL_OP_FAIL_S_REPLACE
Constant for stencil op fail s replace.
MK_STENCIL_OP_FAIL_S_ZEROdefine
MK_STENCIL_OP_FAIL_S_ZERO
Constant for stencil op fail s zero.
MK_STENCIL_OP_FAIL_Z_DECRdefine
MK_STENCIL_OP_FAIL_Z_DECR
Constant for stencil op fail z decr.
MK_STENCIL_OP_FAIL_Z_DECRSATdefine
MK_STENCIL_OP_FAIL_Z_DECRSAT
Constant for stencil op fail z decrsat.
MK_STENCIL_OP_FAIL_Z_INCRdefine
MK_STENCIL_OP_FAIL_Z_INCR
Constant for stencil op fail z incr.
MK_STENCIL_OP_FAIL_Z_INCRSATdefine
MK_STENCIL_OP_FAIL_Z_INCRSAT
Constant for stencil op fail z incrsat.
MK_STENCIL_OP_FAIL_Z_INVERTdefine
MK_STENCIL_OP_FAIL_Z_INVERT
Constant for stencil op fail z invert.
MK_STENCIL_OP_FAIL_Z_KEEPdefine
MK_STENCIL_OP_FAIL_Z_KEEP
Constant for stencil op fail z keep.
MK_STENCIL_OP_FAIL_Z_REPLACEdefine
MK_STENCIL_OP_FAIL_Z_REPLACE
Constant for stencil op fail z replace.
MK_STENCIL_OP_FAIL_Z_ZEROdefine
MK_STENCIL_OP_FAIL_Z_ZERO
Constant for stencil op fail z zero.
MK_STENCIL_OP_PASS_Z_DECRdefine
MK_STENCIL_OP_PASS_Z_DECR
Constant for stencil op pass z decr.
MK_STENCIL_OP_PASS_Z_DECRSATdefine
MK_STENCIL_OP_PASS_Z_DECRSAT
Constant for stencil op pass z decrsat.
MK_STENCIL_OP_PASS_Z_INCRdefine
MK_STENCIL_OP_PASS_Z_INCR
Constant for stencil op pass z incr.
MK_STENCIL_OP_PASS_Z_INCRSATdefine
MK_STENCIL_OP_PASS_Z_INCRSAT
Constant for stencil op pass z incrsat.
MK_STENCIL_OP_PASS_Z_INVERTdefine
MK_STENCIL_OP_PASS_Z_INVERT
Constant for stencil op pass z invert.
MK_STENCIL_OP_PASS_Z_KEEPdefine
MK_STENCIL_OP_PASS_Z_KEEP
Constant for stencil op pass z keep.
MK_STENCIL_OP_PASS_Z_REPLACEdefine
MK_STENCIL_OP_PASS_Z_REPLACE
Constant for stencil op pass z replace.
MK_STENCIL_OP_PASS_Z_ZEROdefine
MK_STENCIL_OP_PASS_Z_ZERO
Constant for stencil op pass z zero.
MK_STENCIL_TEST_ALWAYSdefine
Constant for stencil test always.
MK_STENCIL_TEST_EQUALdefine
Constant for stencil test equal.
MK_STENCIL_TEST_GEQUALdefine
Constant for stencil test gequal.
MK_STENCIL_TEST_GREATERdefine
Constant for stencil test greater.
MK_STENCIL_TEST_LEQUALdefine
Constant for stencil test lequal.
MK_STENCIL_TEST_LESSdefine
Constant for stencil test less.
MK_STENCIL_TEST_NEVERdefine
Constant for stencil test never.
MK_STENCIL_TEST_NOTEQUALdefine
Constant for stencil test notequal.