move init
This commit is contained in:
@@ -2,6 +2,7 @@ package me.cortex.voxy.client;
|
|||||||
|
|
||||||
import me.cortex.voxy.client.core.gl.Capabilities;
|
import me.cortex.voxy.client.core.gl.Capabilities;
|
||||||
import me.cortex.voxy.client.core.model.bakery.BudgetBufferRenderer;
|
import me.cortex.voxy.client.core.model.bakery.BudgetBufferRenderer;
|
||||||
|
import me.cortex.voxy.client.core.rendering.util.SharedIndexBuffer;
|
||||||
import me.cortex.voxy.common.Logger;
|
import me.cortex.voxy.common.Logger;
|
||||||
import me.cortex.voxy.commonImpl.VoxyCommon;
|
import me.cortex.voxy.commonImpl.VoxyCommon;
|
||||||
import net.fabricmc.api.ClientModInitializer;
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
@@ -19,13 +20,18 @@ public class VoxyClient implements ClientModInitializer {
|
|||||||
@Override
|
@Override
|
||||||
public void onInitializeClient() {
|
public void onInitializeClient() {
|
||||||
ClientLifecycleEvents.CLIENT_STARTED.register(client->{
|
ClientLifecycleEvents.CLIENT_STARTED.register(client->{
|
||||||
|
Capabilities.init();//Ensure clinit is called
|
||||||
|
|
||||||
boolean systemSupported = Capabilities.INSTANCE.compute && Capabilities.INSTANCE.indirectParameters;
|
boolean systemSupported = Capabilities.INSTANCE.compute && Capabilities.INSTANCE.indirectParameters;
|
||||||
if (systemSupported) {
|
if (systemSupported) {
|
||||||
|
|
||||||
|
SharedIndexBuffer.INSTANCE.id();
|
||||||
|
BudgetBufferRenderer.init();
|
||||||
|
|
||||||
VoxyCommon.setInstanceFactory(VoxyClientInstance::new);
|
VoxyCommon.setInstanceFactory(VoxyClientInstance::new);
|
||||||
} else {
|
} else {
|
||||||
Logger.error("Voxy is unsupported on your system.");
|
Logger.error("Voxy is unsupported on your system.");
|
||||||
}
|
}
|
||||||
BudgetBufferRenderer.init();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -54,10 +54,6 @@ public class VoxyRenderSystem {
|
|||||||
glFinish();
|
glFinish();
|
||||||
glFinish();
|
glFinish();
|
||||||
|
|
||||||
//Trigger the shared index buffer loading
|
|
||||||
SharedIndexBuffer.INSTANCE.id();
|
|
||||||
Capabilities.init();//Ensure clinit is called
|
|
||||||
|
|
||||||
this.worldIn = world;
|
this.worldIn = world;
|
||||||
this.renderer = new RenderService(world, threadPool);
|
this.renderer = new RenderService(world, threadPool);
|
||||||
this.postProcessing = new PostProcessing();
|
this.postProcessing = new PostProcessing();
|
||||||
|
|||||||
Reference in New Issue
Block a user