|
|
@@ -626,10 +626,10 @@ namespace bgfx
|
|
|
|
|
|
if (isValid(m_program) )
|
|
|
{
|
|
|
- destroyProgram(m_program);
|
|
|
+ destroy(m_program);
|
|
|
}
|
|
|
|
|
|
- destroyTexture(m_texture);
|
|
|
+ destroy(m_texture);
|
|
|
s_ctx->destroyTransientVertexBuffer(m_vb);
|
|
|
s_ctx->destroyTransientIndexBuffer(m_ib);
|
|
|
}
|
|
|
@@ -761,10 +761,10 @@ namespace bgfx
|
|
|
|
|
|
m_program[ii] = createProgram(vsh, fsh);
|
|
|
BX_CHECK(isValid(m_program[ii]), "Failed to create clear quad program.");
|
|
|
- destroyShader(fsh);
|
|
|
+ destroy(fsh);
|
|
|
}
|
|
|
|
|
|
- destroyShader(vsh);
|
|
|
+ destroy(vsh);
|
|
|
|
|
|
m_vb = s_ctx->createTransientVertexBuffer(4*m_decl.m_stride, &m_decl);
|
|
|
}
|
|
|
@@ -780,7 +780,7 @@ namespace bgfx
|
|
|
{
|
|
|
if (isValid(m_program[ii]) )
|
|
|
{
|
|
|
- destroyProgram(m_program[ii]);
|
|
|
+ destroy(m_program[ii]);
|
|
|
m_program[ii].idx = kInvalidHandle;
|
|
|
}
|
|
|
}
|
|
|
@@ -2872,7 +2872,7 @@ error:
|
|
|
return s_ctx->createIndexBuffer(_mem, _flags);
|
|
|
}
|
|
|
|
|
|
- void destroyIndexBuffer(IndexBufferHandle _handle)
|
|
|
+ void destroy(IndexBufferHandle _handle)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
s_ctx->destroyIndexBuffer(_handle);
|
|
|
@@ -2886,7 +2886,7 @@ error:
|
|
|
return s_ctx->createVertexBuffer(_mem, _decl, _flags);
|
|
|
}
|
|
|
|
|
|
- void destroyVertexBuffer(VertexBufferHandle _handle)
|
|
|
+ void destroy(VertexBufferHandle _handle)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
s_ctx->destroyVertexBuffer(_handle);
|
|
|
@@ -2912,7 +2912,7 @@ error:
|
|
|
s_ctx->updateDynamicIndexBuffer(_handle, _startIndex, _mem);
|
|
|
}
|
|
|
|
|
|
- void destroyDynamicIndexBuffer(DynamicIndexBufferHandle _handle)
|
|
|
+ void destroy(DynamicIndexBufferHandle _handle)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
s_ctx->destroyDynamicIndexBuffer(_handle);
|
|
|
@@ -2940,7 +2940,7 @@ error:
|
|
|
s_ctx->updateDynamicVertexBuffer(_handle, _startVertex, _mem);
|
|
|
}
|
|
|
|
|
|
- void destroyDynamicVertexBuffer(DynamicVertexBufferHandle _handle)
|
|
|
+ void destroy(DynamicVertexBufferHandle _handle)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
s_ctx->destroyDynamicVertexBuffer(_handle);
|
|
|
@@ -3026,7 +3026,7 @@ error:
|
|
|
return s_ctx->createIndirectBuffer(_num);
|
|
|
}
|
|
|
|
|
|
- void destroyIndirectBuffer(IndirectBufferHandle _handle)
|
|
|
+ void destroy(IndirectBufferHandle _handle)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
s_ctx->destroyIndirectBuffer(_handle);
|
|
|
@@ -3045,7 +3045,7 @@ error:
|
|
|
return s_ctx->getShaderUniforms(_handle, _uniforms, _max);
|
|
|
}
|
|
|
|
|
|
- void destroyShader(ShaderHandle _handle)
|
|
|
+ void destroy(ShaderHandle _handle)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
s_ctx->destroyShader(_handle);
|
|
|
@@ -3068,7 +3068,7 @@ error:
|
|
|
return s_ctx->createProgram(_csh, _destroyShader);
|
|
|
}
|
|
|
|
|
|
- void destroyProgram(ProgramHandle _handle)
|
|
|
+ void destroy(ProgramHandle _handle)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
s_ctx->destroyProgram(_handle);
|
|
|
@@ -3366,7 +3366,7 @@ error:
|
|
|
return s_ctx->createTexture(mem, _flags, 0, NULL, BackbufferRatio::Count);
|
|
|
}
|
|
|
|
|
|
- void destroyTexture(TextureHandle _handle)
|
|
|
+ void destroy(TextureHandle _handle)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
s_ctx->destroyTexture(_handle);
|
|
|
@@ -3493,7 +3493,7 @@ error:
|
|
|
return s_ctx->getTexture(_handle, _attachment);
|
|
|
}
|
|
|
|
|
|
- void destroyFrameBuffer(FrameBufferHandle _handle)
|
|
|
+ void destroy(FrameBufferHandle _handle)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
s_ctx->destroyFrameBuffer(_handle);
|
|
|
@@ -3511,7 +3511,7 @@ error:
|
|
|
s_ctx->getUniformInfo(_handle, _info);
|
|
|
}
|
|
|
|
|
|
- void destroyUniform(UniformHandle _handle)
|
|
|
+ void destroy(UniformHandle _handle)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
s_ctx->destroyUniform(_handle);
|
|
|
@@ -3531,7 +3531,7 @@ error:
|
|
|
return s_ctx->getResult(_handle, _result);
|
|
|
}
|
|
|
|
|
|
- void destroyOcclusionQuery(OcclusionQueryHandle _handle)
|
|
|
+ void destroy(OcclusionQueryHandle _handle)
|
|
|
{
|
|
|
BGFX_CHECK_MAIN_THREAD();
|
|
|
BGFX_CHECK_CAPS(BGFX_CAPS_OCCLUSION_QUERY, "Occlusion query is not supported!");
|
|
|
@@ -4346,7 +4346,7 @@ BGFX_C_API bgfx_index_buffer_handle_t bgfx_create_index_buffer(const bgfx_memory
|
|
|
BGFX_C_API void bgfx_destroy_index_buffer(bgfx_index_buffer_handle_t _handle)
|
|
|
{
|
|
|
union { bgfx_index_buffer_handle_t c; bgfx::IndexBufferHandle cpp; } handle = { _handle };
|
|
|
- bgfx::destroyIndexBuffer(handle.cpp);
|
|
|
+ bgfx::destroy(handle.cpp);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API bgfx_vertex_buffer_handle_t bgfx_create_vertex_buffer(const bgfx_memory_t* _mem, const bgfx_vertex_decl_t* _decl, uint16_t _flags)
|
|
|
@@ -4360,7 +4360,7 @@ BGFX_C_API bgfx_vertex_buffer_handle_t bgfx_create_vertex_buffer(const bgfx_memo
|
|
|
BGFX_C_API void bgfx_destroy_vertex_buffer(bgfx_vertex_buffer_handle_t _handle)
|
|
|
{
|
|
|
union { bgfx_vertex_buffer_handle_t c; bgfx::VertexBufferHandle cpp; } handle = { _handle };
|
|
|
- bgfx::destroyVertexBuffer(handle.cpp);
|
|
|
+ bgfx::destroy(handle.cpp);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API bgfx_dynamic_index_buffer_handle_t bgfx_create_dynamic_index_buffer(uint32_t _num, uint16_t _flags)
|
|
|
@@ -4386,7 +4386,7 @@ BGFX_C_API void bgfx_update_dynamic_index_buffer(bgfx_dynamic_index_buffer_handl
|
|
|
BGFX_C_API void bgfx_destroy_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t _handle)
|
|
|
{
|
|
|
union { bgfx_dynamic_index_buffer_handle_t c; bgfx::DynamicIndexBufferHandle cpp; } handle = { _handle };
|
|
|
- bgfx::destroyDynamicIndexBuffer(handle.cpp);
|
|
|
+ bgfx::destroy(handle.cpp);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer(uint32_t _num, const bgfx_vertex_decl_t* _decl, uint16_t _flags)
|
|
|
@@ -4414,7 +4414,7 @@ BGFX_C_API void bgfx_update_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_han
|
|
|
BGFX_C_API void bgfx_destroy_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle)
|
|
|
{
|
|
|
union { bgfx_dynamic_vertex_buffer_handle_t c; bgfx::DynamicVertexBufferHandle cpp; } handle = { _handle };
|
|
|
- bgfx::destroyDynamicVertexBuffer(handle.cpp);
|
|
|
+ bgfx::destroy(handle.cpp);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API uint32_t bgfx_get_avail_transient_index_buffer(uint32_t _num)
|
|
|
@@ -4465,7 +4465,7 @@ BGFX_C_API bgfx_indirect_buffer_handle_t bgfx_create_indirect_buffer(uint32_t _n
|
|
|
BGFX_C_API void bgfx_destroy_indirect_buffer(bgfx_indirect_buffer_handle_t _handle)
|
|
|
{
|
|
|
union { bgfx_indirect_buffer_handle_t c; bgfx::IndirectBufferHandle cpp; } handle = { _handle };
|
|
|
- bgfx::destroyIndirectBuffer(handle.cpp);
|
|
|
+ bgfx::destroy(handle.cpp);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API bgfx_shader_handle_t bgfx_create_shader(const bgfx_memory_t* _mem)
|
|
|
@@ -4484,7 +4484,7 @@ BGFX_C_API uint16_t bgfx_get_shader_uniforms(bgfx_shader_handle_t _handle, bgfx_
|
|
|
BGFX_C_API void bgfx_destroy_shader(bgfx_shader_handle_t _handle)
|
|
|
{
|
|
|
union { bgfx_shader_handle_t c; bgfx::ShaderHandle cpp; } handle = { _handle };
|
|
|
- bgfx::destroyShader(handle.cpp);
|
|
|
+ bgfx::destroy(handle.cpp);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API bgfx_program_handle_t bgfx_create_program(bgfx_shader_handle_t _vsh, bgfx_shader_handle_t _fsh, bool _destroyShaders)
|
|
|
@@ -4507,7 +4507,7 @@ BGFX_C_API bgfx_program_handle_t bgfx_create_compute_program(bgfx_shader_handle_
|
|
|
BGFX_C_API void bgfx_destroy_program(bgfx_program_handle_t _handle)
|
|
|
{
|
|
|
union { bgfx_program_handle_t c; bgfx::ProgramHandle cpp; } handle = { _handle };
|
|
|
- bgfx::destroyProgram(handle.cpp);
|
|
|
+ bgfx::destroy(handle.cpp);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API bool bgfx_is_texture_valid(uint16_t _depth, bool _cubeMap, uint16_t _numLayers, bgfx_texture_format_t _format, uint32_t _flags)
|
|
|
@@ -4584,7 +4584,7 @@ BGFX_C_API uint32_t bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data
|
|
|
BGFX_C_API void bgfx_destroy_texture(bgfx_texture_handle_t _handle)
|
|
|
{
|
|
|
union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle };
|
|
|
- bgfx::destroyTexture(handle.cpp);
|
|
|
+ bgfx::destroy(handle.cpp);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer(uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, uint32_t _textureFlags)
|
|
|
@@ -4633,7 +4633,7 @@ BGFX_C_API bgfx_texture_handle_t bgfx_get_texture(bgfx_frame_buffer_handle_t _ha
|
|
|
BGFX_C_API void bgfx_destroy_frame_buffer(bgfx_frame_buffer_handle_t _handle)
|
|
|
{
|
|
|
union { bgfx_frame_buffer_handle_t c; bgfx::FrameBufferHandle cpp; } handle = { _handle };
|
|
|
- bgfx::destroyFrameBuffer(handle.cpp);
|
|
|
+ bgfx::destroy(handle.cpp);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API bgfx_uniform_handle_t bgfx_create_uniform(const char* _name, bgfx_uniform_type_t _type, uint16_t _num)
|
|
|
@@ -4653,7 +4653,7 @@ BGFX_C_API void bgfx_get_uniform_info(bgfx_uniform_handle_t _handle, bgfx_unifor
|
|
|
BGFX_C_API void bgfx_destroy_uniform(bgfx_uniform_handle_t _handle)
|
|
|
{
|
|
|
union { bgfx_uniform_handle_t c; bgfx::UniformHandle cpp; } handle = { _handle };
|
|
|
- bgfx::destroyUniform(handle.cpp);
|
|
|
+ bgfx::destroy(handle.cpp);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API bgfx_occlusion_query_handle_t bgfx_create_occlusion_query()
|
|
|
@@ -4672,7 +4672,7 @@ BGFX_C_API bgfx_occlusion_query_result_t bgfx_get_result(bgfx_occlusion_query_ha
|
|
|
BGFX_C_API void bgfx_destroy_occlusion_query(bgfx_occlusion_query_handle_t _handle)
|
|
|
{
|
|
|
union { bgfx_occlusion_query_handle_t c; bgfx::OcclusionQueryHandle cpp; } handle = { _handle };
|
|
|
- bgfx::destroyOcclusionQuery(handle.cpp);
|
|
|
+ bgfx::destroy(handle.cpp);
|
|
|
}
|
|
|
|
|
|
BGFX_C_API void bgfx_set_palette_color(uint8_t _index, const float _rgba[4])
|