jitter together!

This commit is contained in:
StevenRS11 2014-08-19 18:50:18 -05:00
parent 68ff8f6921
commit 04ec4b3d2d
2 changed files with 8 additions and 5 deletions

View file

@ -368,7 +368,7 @@ public class LSystem
Poly2Tri.triangulate(poly); Poly2Tri.triangulate(poly);
ArrayList<DelaunayTriangle> tris =(ArrayList<DelaunayTriangle>) poly.getTriangles(); ArrayList<DelaunayTriangle> tris =(ArrayList<DelaunayTriangle>) poly.getTriangles();
for(DelaunayTriangle tri : tris) for(DelaunayTriangle tri : tris)
{ {
for(TriangulationPoint tpoint : tri.points) for(TriangulationPoint tpoint : tri.points)

View file

@ -93,17 +93,18 @@ public class RenderRift extends TileEntitySpecialRenderer
int jIndex = 0; int jIndex = 0;
// set the color for the render // set the color for the render
GL11.glColor4f(.15F, .15F, .1F, 1F); GL11.glColor4f(.3F, .3F, .3F, 1F);
//set the blending mode //set the blending mode
GL11.glEnable(GL_BLEND); GL11.glEnable(GL_BLEND);
glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE); //glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE);
glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO);
// start rendering triangles for the moving shards // start rendering triangles for the moving shards
GL11.glBegin(GL11.GL_TRIANGLES); GL11.glBegin(GL11.GL_TRIANGLES);
for (Point p : poly.points) for (Point p : poly.points)
{ {
jIndex++; jIndex = Math.abs(p.x+p.y);
// calculate the rotation for the fractal, apply offset, and apply // calculate the rotation for the fractal, apply offset, and apply
// jitter // jitter
@ -131,9 +132,10 @@ public class RenderRift extends TileEntitySpecialRenderer
GL11.glEnd(); GL11.glEnd();
//GL11.glDisable(GL_BLEND); //GL11.glDisable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_DST_COLOR); //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_DST_COLOR);
//glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO); //glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO);
/**
GL11.glBegin(GL11.GL_TRIANGLES); GL11.glBegin(GL11.GL_TRIANGLES);
// draw the next set of triangles to form a background and change their // draw the next set of triangles to form a background and change their
@ -165,5 +167,6 @@ public class RenderRift extends TileEntitySpecialRenderer
} }
// stop drawing triangles // stop drawing triangles
GL11.glEnd(); GL11.glEnd();
**/
} }
} }