mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-26 15:06:28 +01:00
Fix occasional crash when flywheel objects are loaded in
This commit is contained in:
parent
c07c6363f9
commit
20a75321e2
2 changed files with 2 additions and 4 deletions
|
@ -44,7 +44,7 @@ public class InstancedMaterialGroup<P extends WorldProgram> implements MaterialG
|
|||
.onAMDWindows()) {
|
||||
this.allocator = FallbackAllocator.INSTANCE;
|
||||
} else {
|
||||
this.allocator = new ModelPool(Formats.POS_TEX_NORMAL, 2048);
|
||||
this.allocator = new ModelPool(Formats.POS_TEX_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,16 +35,14 @@ public class ModelPool implements ModelAllocator {
|
|||
* Create a new model pool.
|
||||
*
|
||||
* @param vertexType The vertex type of the models that will be stored in the pool.
|
||||
* @param initialSize The initial size of the pool, in vertices.
|
||||
*/
|
||||
public ModelPool(VertexType vertexType, int initialSize) {
|
||||
public ModelPool(VertexType vertexType) {
|
||||
this.vertexType = vertexType;
|
||||
int stride = vertexType.getStride();
|
||||
|
||||
vbo = new MappedGlBuffer(GlBufferType.ARRAY_BUFFER);
|
||||
|
||||
vbo.bind();
|
||||
vbo.ensureCapacity((long) stride * initialSize);
|
||||
vbo.setGrowthMargin(stride * 64);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue