mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-26 23:18:04 +01:00
Merge pull request #162 from marchermans/1.18/dev
Switch to the block vertex format for instancing
This commit is contained in:
commit
8a64d56d6c
2 changed files with 3 additions and 3 deletions
|
@ -94,7 +94,7 @@ public class InstancedMaterialGroup<P extends WorldProgram> implements MaterialG
|
||||||
if (material.nothingToRender()) continue;
|
if (material.nothingToRender()) continue;
|
||||||
|
|
||||||
P program = owner.context.getProgram(ProgramContext.create(entry.getKey()
|
P program = owner.context.getProgram(ProgramContext.create(entry.getKey()
|
||||||
.getProgramSpec(), Formats.POS_TEX_NORMAL, layer));
|
.getProgramSpec(), Formats.BLOCK, layer));
|
||||||
|
|
||||||
// XXX Shader is bound and not reset or restored
|
// XXX Shader is bound and not reset or restored
|
||||||
program.bind();
|
program.bind();
|
||||||
|
@ -155,7 +155,7 @@ public class InstancedMaterialGroup<P extends WorldProgram> implements MaterialG
|
||||||
.onAMDWindows()) {
|
.onAMDWindows()) {
|
||||||
return FallbackAllocator.INSTANCE;
|
return FallbackAllocator.INSTANCE;
|
||||||
} else {
|
} else {
|
||||||
return new ModelPool(Formats.POS_TEX_NORMAL);
|
return new ModelPool(Formats.BLOCK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ public enum FallbackAllocator implements ModelAllocator {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BufferedModel alloc(Model model, Callback allocationCallback) {
|
public BufferedModel alloc(Model model, Callback allocationCallback) {
|
||||||
IndexedModel out = new IndexedModel(model, Formats.POS_TEX_NORMAL);
|
IndexedModel out = new IndexedModel(model, Formats.BLOCK);
|
||||||
allocationCallback.onAlloc(out);
|
allocationCallback.onAlloc(out);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue