We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7b8d22 commit 053f281Copy full SHA for 053f281
vclib/render/include/vclib/bgfx/buffers/index_buffer.h
@@ -99,11 +99,13 @@ class IndexBuffer
99
uint stage = UINT_NULL,
100
bgfx::Access::Enum access = bgfx::Access::Read) const
101
{
102
- if (stage == UINT_NULL || stage >= 255) {
103
- bgfx::setIndexBuffer(mIndexBufferHandle);
104
- }
105
- else {
106
- bgfx::setBuffer(stage, mIndexBufferHandle, access);
+ if (bgfx::isValid(mIndexBufferHandle)) {
+ if (stage == UINT_NULL) {
+ bgfx::setIndexBuffer(mIndexBufferHandle);
+ }
+ else {
107
+ bgfx::setBuffer(stage, mIndexBufferHandle, access);
108
109
}
110
111
0 commit comments