33import me .cortex .voxy .client .core .IGetVoxyRenderSystem ;
44import me .cortex .voxy .client .core .VoxyRenderSystem ;
55import me .cortex .voxy .client .core .gl .Capabilities ;
6+ import me .cortex .voxy .client .core .gpu .GpuBackend ;
7+ import me .cortex .voxy .client .core .gpu .GpuBackendProvider ;
68import me .cortex .voxy .client .core .model .bakery .BudgetBufferRenderer ;
79import me .cortex .voxy .client .core .rendering .util .SharedIndexBuffer ;
10+ import me .cortex .voxy .client .config .VoxyConfig ;
811import me .cortex .voxy .common .Logger ;
912import me .cortex .voxy .commonImpl .VoxyCommon ;
1013import net .fabricmc .api .ClientModInitializer ;
2629
2730public class VoxyClient implements ClientModInitializer {
2831 private static final HashSet <String > FREX = new HashSet <>();
32+ private static GpuBackend backend ;
2933
3034 public static void initVoxyClient () {
3135 Capabilities .init ();//Ensure clinit is called
36+ backend = GpuBackendProvider .create (VoxyConfig .CONFIG .gpuBackend );
3237
3338 if (Capabilities .INSTANCE .hasBrokenDepthSampler ) {
3439 Logger .error ("AMD broken depth sampler detected, voxy does not work correctly and has been disabled, this will hopefully be fixed in the future" );
@@ -101,4 +106,8 @@ public static int getOcclusionDebugState() {
101106 public static boolean disableSodiumChunkRender () {
102107 return false ;// getOcclusionDebugState() != 0;
103108 }
104- }
109+
110+ public static GpuBackend getBackend () {
111+ return backend ;
112+ }
113+ }
0 commit comments