bgfx_make_ref_release

Make reference to data to pass to bgfx. Unlike bgfx::alloc, this call doesn't allocate memory for data. It just copies the _data pointer. You can pass ReleaseFn function pointer to release this memory after it's consumed, otherwise you must make sure _data is available for at least 2 bgfx::frame calls. ReleaseFn function must be able to be called from any thread. Attention: Data passed must be available for at least 2 bgfx::frame calls.

  1. const(bgfx_memory_t)* bgfx_make_ref_release(const(void)* _data, uint _size, void* _releaseFn, void* _userData)
    version(BindBgfx_Static)
    extern (C) @nogc nothrow
    bgfx_make_ref_release
    (
    const(void)* _data
    ,
    uint _size
    ,,
    void* _userData
    )
  2. da_bgfx_make_ref_release bgfx_make_ref_release;

Parameters

_data const(void)*

Pointer to data.

_size uint

Size of data.

_releaseFn void*

Callback function to release memory after use.

_userData void*

User data to be passed to callback function.

Meta