Use GlStateManager

This commit is contained in:
mezz committed 2017-01-24 21:18:28 -08:00
1 parent 31a305ffc2
commit 9c4b081f6d
24 files changed
+144 -152

No files matched your search

@@ -31,10 +31,10 @@ public class AnalystPageAppearance extends ControlAnalystPage {
new ControlIconDisplay(this, (this.w() - w) / 2, y - ((sections == 1) ? 0 : 0), null) {
@Override
public void onRenderForeground(int guiWidth, int guiHeight) {
// GL11.glPushMatrix();
// GlStateManager.pushMatrix();
// final float scale = w / 16.0f;
// final float dy = (sections > 1) ? 16.0f : 0.0f;
// GL11.glScalef(scale, scale, 1.0f);
// GlStateManager.scale(scale, scale, 1.0f);
// CraftGUI.Render.colour(ind.getGenome().getStemColor().getColor(false));
// if (sections > 1) {
// CraftGUI.Render.iconBlock(IPoint.ZERO, ind.getGenome().getType().getStem(EnumFlowerStage.FLOWER, true, 1));
@@ -50,7 +50,7 @@ public class AnalystPageAppearance extends ControlAnalystPage {
// CraftGUI.Render.iconBlock(IPoint.ZERO, ind.getGenome().getType().getVariantIcon(EnumFlowerStage.FLOWER, true, 1));
// }
// CraftGUI.Render.iconBlock(new IPoint(0, dy), ind.getGenome().getType().getVariantIcon(EnumFlowerStage.FLOWER, true, 0));
// GL11.glPopMatrix();
// GlStateManager.popMatrix();
}
};
}
@@ -15,7 +15,7 @@ import forestry.api.genetics.IAllele;
import forestry.api.genetics.IChromosomeType;
import forestry.api.genetics.IIndividual;
import forestry.api.genetics.ISpeciesRoot;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.renderer.GlStateManager;
public class AnalystPageGenome extends ControlAnalystPage {
boolean active;
@@ -32,14 +32,14 @@ public class AnalystPageGenome extends ControlAnalystPage {
final Control scaled = new Control(this, 0, y, 0, 0) {
@Override
public void onRenderBackground(int guiWidth, int guiHeight) {
GL11.glPushMatrix();
GL11.glTranslatef(10.0f, -15.0f, 0.0f);
GL11.glScalef(0.9f, 0.95f, 1.0f);
GlStateManager.pushMatrix();
GlStateManager.translate(10.0f, -15.0f, 0.0f);
GlStateManager.scale(0.9f, 0.95f, 1.0f);
}
@Override
public void onRenderForeground(int guiWidth, int guiHeight) {
GL11.glPopMatrix();
GlStateManager.popMatrix();
}
};
for (final IChromosomeType chromo : system.getActiveKaryotype()) {