mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 21:02:15 +00:00
Moves CapturingTesselator, JSON Models, and misc utility classes to GTNHlib (#587)
* Moves CapturingTesselator, JSON Models, and misc utility classes to GTNHlib * Switch to separate source set for mixins - faster incremental builds
This commit is contained in:
1 parent
1315d8971a
commit
558ea0fe12
404 files changed
+631
-5190
No files matched your search
@@ -2,7 +2,7 @@ package net.coderbot.iris.vertices;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class BufferBuilderPolygonView implements QuadView {
|
||||
public class BufferBuilderPolygonView implements IrisQuadView {
|
||||
private ByteBuffer buffer;
|
||||
private int writePointer;
|
||||
private int stride = 48;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package net.coderbot.iris.vertices;
|
||||
|
||||
import com.gtnewhorizons.angelica.compat.mojang.VertexFormat;
|
||||
import com.gtnewhorizon.gtnhlib.client.renderer.vertex.VertexFormat;
|
||||
|
||||
public interface ExtendingBufferBuilder {
|
||||
void iris$beginWithoutExtending(int drawMode, VertexFormat vertexFormat);
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@ package net.coderbot.iris.vertices;
|
||||
/**
|
||||
* Implementations of this class must support at least four vertices.
|
||||
*/
|
||||
public interface QuadView extends TriView {
|
||||
public interface IrisQuadView extends TriView {
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
package net.coderbot.iris.vertices;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.gtnewhorizons.angelica.compat.mojang.DefaultVertexFormat;
|
||||
import com.gtnewhorizons.angelica.compat.mojang.VertexFormat;
|
||||
import com.gtnewhorizons.angelica.compat.mojang.VertexFormatElement;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.client.renderer.vertex.DefaultVertexFormat;
|
||||
import com.gtnewhorizon.gtnhlib.client.renderer.vertex.VertexFormat;
|
||||
import com.gtnewhorizon.gtnhlib.client.renderer.vertex.VertexFormatElement;
|
||||
|
||||
public class IrisVertexFormats {
|
||||
public static final VertexFormatElement ENTITY_ELEMENT;
|
||||
@@ -38,12 +39,11 @@ public class IrisVertexFormats {
|
||||
entityElements.add(DefaultVertexFormat.POSITION_ELEMENT); // 12
|
||||
entityElements.add(DefaultVertexFormat.COLOR_ELEMENT); // 16
|
||||
entityElements.add(DefaultVertexFormat.TEXTURE_ELEMENT); // 24
|
||||
entityElements.add(DefaultVertexFormat.OVERLAY_ELEMENT); // 28
|
||||
entityElements.add(DefaultVertexFormat.LIGHT_ELEMENT); // 32
|
||||
entityElements.add(DefaultVertexFormat.NORMAL_ELEMENT); // 35
|
||||
entityElements.add(DefaultVertexFormat.PADDING_ELEMENT); // 36
|
||||
entityElements.add(MID_TEXTURE_ELEMENT); // 44
|
||||
entityElements.add(TANGENT_ELEMENT); // 48
|
||||
entityElements.add(DefaultVertexFormat.LIGHT_ELEMENT); // 28
|
||||
entityElements.add(DefaultVertexFormat.NORMAL_ELEMENT); // 31
|
||||
entityElements.add(DefaultVertexFormat.PADDING_ELEMENT); // 32
|
||||
entityElements.add(MID_TEXTURE_ELEMENT); // 40
|
||||
entityElements.add(TANGENT_ELEMENT); // 44
|
||||
|
||||
TERRAIN = new VertexFormat(terrainElements.build());
|
||||
ENTITY = new VertexFormat(entityElements.build());
|
||||
|
||||
@@ -43,7 +43,7 @@ public abstract class NormalHelper {
|
||||
* <p>Assumes counter-clockwise winding order, which is the norm.
|
||||
* Expects convex quads with all points co-planar.
|
||||
*/
|
||||
public static void computeFaceNormal(@NotNull Vector3f saveTo, QuadView q) {
|
||||
public static void computeFaceNormal(@NotNull Vector3f saveTo, IrisQuadView q) {
|
||||
// final Direction nominalFace = q.nominalFace();
|
||||
//
|
||||
// if (GeometryHelper.isQuadParallelToFace(nominalFace, q)) {
|
||||
|
||||
Reference in new issue
Block a user