This commit is contained in:
bkaradzic 2012-10-28 13:27:50 -07:00
parent f71617e1b6
commit 5004a323bb

View file

@ -152,6 +152,7 @@
#define BGFX_RESET_MSAA_MASK UINT32_C(0x00000070) #define BGFX_RESET_MSAA_MASK UINT32_C(0x00000070)
#define BGFX_RESET_VSYNC UINT32_C(0x00000080) #define BGFX_RESET_VSYNC UINT32_C(0x00000080)
#define BGFX_HANDLE(_name) struct _name { uint16_t idx; }
#define BGFX_INVALID_HANDLE { bgfx::invalidHandle } #define BGFX_INVALID_HANDLE { bgfx::invalidHandle }
namespace bgfx namespace bgfx
@ -236,19 +237,19 @@ namespace bgfx
}; };
}; };
static const uint16_t invalidHandle = 0xffff; static const uint16_t invalidHandle = UINT16_MAX;
typedef struct { uint16_t idx; } DynamicIndexBufferHandle; BGFX_HANDLE(DynamicIndexBufferHandle);
typedef struct { uint16_t idx; } DynamicVertexBufferHandle; BGFX_HANDLE(DynamicVertexBufferHandle);
typedef struct { uint16_t idx; } FragmentShaderHandle; BGFX_HANDLE(FragmentShaderHandle);
typedef struct { uint16_t idx; } IndexBufferHandle; BGFX_HANDLE(IndexBufferHandle);
typedef struct { uint16_t idx; } ProgramHandle; BGFX_HANDLE(ProgramHandle);
typedef struct { uint16_t idx; } RenderTargetHandle; BGFX_HANDLE(RenderTargetHandle);
typedef struct { uint16_t idx; } TextureHandle; BGFX_HANDLE(TextureHandle);
typedef struct { uint16_t idx; } UniformHandle; BGFX_HANDLE(UniformHandle);
typedef struct { uint16_t idx; } VertexBufferHandle; BGFX_HANDLE(VertexBufferHandle);
typedef struct { uint16_t idx; } VertexDeclHandle; BGFX_HANDLE(VertexDeclHandle);
typedef struct { uint16_t idx; } VertexShaderHandle; BGFX_HANDLE(VertexShaderHandle);
struct Memory struct Memory
{ {