Skip to content

Commit

Permalink
Update to RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Aug 2, 2023
1 parent 231387c commit 44ea376
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion buildscript/src/main/java/Buildscript.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class Buildscript extends SimpleFabricProject {
static final boolean SODIUM = true;
static final boolean CUSTOM_SODIUM = true;
static final String MC_VERSION = "1.20.1";
static final String customSodiumName = "sodium-fabric-mc1.20.1-0.5.0-beta3+git.c207837.jar";
static final String customSodiumName = "sodium-fabric-mc1.20.1-0.5.0-rc1.jar";

private static final String[] SOURCE_SETS = new String[] {
"main",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.mojang.blaze3d.vertex.PoseStack;
import me.jellysquid.mods.sodium.client.model.quad.ModelQuadView;
import net.caffeinemc.mods.sodium.api.math.MatrixHelper;
import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate;
import net.caffeinemc.mods.sodium.api.util.NormI8;
import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter;
import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription;
Expand Down Expand Up @@ -91,7 +90,7 @@ public static void writeQuadVertices(VertexBufferWriter writer, PoseStack.Pose m
Matrix3f matNormal = matrices.normal();
Matrix4f matPosition = matrices.pose();

try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) {
try (MemoryStack stack = MemoryStack.stackPush()) {
long buffer = stack.nmalloc(4 * STRIDE);
long ptr = buffer;

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

import com.mojang.blaze3d.vertex.PoseStack;
import me.jellysquid.mods.sodium.client.model.quad.ModelQuadView;
import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate;
import net.caffeinemc.mods.sodium.api.util.NormI8;
import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter;
import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription;
Expand Down Expand Up @@ -101,7 +100,7 @@ public static void writeQuadVertices(VertexBufferWriter writer, PoseStack.Pose m
Matrix3f matNormal = matrices.normal();
Matrix4f matPosition = matrices.pose();

try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) {
try (MemoryStack stack = MemoryStack.stackPush()) {
long buffer = stack.nmalloc(4 * STRIDE);
long ptr = buffer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.mojang.blaze3d.vertex.VertexConsumer;
import me.jellysquid.mods.sodium.client.model.ModelCuboidAccessor;
import me.jellysquid.mods.sodium.client.render.vertex.VertexConsumerUtils;
import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate;
import me.jellysquid.mods.sodium.client.render.immediate.model.ModelCuboid;
import net.caffeinemc.mods.sodium.api.util.NormI8;
import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription;
Expand Down Expand Up @@ -79,7 +78,7 @@ private void renderCuboidsFast(PoseStack.Pose matrices, VertexConsumer vertexCon
for (ModelCuboid cuboid : this.sodium$cuboids) {
cuboid.updateVertices(matrices.pose());

try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) {
try (MemoryStack stack = MemoryStack.stackPush()) {
long buffer = stack.nmalloc(4 * 6 * stride);
long ptr = buffer;

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

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate;
import net.caffeinemc.mods.sodium.api.util.NormI8;
import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter;
import net.caffeinemc.mods.sodium.api.vertex.format.common.ModelVertex;
Expand Down Expand Up @@ -112,7 +111,7 @@ private static void renderShadowPart(PoseStack.Pose matrices, VertexConsumer ver

int stride = extended ? EntityVertex.STRIDE : ModelVertex.STRIDE;

try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) {
try (MemoryStack stack = MemoryStack.stackPush()) {
long buffer = stack.nmalloc(4 * stride);
long ptr = buffer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.mojang.blaze3d.vertex.VertexConsumer;
import me.jellysquid.mods.sodium.client.model.ModelCuboidAccessor;
import me.jellysquid.mods.sodium.client.render.immediate.model.ModelCuboid;
import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate;
import net.caffeinemc.mods.sodium.api.util.ColorABGR;
import net.caffeinemc.mods.sodium.api.util.NormI8;
import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter;
Expand Down Expand Up @@ -68,7 +67,7 @@ private void compile(PoseStack.Pose matrices, VertexConsumer vertexConsumer, int
cuboid.updateVertices(matrices.pose());


try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) {
try (MemoryStack stack = MemoryStack.stackPush()) {
long buffer = stack.nmalloc(4 * 6 * (extend ? EntityVertex.STRIDE : ModelVertex.STRIDE));
long ptr = buffer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package net.coderbot.iris.compat.sodium.mixin.font;

import com.mojang.blaze3d.vertex.VertexConsumer;
import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate;
import net.caffeinemc.mods.sodium.api.util.ColorABGR;
import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter;
import net.caffeinemc.mods.sodium.api.vertex.format.common.GlyphVertex;
Expand Down Expand Up @@ -72,7 +71,7 @@ public void render(boolean italic, float x, float y, Matrix4f matrix, VertexCons

boolean ext = extend();
int stride = ext ? GlyphVertexExt.STRIDE : GlyphVertex.STRIDE;
try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) {
try (MemoryStack stack = MemoryStack.stackPush()) {
long buffer = stack.nmalloc(4 * stride);
long ptr = buffer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.caffeinemc.mods.sodium.api.math.MatrixHelper;
import net.caffeinemc.mods.sodium.api.render.immediate.RenderImmediate;
import net.caffeinemc.mods.sodium.api.util.ColorABGR;
import net.caffeinemc.mods.sodium.api.util.NormI8;
import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter;
Expand Down Expand Up @@ -63,7 +62,7 @@ private static void renderShadowPart(PoseStack.Pose matrices, VertexConsumer ver
float midV = (v1 + v2) / 2;

int stride = extended ? EntityVertex.STRIDE : ModelVertex.STRIDE;
try (MemoryStack stack = RenderImmediate.VERTEX_DATA.push()) {
try (MemoryStack stack = MemoryStack.stackPush()) {
long buffer = stack.nmalloc(4 * stride);
long ptr = buffer;

Expand Down

0 comments on commit 44ea376

Please sign in to comment.