Add a check for instance buffer overflow
This commit is contained in:
parent
5557a0165a
commit
8588720f6b
@ -121,6 +121,7 @@ FillInstances_impl(std::vector<std::pair<GLMesh *, scene::ISceneNode *> > Instan
|
||||
auto &Tp = InstanceList[i];
|
||||
scene::ISceneNode *node = Tp.second;
|
||||
InstanceFiller<T>::add(mesh, node, InstanceBuffer[InstanceBufferOffset++]);
|
||||
assert(InstanceBufferOffset * sizeof(T) < 10000 * sizeof(InstanceDataDualTex));
|
||||
}
|
||||
|
||||
DrawElementsIndirectCommand &CurrentCommand = CommandBuffer[CommandBufferOffset++];
|
||||
|
Loading…
Reference in New Issue
Block a user