mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Cleanup.
This commit is contained in:
14
src/bgfx.cpp
14
src/bgfx.cpp
@@ -3818,20 +3818,6 @@ error:
|
||||
s_ctx->setBuffer(_stage, _handle, _access);
|
||||
}
|
||||
|
||||
void setBuffer(uint8_t _stage, DynamicIndexBufferHandle _handle)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS);
|
||||
s_ctx->setBuffer(_stage, _handle);
|
||||
}
|
||||
|
||||
void setBuffer(uint8_t _stage, DynamicVertexBufferHandle _handle)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
BX_CHECK(_stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, "Invalid stage %d (max %d).", _stage, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS);
|
||||
s_ctx->setBuffer(_stage, _handle);
|
||||
}
|
||||
|
||||
void setBuffer(uint8_t _stage, IndirectBufferHandle _handle, Access::Enum _access)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
|
||||
30
src/bgfx_p.h
30
src/bgfx_p.h
@@ -1677,22 +1677,6 @@ namespace bgfx
|
||||
bind.m_un.m_compute.m_mip = 0;
|
||||
}
|
||||
|
||||
void setBuffer(uint8_t _stage, IndexBufferHandle _handle)
|
||||
{
|
||||
Binding& bind = m_draw.m_bind[_stage];
|
||||
bind.m_idx = _handle.idx;
|
||||
bind.m_type = uint8_t(Binding::IndexBuffer);
|
||||
bind.m_un.m_compute.m_access = uint8_t(Access::Read);
|
||||
}
|
||||
|
||||
void setBuffer(uint8_t _stage, VertexBufferHandle _handle)
|
||||
{
|
||||
Binding& bind = m_draw.m_bind[_stage];
|
||||
bind.m_idx = _handle.idx;
|
||||
bind.m_type = uint8_t(Binding::VertexBuffer);
|
||||
bind.m_un.m_compute.m_access = uint8_t(Access::Read);
|
||||
}
|
||||
|
||||
void setImage(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format)
|
||||
{
|
||||
Binding& bind = m_compute.m_bind[_stage];
|
||||
@@ -4055,20 +4039,6 @@ namespace bgfx
|
||||
m_submit->setBuffer(_stage, dvb.m_handle, _access);
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setBuffer(uint8_t _stage, DynamicIndexBufferHandle _handle))
|
||||
{
|
||||
BGFX_CHECK_HANDLE("setBuffer", m_dynamicIndexBufferHandle, _handle);
|
||||
const DynamicIndexBuffer& dib = m_dynamicIndexBuffers[_handle.idx];
|
||||
m_submit->setBuffer(_stage, dib.m_handle);
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setBuffer(uint8_t _stage, DynamicVertexBufferHandle _handle) )
|
||||
{
|
||||
BGFX_CHECK_HANDLE("setBuffer", m_dynamicVertexBufferHandle, _handle);
|
||||
const DynamicVertexBuffer& dvb = m_dynamicVertexBuffers[_handle.idx];
|
||||
m_submit->setBuffer(_stage, dvb.m_handle);
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setBuffer(uint8_t _stage, IndirectBufferHandle _handle, Access::Enum _access) )
|
||||
{
|
||||
BGFX_CHECK_HANDLE("setBuffer", m_vertexBufferHandle, _handle);
|
||||
|
||||
Reference in New Issue
Block a user