Skip to content

Commit

Permalink
Gorge render attempt #2 (#3109)
Browse files Browse the repository at this point in the history
  • Loading branch information
CookieBrigade authored Sep 7, 2024
1 parent 2fb7d0c commit 7422102
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 1 addition & 3 deletions src/main/java/tectech/thing/block/RenderForgeOfGods.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ private void RenderRings(TileEntityForgeOfGods tile, double x, double y, double
bindTexture(TextureMap.locationBlocksTexture);
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ZERO);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

GL11.glPushMatrix();
GL11.glTranslated(x + .5f, y + .5f, z + .5f);
Expand Down Expand Up @@ -403,9 +403,7 @@ public void renderTileEntityAt(TileEntity tile, double x, double y, double z, fl
.getWorldTotalTime() % (20 * 36000) + timeSinceLastTick;

RenderRings(forgeTile, x, y, z, timer);

RenderEntireStar(forgeTile, x, y, z, timer);

RenderBeamSegment(forgeTile, x, y, z, timer);

}
Expand Down
11 changes: 5 additions & 6 deletions src/main/java/tectech/util/StructureVBO.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.gtnewhorizon.gtnhlib.client.renderer.TessellatorManager;
import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VertexBuffer;
import com.gtnewhorizon.gtnhlib.client.renderer.vertex.DefaultVertexFormat;
import com.gtnewhorizon.gtnhlib.client.renderer.vbo.VBOManager;

public class StructureVBO {

Expand Down Expand Up @@ -94,11 +95,9 @@ public VertexBuffer build() {
}
}
}

for (char value : values) {
System.out.println(value);
}

return TessellatorManager.stopCapturingToVBO(DefaultVertexFormat.POSITION_TEXTURE_NORMAL);
VertexBuffer vertexBuffer = TessellatorManager.stopCapturingToVBO(DefaultVertexFormat.POSITION_TEXTURE_NORMAL);
final int vboID = VBOManager.generateDisplayLists(1);
VBOManager.registerVBO(vboID, vertexBuffer);
return vertexBuffer;
}
}

0 comments on commit 7422102

Please sign in to comment.