summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/include/bgfx.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/include/bgfx.h')
-rw-r--r--3rdparty/bgfx/include/bgfx.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/3rdparty/bgfx/include/bgfx.h b/3rdparty/bgfx/include/bgfx.h
index 257086a54fb..7462fc2274a 100644
--- a/3rdparty/bgfx/include/bgfx.h
+++ b/3rdparty/bgfx/include/bgfx.h
@@ -279,6 +279,9 @@ namespace bgfx
}
///
+ typedef void (*ReleaseFn)(void* _ptr, void* _userData);
+
+ ///
struct Memory
{
uint8_t* data;
@@ -604,8 +607,11 @@ namespace bgfx
/// Make reference to data to pass to bgfx. Unlike `bgfx::alloc` this call
/// doesn't allocate memory for data. It just copies pointer to data. You
- /// must make sure data is available for at least 2 `bgfx::frame` calls.
- const Memory* makeRef(const void* _data, uint32_t _size);
+ /// can pass `ReleaseFn` function pointer to release this memory after it's
+ /// consumed, or you must make sure data is available for at least 2
+ /// `bgfx::frame` calls. `ReleaseFn` function must be able to be called
+ /// called from any thread.
+ const Memory* makeRef(const void* _data, uint32_t _size, ReleaseFn _releaseFn = NULL, void* _userData = NULL);
/// Set debug flags.
///
@@ -1058,6 +1064,14 @@ namespace bgfx
/// @remarks
/// This is debug only feature.
///
+ /// In graphics debugger view name will appear as:
+ ///
+ /// "nnnce <view name>"
+ /// ^ ^^ ^
+ /// | |+-- eye (L/R)
+ /// | +-- compute (C)
+ /// +-- view id
+ ///
void setViewName(uint8_t _id, const char* _name);
/// Set view rectangle. Draw primitive outside view will be clipped.