Skip to content

Commit

Permalink
Update to Sodium 0.3.3 (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS authored Nov 23, 2021
1 parent 849c327 commit 99f2fcf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'fabric-loom' version '0.10-SNAPSHOT'
id 'maven-publish'

id 'org.ajoberstar.grgit' version '4.1.0'
Expand Down Expand Up @@ -43,6 +43,9 @@ dependencies {
// You may need to force-disable transitiveness on them.

modImplementation "maven.modrinth:sodium:mc1.17.1-0.3.0"

// Transitive dependency of Sodium
implementation("org.joml:joml:1.10.2")
}

processResources {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import link.infra.indium.Indigo;
import link.infra.indium.renderer.render.IndiumTerrainRenderContext;
import me.jellysquid.mods.sodium.client.gl.compile.ChunkBuildContext;
import me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuildBuffers;
import me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuildResult;
import me.jellysquid.mods.sodium.client.render.chunk.compile.buffers.ChunkModelBuilder;
Expand Down Expand Up @@ -32,13 +33,13 @@ public abstract class MixinChunkRenderRebuildTask extends ChunkRenderBuildTask {
private final IndiumTerrainRenderContext indiumContext = new IndiumTerrainRenderContext();

@Inject(at = @At("HEAD"), method = "performBuild", remap = false)
public void beforePerformBuild(ChunkRenderCacheLocal cache, ChunkBuildBuffers buffers, CancellationSource cancellationSource, CallbackInfoReturnable<ChunkBuildResult> cir) {
public void beforePerformBuild(ChunkBuildContext model, CancellationSource seed, CallbackInfoReturnable<ChunkBuildResult> cir) {
// Set up our rendering context
indiumContext.prepare(cache.getWorldSlice(), buffers);
indiumContext.prepare(model.cache.getWorldSlice(), model.buffers);
}

@Inject(at = @At("RETURN"), method = "performBuild", remap = false)
public void afterPerformBuild(ChunkRenderCacheLocal cache, ChunkBuildBuffers buffers, CancellationSource cancellationSource, CallbackInfoReturnable<ChunkBuildResult> cir) {
public void afterPerformBuild(ChunkBuildContext model, CancellationSource seed, CallbackInfoReturnable<ChunkBuildResult> cir) {
// Tear down our rendering context
indiumContext.release();
}
Expand Down

0 comments on commit 99f2fcf

Please sign in to comment.