Prechádzať zdrojové kódy

Merge pull request #1771 from cloudwu/handle

Add C99 api(macro) BGFX_HANDLE_ID_VALID
Бранимир Караџић 6 rokov pred
rodič
commit
81c26e4b4e
2 zmenil súbory, kde vykonal 4 pridanie a 0 odobranie
  1. 2 0
      include/bgfx/c99/bgfx.h
  2. 2 0
      scripts/temp.bgfx.h

+ 2 - 0
include/bgfx/c99/bgfx.h

@@ -463,6 +463,8 @@ typedef struct bgfx_vertex_buffer_handle_s { uint16_t idx; } bgfx_vertex_buffer_
 typedef struct bgfx_vertex_decl_handle_s { uint16_t idx; } bgfx_vertex_decl_handle_t;
 
 
+#define BGFX_HANDLE_IS_VALID(h) ((h).idx != UINT16_MAX)
+
 /**
  * Memory release callback.
  *

+ 2 - 0
scripts/temp.bgfx.h

@@ -106,6 +106,8 @@ typedef struct bgfx_callback_vtbl_s
 
 $chandles
 
+#define BGFX_HANDLE_IS_VALID(h) ((h).idx != UINT16_MAX)
+
 $cfuncptrs
 
 $cstructs