mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-17 20:31:57 -05:00
Updated docs.
This commit is contained in:
parent
3c79b92127
commit
ba91815582
2 changed files with 203 additions and 194 deletions
|
@ -723,7 +723,7 @@ namespace bgfx
|
|||
///
|
||||
/// @param[in] _width Back-buffer width.
|
||||
/// @param[in] _height Back-buffer height.
|
||||
/// @param[in] _flags
|
||||
/// @param[in] _flags See: `BGFX_RESET_*` for more info.
|
||||
/// - `BGFX_RESET_NONE` - No reset flags.
|
||||
/// - `BGFX_RESET_FULLSCREEN` - Not supported yet.
|
||||
/// - `BGFX_RESET_MSAA_X[2/4/8/16]` - Enable 2, 4, 8 or 16 x MSAA.
|
||||
|
@ -733,9 +733,11 @@ namespace bgfx
|
|||
/// - `BGFX_RESET_HMD` - HMD stereo rendering.
|
||||
/// - `BGFX_RESET_HMD_DEBUG` - HMD stereo rendering debug mode.
|
||||
/// - `BGFX_RESET_HMD_RECENTER` - HMD calibration.
|
||||
/// - `BGFX_RESET_FLUSH_AFTER_RENDER` - Flush rendering after submitting to GPU.
|
||||
/// - `BGFX_RESET_FLIP_AFTER_RENDER` - This flag specifies where flip
|
||||
/// occurs. Default behavior is that flip occurs before rendering new
|
||||
/// frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
|
||||
/// - `BGFX_RESET_SRGB_BACKBUFFER` - Enable sRGB backbuffer.
|
||||
///
|
||||
/// @attention This call doesn't actually change window size, it just
|
||||
/// resizes back-buffer. Windowing code has to change window size.
|
||||
|
|
|
@ -13,36 +13,36 @@
|
|||
|
||||
#define BGFX_STATE_DEPTH_TEST_LESS UINT64_C(0x0000000000000010) //!< Enable depth test, less.
|
||||
#define BGFX_STATE_DEPTH_TEST_LEQUAL UINT64_C(0x0000000000000020) //!< Enable depth test, less equal.
|
||||
#define BGFX_STATE_DEPTH_TEST_EQUAL UINT64_C(0x0000000000000030)
|
||||
#define BGFX_STATE_DEPTH_TEST_GEQUAL UINT64_C(0x0000000000000040)
|
||||
#define BGFX_STATE_DEPTH_TEST_GREATER UINT64_C(0x0000000000000050)
|
||||
#define BGFX_STATE_DEPTH_TEST_NOTEQUAL UINT64_C(0x0000000000000060)
|
||||
#define BGFX_STATE_DEPTH_TEST_NEVER UINT64_C(0x0000000000000070)
|
||||
#define BGFX_STATE_DEPTH_TEST_ALWAYS UINT64_C(0x0000000000000080)
|
||||
#define BGFX_STATE_DEPTH_TEST_EQUAL UINT64_C(0x0000000000000030) //!<
|
||||
#define BGFX_STATE_DEPTH_TEST_GEQUAL UINT64_C(0x0000000000000040) //!<
|
||||
#define BGFX_STATE_DEPTH_TEST_GREATER UINT64_C(0x0000000000000050) //!<
|
||||
#define BGFX_STATE_DEPTH_TEST_NOTEQUAL UINT64_C(0x0000000000000060) //!<
|
||||
#define BGFX_STATE_DEPTH_TEST_NEVER UINT64_C(0x0000000000000070) //!<
|
||||
#define BGFX_STATE_DEPTH_TEST_ALWAYS UINT64_C(0x0000000000000080) //!<
|
||||
#define BGFX_STATE_DEPTH_TEST_SHIFT 4
|
||||
#define BGFX_STATE_DEPTH_TEST_MASK UINT64_C(0x00000000000000f0) //!< Depth test state bit mask.
|
||||
|
||||
#define BGFX_STATE_BLEND_ZERO UINT64_C(0x0000000000001000)
|
||||
#define BGFX_STATE_BLEND_ONE UINT64_C(0x0000000000002000)
|
||||
#define BGFX_STATE_BLEND_SRC_COLOR UINT64_C(0x0000000000003000)
|
||||
#define BGFX_STATE_BLEND_INV_SRC_COLOR UINT64_C(0x0000000000004000)
|
||||
#define BGFX_STATE_BLEND_SRC_ALPHA UINT64_C(0x0000000000005000)
|
||||
#define BGFX_STATE_BLEND_INV_SRC_ALPHA UINT64_C(0x0000000000006000)
|
||||
#define BGFX_STATE_BLEND_DST_ALPHA UINT64_C(0x0000000000007000)
|
||||
#define BGFX_STATE_BLEND_INV_DST_ALPHA UINT64_C(0x0000000000008000)
|
||||
#define BGFX_STATE_BLEND_DST_COLOR UINT64_C(0x0000000000009000)
|
||||
#define BGFX_STATE_BLEND_INV_DST_COLOR UINT64_C(0x000000000000a000)
|
||||
#define BGFX_STATE_BLEND_SRC_ALPHA_SAT UINT64_C(0x000000000000b000)
|
||||
#define BGFX_STATE_BLEND_FACTOR UINT64_C(0x000000000000c000)
|
||||
#define BGFX_STATE_BLEND_INV_FACTOR UINT64_C(0x000000000000d000)
|
||||
#define BGFX_STATE_BLEND_ZERO UINT64_C(0x0000000000001000) //!<
|
||||
#define BGFX_STATE_BLEND_ONE UINT64_C(0x0000000000002000) //!<
|
||||
#define BGFX_STATE_BLEND_SRC_COLOR UINT64_C(0x0000000000003000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_SRC_COLOR UINT64_C(0x0000000000004000) //!<
|
||||
#define BGFX_STATE_BLEND_SRC_ALPHA UINT64_C(0x0000000000005000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_SRC_ALPHA UINT64_C(0x0000000000006000) //!<
|
||||
#define BGFX_STATE_BLEND_DST_ALPHA UINT64_C(0x0000000000007000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_DST_ALPHA UINT64_C(0x0000000000008000) //!<
|
||||
#define BGFX_STATE_BLEND_DST_COLOR UINT64_C(0x0000000000009000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_DST_COLOR UINT64_C(0x000000000000a000) //!<
|
||||
#define BGFX_STATE_BLEND_SRC_ALPHA_SAT UINT64_C(0x000000000000b000) //!<
|
||||
#define BGFX_STATE_BLEND_FACTOR UINT64_C(0x000000000000c000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_FACTOR UINT64_C(0x000000000000d000) //!<
|
||||
#define BGFX_STATE_BLEND_SHIFT 12 //!< Blend state bit shift.
|
||||
#define BGFX_STATE_BLEND_MASK UINT64_C(0x000000000ffff000) //!< Blend state bit mask.
|
||||
|
||||
#define BGFX_STATE_BLEND_EQUATION_ADD UINT64_C(0x0000000000000000)
|
||||
#define BGFX_STATE_BLEND_EQUATION_SUB UINT64_C(0x0000000010000000)
|
||||
#define BGFX_STATE_BLEND_EQUATION_REVSUB UINT64_C(0x0000000020000000)
|
||||
#define BGFX_STATE_BLEND_EQUATION_MIN UINT64_C(0x0000000030000000)
|
||||
#define BGFX_STATE_BLEND_EQUATION_MAX UINT64_C(0x0000000040000000)
|
||||
#define BGFX_STATE_BLEND_EQUATION_ADD UINT64_C(0x0000000000000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_SUB UINT64_C(0x0000000010000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_REVSUB UINT64_C(0x0000000020000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_MIN UINT64_C(0x0000000030000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_MAX UINT64_C(0x0000000040000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_SHIFT 28 //!< Blend equation bit shift.
|
||||
#define BGFX_STATE_BLEND_EQUATION_MASK UINT64_C(0x00000003f0000000) //!< Blend equation bit mask.
|
||||
|
||||
|
@ -53,8 +53,8 @@
|
|||
#define BGFX_STATE_CULL_SHIFT 36 //!< Culling mode bit shift.
|
||||
#define BGFX_STATE_CULL_MASK UINT64_C(0x0000003000000000) //!< Culling mode bit mask.
|
||||
|
||||
#define BGFX_STATE_ALPHA_REF_SHIFT 40
|
||||
#define BGFX_STATE_ALPHA_REF_MASK UINT64_C(0x0000ff0000000000)
|
||||
#define BGFX_STATE_ALPHA_REF_SHIFT 40 //!<
|
||||
#define BGFX_STATE_ALPHA_REF_MASK UINT64_C(0x0000ff0000000000) //!<
|
||||
|
||||
#define BGFX_STATE_PT_TRISTRIP UINT64_C(0x0001000000000000) //!< Tristrip.
|
||||
#define BGFX_STATE_PT_LINES UINT64_C(0x0002000000000000) //!< Lines.
|
||||
|
@ -63,17 +63,17 @@
|
|||
#define BGFX_STATE_PT_SHIFT 48 //!< Primitive type bit shift.
|
||||
#define BGFX_STATE_PT_MASK UINT64_C(0x0007000000000000) //!< Primitive type bit mask.
|
||||
|
||||
#define BGFX_STATE_POINT_SIZE_SHIFT 52
|
||||
#define BGFX_STATE_POINT_SIZE_MASK UINT64_C(0x0ff0000000000000)
|
||||
#define BGFX_STATE_POINT_SIZE_SHIFT 52 //!<
|
||||
#define BGFX_STATE_POINT_SIZE_MASK UINT64_C(0x0ff0000000000000) //!<
|
||||
|
||||
/// Enable MSAA write when writing into MSAA frame buffer. This flag is ignored when not writing into
|
||||
/// MSAA frame buffer.
|
||||
#define BGFX_STATE_MSAA UINT64_C(0x1000000000000000)
|
||||
#define BGFX_STATE_MSAA UINT64_C(0x1000000000000000) //!<
|
||||
|
||||
#define BGFX_STATE_RESERVED_MASK UINT64_C(0xe000000000000000)
|
||||
#define BGFX_STATE_RESERVED_MASK UINT64_C(0xe000000000000000) //!<
|
||||
|
||||
#define BGFX_STATE_NONE UINT64_C(0x0000000000000000)
|
||||
#define BGFX_STATE_MASK UINT64_C(0xffffffffffffffff)
|
||||
#define BGFX_STATE_NONE UINT64_C(0x0000000000000000) //!<
|
||||
#define BGFX_STATE_MASK UINT64_C(0xffffffffffffffff) //!<
|
||||
|
||||
/// Default state is write to RGB, alpha, and depth with depth test less enabled, with clockwise
|
||||
/// culling and MSAA (when writting into MSAA frame buffer, otherwise this flag is ignored).
|
||||
|
@ -130,77 +130,80 @@
|
|||
#define BGFX_STATE_BLEND_FUNC_RT_3E(_src, _dst, _equation) (BGFX_STATE_BLEND_FUNC_RT_xE(_src, _dst, _equation)<<22)
|
||||
|
||||
///
|
||||
#define BGFX_STENCIL_FUNC_REF_SHIFT 0
|
||||
#define BGFX_STENCIL_FUNC_REF_MASK UINT32_C(0x000000ff)
|
||||
#define BGFX_STENCIL_FUNC_RMASK_SHIFT 8
|
||||
#define BGFX_STENCIL_FUNC_RMASK_MASK UINT32_C(0x0000ff00)
|
||||
#define BGFX_STENCIL_FUNC_REF_SHIFT 0 //!<
|
||||
#define BGFX_STENCIL_FUNC_REF_MASK UINT32_C(0x000000ff) //!<
|
||||
#define BGFX_STENCIL_FUNC_RMASK_SHIFT 8 //!<
|
||||
#define BGFX_STENCIL_FUNC_RMASK_MASK UINT32_C(0x0000ff00) //!<
|
||||
|
||||
#define BGFX_STENCIL_TEST_LESS UINT32_C(0x00010000) //!< Enable stencil test, less.
|
||||
#define BGFX_STENCIL_TEST_LEQUAL UINT32_C(0x00020000)
|
||||
#define BGFX_STENCIL_TEST_EQUAL UINT32_C(0x00030000)
|
||||
#define BGFX_STENCIL_TEST_GEQUAL UINT32_C(0x00040000)
|
||||
#define BGFX_STENCIL_TEST_GREATER UINT32_C(0x00050000)
|
||||
#define BGFX_STENCIL_TEST_NOTEQUAL UINT32_C(0x00060000)
|
||||
#define BGFX_STENCIL_TEST_NEVER UINT32_C(0x00070000)
|
||||
#define BGFX_STENCIL_TEST_ALWAYS UINT32_C(0x00080000)
|
||||
#define BGFX_STENCIL_TEST_SHIFT 16
|
||||
#define BGFX_STENCIL_TEST_MASK UINT32_C(0x000f0000)
|
||||
#define BGFX_STENCIL_TEST_LEQUAL UINT32_C(0x00020000) //!<
|
||||
#define BGFX_STENCIL_TEST_EQUAL UINT32_C(0x00030000) //!<
|
||||
#define BGFX_STENCIL_TEST_GEQUAL UINT32_C(0x00040000) //!<
|
||||
#define BGFX_STENCIL_TEST_GREATER UINT32_C(0x00050000) //!<
|
||||
#define BGFX_STENCIL_TEST_NOTEQUAL UINT32_C(0x00060000) //!<
|
||||
#define BGFX_STENCIL_TEST_NEVER UINT32_C(0x00070000) //!<
|
||||
#define BGFX_STENCIL_TEST_ALWAYS UINT32_C(0x00080000) //!<
|
||||
#define BGFX_STENCIL_TEST_SHIFT 16 //!<
|
||||
#define BGFX_STENCIL_TEST_MASK UINT32_C(0x000f0000) //!<
|
||||
|
||||
#define BGFX_STENCIL_OP_FAIL_S_ZERO UINT32_C(0x00000000)
|
||||
#define BGFX_STENCIL_OP_FAIL_S_KEEP UINT32_C(0x00100000)
|
||||
#define BGFX_STENCIL_OP_FAIL_S_REPLACE UINT32_C(0x00200000)
|
||||
#define BGFX_STENCIL_OP_FAIL_S_INCR UINT32_C(0x00300000)
|
||||
#define BGFX_STENCIL_OP_FAIL_S_INCRSAT UINT32_C(0x00400000)
|
||||
#define BGFX_STENCIL_OP_FAIL_S_DECR UINT32_C(0x00500000)
|
||||
#define BGFX_STENCIL_OP_FAIL_S_DECRSAT UINT32_C(0x00600000)
|
||||
#define BGFX_STENCIL_OP_FAIL_S_INVERT UINT32_C(0x00700000)
|
||||
#define BGFX_STENCIL_OP_FAIL_S_SHIFT 20
|
||||
#define BGFX_STENCIL_OP_FAIL_S_MASK UINT32_C(0x00f00000)
|
||||
#define BGFX_STENCIL_OP_FAIL_S_ZERO UINT32_C(0x00000000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_S_KEEP UINT32_C(0x00100000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_S_REPLACE UINT32_C(0x00200000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_S_INCR UINT32_C(0x00300000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_S_INCRSAT UINT32_C(0x00400000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_S_DECR UINT32_C(0x00500000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_S_DECRSAT UINT32_C(0x00600000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_S_INVERT UINT32_C(0x00700000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_S_SHIFT 20 //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_S_MASK UINT32_C(0x00f00000) //!<
|
||||
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_ZERO UINT32_C(0x00000000)
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_KEEP UINT32_C(0x01000000)
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_REPLACE UINT32_C(0x02000000)
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_INCR UINT32_C(0x03000000)
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_INCRSAT UINT32_C(0x04000000)
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_DECR UINT32_C(0x05000000)
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_DECRSAT UINT32_C(0x06000000)
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_INVERT UINT32_C(0x07000000)
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_SHIFT 24
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_MASK UINT32_C(0x0f000000)
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_ZERO UINT32_C(0x00000000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_KEEP UINT32_C(0x01000000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_REPLACE UINT32_C(0x02000000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_INCR UINT32_C(0x03000000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_INCRSAT UINT32_C(0x04000000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_DECR UINT32_C(0x05000000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_DECRSAT UINT32_C(0x06000000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_INVERT UINT32_C(0x07000000) //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_SHIFT 24 //!<
|
||||
#define BGFX_STENCIL_OP_FAIL_Z_MASK UINT32_C(0x0f000000) //!<
|
||||
|
||||
#define BGFX_STENCIL_OP_PASS_Z_ZERO UINT32_C(0x00000000)
|
||||
#define BGFX_STENCIL_OP_PASS_Z_KEEP UINT32_C(0x10000000)
|
||||
#define BGFX_STENCIL_OP_PASS_Z_REPLACE UINT32_C(0x20000000)
|
||||
#define BGFX_STENCIL_OP_PASS_Z_INCR UINT32_C(0x30000000)
|
||||
#define BGFX_STENCIL_OP_PASS_Z_INCRSAT UINT32_C(0x40000000)
|
||||
#define BGFX_STENCIL_OP_PASS_Z_DECR UINT32_C(0x50000000)
|
||||
#define BGFX_STENCIL_OP_PASS_Z_DECRSAT UINT32_C(0x60000000)
|
||||
#define BGFX_STENCIL_OP_PASS_Z_INVERT UINT32_C(0x70000000)
|
||||
#define BGFX_STENCIL_OP_PASS_Z_SHIFT 28
|
||||
#define BGFX_STENCIL_OP_PASS_Z_MASK UINT32_C(0xf0000000)
|
||||
#define BGFX_STENCIL_OP_PASS_Z_ZERO UINT32_C(0x00000000) //!<
|
||||
#define BGFX_STENCIL_OP_PASS_Z_KEEP UINT32_C(0x10000000) //!<
|
||||
#define BGFX_STENCIL_OP_PASS_Z_REPLACE UINT32_C(0x20000000) //!<
|
||||
#define BGFX_STENCIL_OP_PASS_Z_INCR UINT32_C(0x30000000) //!<
|
||||
#define BGFX_STENCIL_OP_PASS_Z_INCRSAT UINT32_C(0x40000000) //!<
|
||||
#define BGFX_STENCIL_OP_PASS_Z_DECR UINT32_C(0x50000000) //!<
|
||||
#define BGFX_STENCIL_OP_PASS_Z_DECRSAT UINT32_C(0x60000000) //!<
|
||||
#define BGFX_STENCIL_OP_PASS_Z_INVERT UINT32_C(0x70000000) //!<
|
||||
#define BGFX_STENCIL_OP_PASS_Z_SHIFT 28 //!<
|
||||
#define BGFX_STENCIL_OP_PASS_Z_MASK UINT32_C(0xf0000000) //!<
|
||||
|
||||
#define BGFX_STENCIL_NONE UINT32_C(0x00000000)
|
||||
#define BGFX_STENCIL_MASK UINT32_C(0xffffffff)
|
||||
#define BGFX_STENCIL_DEFAULT UINT32_C(0x00000000)
|
||||
#define BGFX_STENCIL_NONE UINT32_C(0x00000000) //!<
|
||||
#define BGFX_STENCIL_MASK UINT32_C(0xffffffff) //!<
|
||||
#define BGFX_STENCIL_DEFAULT UINT32_C(0x00000000) //!<
|
||||
|
||||
/// Set stencil ref value.
|
||||
#define BGFX_STENCIL_FUNC_REF(_ref) ( (uint32_t(_ref)<<BGFX_STENCIL_FUNC_REF_SHIFT)&BGFX_STENCIL_FUNC_REF_MASK)
|
||||
|
||||
/// Set stencil rmask value.
|
||||
#define BGFX_STENCIL_FUNC_RMASK(_mask) ( (uint32_t(_mask)<<BGFX_STENCIL_FUNC_RMASK_SHIFT)&BGFX_STENCIL_FUNC_RMASK_MASK)
|
||||
|
||||
///
|
||||
#define BGFX_CLEAR_NONE UINT16_C(0x0000)
|
||||
#define BGFX_CLEAR_COLOR UINT16_C(0x0001)
|
||||
#define BGFX_CLEAR_DEPTH UINT16_C(0x0002)
|
||||
#define BGFX_CLEAR_STENCIL UINT16_C(0x0004)
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_0 UINT16_C(0x0008)
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_1 UINT16_C(0x0010)
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_2 UINT16_C(0x0020)
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_3 UINT16_C(0x0040)
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_4 UINT16_C(0x0080)
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_5 UINT16_C(0x0100)
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_6 UINT16_C(0x0200)
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_7 UINT16_C(0x0400)
|
||||
#define BGFX_CLEAR_DISCARD_DEPTH UINT16_C(0x0800)
|
||||
#define BGFX_CLEAR_DISCARD_STENCIL UINT16_C(0x1000)
|
||||
#define BGFX_CLEAR_NONE UINT16_C(0x0000) //!< No clear flags.
|
||||
#define BGFX_CLEAR_COLOR UINT16_C(0x0001) //!< Clear color.
|
||||
#define BGFX_CLEAR_DEPTH UINT16_C(0x0002) //!< Clear depth.
|
||||
#define BGFX_CLEAR_STENCIL UINT16_C(0x0004) //!< Clear stencil.
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_0 UINT16_C(0x0008) //!< Discard frame buffer attachment 0.
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_1 UINT16_C(0x0010) //!< Discard frame buffer attachment 1.
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_2 UINT16_C(0x0020) //!< Discard frame buffer attachment 2.
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_3 UINT16_C(0x0040) //!< Discard frame buffer attachment 3.
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_4 UINT16_C(0x0080) //!< Discard frame buffer attachment 4.
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_5 UINT16_C(0x0100) //!< Discard frame buffer attachment 5.
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_6 UINT16_C(0x0200) //!< Discard frame buffer attachment 6.
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_7 UINT16_C(0x0400) //!< Discard frame buffer attachment 7.
|
||||
#define BGFX_CLEAR_DISCARD_DEPTH UINT16_C(0x0800) //!< Discard frame buffer depth attachment.
|
||||
#define BGFX_CLEAR_DISCARD_STENCIL UINT16_C(0x1000) //!< Discard frame buffer stencil attachment.
|
||||
|
||||
#define BGFX_CLEAR_DISCARD_COLOR_MASK (0 \
|
||||
| BGFX_CLEAR_DISCARD_COLOR_0 \
|
||||
|
@ -225,81 +228,85 @@
|
|||
#define BGFX_DEBUG_TEXT UINT32_C(0x00000008) //!< Enable debug text display.
|
||||
|
||||
///
|
||||
#define BGFX_BUFFER_NONE UINT16_C(0x0000)
|
||||
#define BGFX_BUFFER_NONE UINT16_C(0x0000) //!<
|
||||
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_8x1 UINT16_C(0x0001)
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_8x2 UINT16_C(0x0002)
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_8x4 UINT16_C(0x0003)
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_16x1 UINT16_C(0x0004)
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_16x2 UINT16_C(0x0005)
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_16x4 UINT16_C(0x0006)
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_32x1 UINT16_C(0x0007)
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_32x2 UINT16_C(0x0008)
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_32x4 UINT16_C(0x0009)
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_SHIFT 0
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_MASK UINT16_C(0x000f)
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_8x1 UINT16_C(0x0001) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_8x2 UINT16_C(0x0002) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_8x4 UINT16_C(0x0003) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_16x1 UINT16_C(0x0004) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_16x2 UINT16_C(0x0005) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_16x4 UINT16_C(0x0006) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_32x1 UINT16_C(0x0007) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_32x2 UINT16_C(0x0008) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_32x4 UINT16_C(0x0009) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_SHIFT 0 //!<
|
||||
#define BGFX_BUFFER_COMPUTE_FORMAT_MASK UINT16_C(0x000f) //!<
|
||||
|
||||
#define BGFX_BUFFER_COMPUTE_TYPE_UINT UINT16_C(0x0010)
|
||||
#define BGFX_BUFFER_COMPUTE_TYPE_INT UINT16_C(0x0020)
|
||||
#define BGFX_BUFFER_COMPUTE_TYPE_FLOAT UINT16_C(0x0030)
|
||||
#define BGFX_BUFFER_COMPUTE_TYPE_SHIFT 4
|
||||
#define BGFX_BUFFER_COMPUTE_TYPE_MASK UINT16_C(0x0030)
|
||||
#define BGFX_BUFFER_COMPUTE_TYPE_UINT UINT16_C(0x0010) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_TYPE_INT UINT16_C(0x0020) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_TYPE_FLOAT UINT16_C(0x0030) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_TYPE_SHIFT 4 //!<
|
||||
#define BGFX_BUFFER_COMPUTE_TYPE_MASK UINT16_C(0x0030) //!<
|
||||
|
||||
#define BGFX_BUFFER_COMPUTE_READ UINT16_C(0x0100)
|
||||
#define BGFX_BUFFER_COMPUTE_WRITE UINT16_C(0x0200)
|
||||
#define BGFX_BUFFER_DRAW_INDIRECT UINT16_C(0x0400)
|
||||
#define BGFX_BUFFER_ALLOW_RESIZE UINT16_C(0x0800)
|
||||
#define BGFX_BUFFER_INDEX32 UINT16_C(0x1000)
|
||||
#define BGFX_BUFFER_COMPUTE_READ_WRITE (BGFX_BUFFER_COMPUTE_READ | BGFX_BUFFER_COMPUTE_WRITE)
|
||||
#define BGFX_BUFFER_COMPUTE_READ UINT16_C(0x0100) //!<
|
||||
#define BGFX_BUFFER_COMPUTE_WRITE UINT16_C(0x0200) //!<
|
||||
#define BGFX_BUFFER_DRAW_INDIRECT UINT16_C(0x0400) //!<
|
||||
#define BGFX_BUFFER_ALLOW_RESIZE UINT16_C(0x0800) //!<
|
||||
#define BGFX_BUFFER_INDEX32 UINT16_C(0x1000) //!<
|
||||
|
||||
#define BGFX_BUFFER_COMPUTE_READ_WRITE (0 \
|
||||
| BGFX_BUFFER_COMPUTE_READ \
|
||||
| BGFX_BUFFER_COMPUTE_WRITE \
|
||||
)
|
||||
|
||||
///
|
||||
#define BGFX_TEXTURE_NONE UINT32_C(0x00000000)
|
||||
#define BGFX_TEXTURE_U_MIRROR UINT32_C(0x00000001)
|
||||
#define BGFX_TEXTURE_U_CLAMP UINT32_C(0x00000002)
|
||||
#define BGFX_TEXTURE_U_SHIFT 0
|
||||
#define BGFX_TEXTURE_U_MASK UINT32_C(0x00000003)
|
||||
#define BGFX_TEXTURE_V_MIRROR UINT32_C(0x00000004)
|
||||
#define BGFX_TEXTURE_V_CLAMP UINT32_C(0x00000008)
|
||||
#define BGFX_TEXTURE_V_SHIFT 2
|
||||
#define BGFX_TEXTURE_V_MASK UINT32_C(0x0000000c)
|
||||
#define BGFX_TEXTURE_W_MIRROR UINT32_C(0x00000010)
|
||||
#define BGFX_TEXTURE_W_CLAMP UINT32_C(0x00000020)
|
||||
#define BGFX_TEXTURE_W_SHIFT 4
|
||||
#define BGFX_TEXTURE_W_MASK UINT32_C(0x00000030)
|
||||
#define BGFX_TEXTURE_MIN_POINT UINT32_C(0x00000040)
|
||||
#define BGFX_TEXTURE_MIN_ANISOTROPIC UINT32_C(0x00000080)
|
||||
#define BGFX_TEXTURE_MIN_SHIFT 6
|
||||
#define BGFX_TEXTURE_MIN_MASK UINT32_C(0x000000c0)
|
||||
#define BGFX_TEXTURE_MAG_POINT UINT32_C(0x00000100)
|
||||
#define BGFX_TEXTURE_MAG_ANISOTROPIC UINT32_C(0x00000200)
|
||||
#define BGFX_TEXTURE_MAG_SHIFT 8
|
||||
#define BGFX_TEXTURE_MAG_MASK UINT32_C(0x00000300)
|
||||
#define BGFX_TEXTURE_MIP_POINT UINT32_C(0x00000400)
|
||||
#define BGFX_TEXTURE_MIP_SHIFT 10
|
||||
#define BGFX_TEXTURE_MIP_MASK UINT32_C(0x00000400)
|
||||
#define BGFX_TEXTURE_RT UINT32_C(0x00001000)
|
||||
#define BGFX_TEXTURE_RT_MSAA_X2 UINT32_C(0x00002000)
|
||||
#define BGFX_TEXTURE_RT_MSAA_X4 UINT32_C(0x00003000)
|
||||
#define BGFX_TEXTURE_RT_MSAA_X8 UINT32_C(0x00004000)
|
||||
#define BGFX_TEXTURE_RT_MSAA_X16 UINT32_C(0x00005000)
|
||||
#define BGFX_TEXTURE_RT_MSAA_SHIFT 12
|
||||
#define BGFX_TEXTURE_RT_MSAA_MASK UINT32_C(0x00007000)
|
||||
#define BGFX_TEXTURE_RT_BUFFER_ONLY UINT32_C(0x00008000)
|
||||
#define BGFX_TEXTURE_RT_MASK UINT32_C(0x0000f000)
|
||||
#define BGFX_TEXTURE_COMPARE_LESS UINT32_C(0x00010000)
|
||||
#define BGFX_TEXTURE_COMPARE_LEQUAL UINT32_C(0x00020000)
|
||||
#define BGFX_TEXTURE_COMPARE_EQUAL UINT32_C(0x00030000)
|
||||
#define BGFX_TEXTURE_COMPARE_GEQUAL UINT32_C(0x00040000)
|
||||
#define BGFX_TEXTURE_COMPARE_GREATER UINT32_C(0x00050000)
|
||||
#define BGFX_TEXTURE_COMPARE_NOTEQUAL UINT32_C(0x00060000)
|
||||
#define BGFX_TEXTURE_COMPARE_NEVER UINT32_C(0x00070000)
|
||||
#define BGFX_TEXTURE_COMPARE_ALWAYS UINT32_C(0x00080000)
|
||||
#define BGFX_TEXTURE_COMPARE_SHIFT 16
|
||||
#define BGFX_TEXTURE_COMPARE_MASK UINT32_C(0x000f0000)
|
||||
#define BGFX_TEXTURE_COMPUTE_WRITE UINT32_C(0x00100000)
|
||||
#define BGFX_TEXTURE_SRGB UINT32_C(0x00200000)
|
||||
#define BGFX_TEXTURE_RESERVED_SHIFT 24
|
||||
#define BGFX_TEXTURE_RESERVED_MASK UINT32_C(0xff000000)
|
||||
#define BGFX_TEXTURE_NONE UINT32_C(0x00000000) //!<
|
||||
#define BGFX_TEXTURE_U_MIRROR UINT32_C(0x00000001) //!<
|
||||
#define BGFX_TEXTURE_U_CLAMP UINT32_C(0x00000002) //!<
|
||||
#define BGFX_TEXTURE_U_SHIFT 0 //!<
|
||||
#define BGFX_TEXTURE_U_MASK UINT32_C(0x00000003) //!<
|
||||
#define BGFX_TEXTURE_V_MIRROR UINT32_C(0x00000004) //!<
|
||||
#define BGFX_TEXTURE_V_CLAMP UINT32_C(0x00000008) //!<
|
||||
#define BGFX_TEXTURE_V_SHIFT 2 //!<
|
||||
#define BGFX_TEXTURE_V_MASK UINT32_C(0x0000000c) //!<
|
||||
#define BGFX_TEXTURE_W_MIRROR UINT32_C(0x00000010) //!<
|
||||
#define BGFX_TEXTURE_W_CLAMP UINT32_C(0x00000020) //!<
|
||||
#define BGFX_TEXTURE_W_SHIFT 4 //!<
|
||||
#define BGFX_TEXTURE_W_MASK UINT32_C(0x00000030) //!<
|
||||
#define BGFX_TEXTURE_MIN_POINT UINT32_C(0x00000040) //!<
|
||||
#define BGFX_TEXTURE_MIN_ANISOTROPIC UINT32_C(0x00000080) //!<
|
||||
#define BGFX_TEXTURE_MIN_SHIFT 6 //!<
|
||||
#define BGFX_TEXTURE_MIN_MASK UINT32_C(0x000000c0) //!<
|
||||
#define BGFX_TEXTURE_MAG_POINT UINT32_C(0x00000100) //!<
|
||||
#define BGFX_TEXTURE_MAG_ANISOTROPIC UINT32_C(0x00000200) //!<
|
||||
#define BGFX_TEXTURE_MAG_SHIFT 8 //!<
|
||||
#define BGFX_TEXTURE_MAG_MASK UINT32_C(0x00000300) //!<
|
||||
#define BGFX_TEXTURE_MIP_POINT UINT32_C(0x00000400) //!<
|
||||
#define BGFX_TEXTURE_MIP_SHIFT 10 //!<
|
||||
#define BGFX_TEXTURE_MIP_MASK UINT32_C(0x00000400) //!<
|
||||
#define BGFX_TEXTURE_RT UINT32_C(0x00001000) //!<
|
||||
#define BGFX_TEXTURE_RT_MSAA_X2 UINT32_C(0x00002000) //!<
|
||||
#define BGFX_TEXTURE_RT_MSAA_X4 UINT32_C(0x00003000) //!<
|
||||
#define BGFX_TEXTURE_RT_MSAA_X8 UINT32_C(0x00004000) //!<
|
||||
#define BGFX_TEXTURE_RT_MSAA_X16 UINT32_C(0x00005000) //!<
|
||||
#define BGFX_TEXTURE_RT_MSAA_SHIFT 12 //!<
|
||||
#define BGFX_TEXTURE_RT_MSAA_MASK UINT32_C(0x00007000) //!<
|
||||
#define BGFX_TEXTURE_RT_BUFFER_ONLY UINT32_C(0x00008000) //!<
|
||||
#define BGFX_TEXTURE_RT_MASK UINT32_C(0x0000f000) //!<
|
||||
#define BGFX_TEXTURE_COMPARE_LESS UINT32_C(0x00010000) //!<
|
||||
#define BGFX_TEXTURE_COMPARE_LEQUAL UINT32_C(0x00020000) //!<
|
||||
#define BGFX_TEXTURE_COMPARE_EQUAL UINT32_C(0x00030000) //!<
|
||||
#define BGFX_TEXTURE_COMPARE_GEQUAL UINT32_C(0x00040000) //!<
|
||||
#define BGFX_TEXTURE_COMPARE_GREATER UINT32_C(0x00050000) //!<
|
||||
#define BGFX_TEXTURE_COMPARE_NOTEQUAL UINT32_C(0x00060000) //!<
|
||||
#define BGFX_TEXTURE_COMPARE_NEVER UINT32_C(0x00070000) //!<
|
||||
#define BGFX_TEXTURE_COMPARE_ALWAYS UINT32_C(0x00080000) //!<
|
||||
#define BGFX_TEXTURE_COMPARE_SHIFT 16 //!<
|
||||
#define BGFX_TEXTURE_COMPARE_MASK UINT32_C(0x000f0000) //!<
|
||||
#define BGFX_TEXTURE_COMPUTE_WRITE UINT32_C(0x00100000) //!<
|
||||
#define BGFX_TEXTURE_SRGB UINT32_C(0x00200000) //!<
|
||||
#define BGFX_TEXTURE_RESERVED_SHIFT 24 //!<
|
||||
#define BGFX_TEXTURE_RESERVED_MASK UINT32_C(0xff000000) //!<
|
||||
|
||||
#define BGFX_TEXTURE_SAMPLER_BITS_MASK (0 \
|
||||
| BGFX_TEXTURE_U_MASK \
|
||||
|
@ -312,25 +319,25 @@
|
|||
)
|
||||
|
||||
///
|
||||
#define BGFX_RESET_NONE UINT32_C(0x00000000)
|
||||
#define BGFX_RESET_FULLSCREEN UINT32_C(0x00000001)
|
||||
#define BGFX_RESET_FULLSCREEN_SHIFT 0
|
||||
#define BGFX_RESET_FULLSCREEN_MASK UINT32_C(0x00000001)
|
||||
#define BGFX_RESET_MSAA_X2 UINT32_C(0x00000010)
|
||||
#define BGFX_RESET_MSAA_X4 UINT32_C(0x00000020)
|
||||
#define BGFX_RESET_MSAA_X8 UINT32_C(0x00000030)
|
||||
#define BGFX_RESET_MSAA_X16 UINT32_C(0x00000040)
|
||||
#define BGFX_RESET_MSAA_SHIFT 4
|
||||
#define BGFX_RESET_MSAA_MASK UINT32_C(0x00000070)
|
||||
#define BGFX_RESET_VSYNC UINT32_C(0x00000080)
|
||||
#define BGFX_RESET_MAXANISOTROPY UINT32_C(0x00000100)
|
||||
#define BGFX_RESET_CAPTURE UINT32_C(0x00000200)
|
||||
#define BGFX_RESET_HMD UINT32_C(0x00000400)
|
||||
#define BGFX_RESET_HMD_DEBUG UINT32_C(0x00000800)
|
||||
#define BGFX_RESET_HMD_RECENTER UINT32_C(0x00001000)
|
||||
#define BGFX_RESET_FLUSH_AFTER_RENDER UINT32_C(0x00002000)
|
||||
#define BGFX_RESET_FLIP_AFTER_RENDER UINT32_C(0x00004000)
|
||||
#define BGFX_RESET_SRGB_BACKBUFFER UINT32_C(0x00008000)
|
||||
#define BGFX_RESET_NONE UINT32_C(0x00000000) //!< No reset flags.
|
||||
#define BGFX_RESET_FULLSCREEN UINT32_C(0x00000001) //!< Not supported yet.
|
||||
#define BGFX_RESET_FULLSCREEN_SHIFT 0 //!< Fullscreen bit shift.
|
||||
#define BGFX_RESET_FULLSCREEN_MASK UINT32_C(0x00000001) //!< Fullscreen bit mask.
|
||||
#define BGFX_RESET_MSAA_X2 UINT32_C(0x00000010) //!< Enable 2x MSAA.
|
||||
#define BGFX_RESET_MSAA_X4 UINT32_C(0x00000020) //!< Enable 4x MSAA.
|
||||
#define BGFX_RESET_MSAA_X8 UINT32_C(0x00000030) //!< Enable 8x MSAA.
|
||||
#define BGFX_RESET_MSAA_X16 UINT32_C(0x00000040) //!< Enable 16x MSAA.
|
||||
#define BGFX_RESET_MSAA_SHIFT 4 //!< MSAA mode bit shift.
|
||||
#define BGFX_RESET_MSAA_MASK UINT32_C(0x00000070) //!< MSAA mode bit mask.
|
||||
#define BGFX_RESET_VSYNC UINT32_C(0x00000080) //!< Enable V-Sync.
|
||||
#define BGFX_RESET_MAXANISOTROPY UINT32_C(0x00000100) //!< Turn on/off max anisotropy.
|
||||
#define BGFX_RESET_CAPTURE UINT32_C(0x00000200) //!< Begin screen capture.
|
||||
#define BGFX_RESET_HMD UINT32_C(0x00000400) //!< HMD stereo rendering.
|
||||
#define BGFX_RESET_HMD_DEBUG UINT32_C(0x00000800) //!< HMD stereo rendering debug mode.
|
||||
#define BGFX_RESET_HMD_RECENTER UINT32_C(0x00001000) //!< HMD calibration.
|
||||
#define BGFX_RESET_FLUSH_AFTER_RENDER UINT32_C(0x00002000) //!< Flush rendering after submitting to GPU.
|
||||
#define BGFX_RESET_FLIP_AFTER_RENDER UINT32_C(0x00004000) //!< This flag specifies where flip occurs. Default behavior is that flip occurs before rendering new frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
|
||||
#define BGFX_RESET_SRGB_BACKBUFFER UINT32_C(0x00008000) //!< Enable sRGB backbuffer.
|
||||
|
||||
///
|
||||
#define BGFX_CAPS_TEXTURE_COMPARE_LEQUAL UINT64_C(0x0000000000000001) //!< Texture compare less equal mode is supported.
|
||||
|
@ -349,22 +356,22 @@
|
|||
#define BGFX_CAPS_DRAW_INDIRECT UINT64_C(0x0000000000002000) //!< Draw indirect is supported.
|
||||
|
||||
///
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_NONE UINT8_C(0x00)
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_COLOR UINT8_C(0x01)
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB UINT8_C(0x02)
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_EMULATED UINT8_C(0x04)
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_VERTEX UINT8_C(0x08)
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_IMAGE UINT8_C(0x10)
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER UINT8_C(0x20)
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_NONE UINT8_C(0x00) //!<
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_COLOR UINT8_C(0x01) //!<
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB UINT8_C(0x02) //!<
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_EMULATED UINT8_C(0x04) //!<
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_VERTEX UINT8_C(0x08) //!<
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_IMAGE UINT8_C(0x10) //!<
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER UINT8_C(0x20) //!<
|
||||
|
||||
///
|
||||
#define BGFX_VIEW_NONE UINT8_C(0x00)
|
||||
#define BGFX_VIEW_STEREO UINT8_C(0x01)
|
||||
#define BGFX_VIEW_NONE UINT8_C(0x00) //!<
|
||||
#define BGFX_VIEW_STEREO UINT8_C(0x01) //!<
|
||||
|
||||
///
|
||||
#define BGFX_SUBMIT_EYE_LEFT UINT8_C(0x01)
|
||||
#define BGFX_SUBMIT_EYE_RIGHT UINT8_C(0x02)
|
||||
#define BGFX_SUBMIT_EYE_MASK UINT8_C(0x03)
|
||||
#define BGFX_SUBMIT_EYE_LEFT UINT8_C(0x01) //!<
|
||||
#define BGFX_SUBMIT_EYE_RIGHT UINT8_C(0x02) //!<
|
||||
#define BGFX_SUBMIT_EYE_MASK UINT8_C(0x03) //!<
|
||||
#define BGFX_SUBMIT_EYE_FIRST BGFX_SUBMIT_EYE_LEFT
|
||||
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue