mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-25 22:46:26 +01:00
Fix IndexedModel allocating incorrect amount of bytes
- model.size() returned the byte size relative to the model's VertexType, but the byte size relative to the passed VertexType is needed instead
This commit is contained in:
parent
f5acaeb1d7
commit
d96ad156e1
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ public class IndexedModel implements BufferedModel {
|
|||
|
||||
vbo.bind();
|
||||
// allocate the buffer on the gpu
|
||||
vbo.ensureCapacity(model.size());
|
||||
vbo.ensureCapacity(type.byteOffset(model.vertexCount()));
|
||||
|
||||
// mirror it in system memory, so we can write to it, and upload our model.
|
||||
try (MappedBuffer buffer = vbo.getBuffer()) {
|
||||
|
|
Loading…
Reference in a new issue