List of usage examples for org.lwjgl.opengl GL11 glGetBoolean
@NativeType("void") public static boolean glGetBoolean(@NativeType("GLenum") int pname)
From source file:vazkii.s_hg.client.model.ModelHourglass.java
License:Open Source License
public void render(float fract1, float fract2, boolean flip, int color) { if (flip) {// w w w . j a va 2s.c o m float fract3 = fract1; fract1 = fract2; fract2 = fract3; } float f = 1F / 16F; ring.render(f); base1.render(f); base2.render(f); Color c = new Color(color); GL11.glColor3ub((byte) c.getRed(), (byte) c.getGreen(), (byte) c.getBlue()); boolean normalize = GL11.glGetBoolean(GL11.GL_NORMALIZE); GL11.glEnable(GL11.GL_NORMALIZE); if (fract1 > 0) { GL11.glPushMatrix(); if (flip) GL11.glTranslatef(-2.5F * f, 1.0F * f, -2.5F * f); else { GL11.glRotatef(180F, 0F, 0F, 1F); GL11.glTranslatef(-2.5F * f, -6.0F * f, -2.5F * f); } GL11.glScalef(1F, fract1, 1F); sand1.render(f); GL11.glPopMatrix(); } if (fract2 > 0) { GL11.glPushMatrix(); if (flip) GL11.glTranslatef(-2.5F * f, -6.0F * f, -2.5F * f); else { GL11.glRotatef(180F, 0F, 0F, 1F); GL11.glTranslatef(-2.5F * f, 1.0F * f, -2.5F * f); } GL11.glScalef(1F, fract2, 1F); sand2.render(f); GL11.glPopMatrix(); } if (!normalize) GL11.glDisable(GL11.GL_NORMALIZE); GL11.glColor3f(1F, 1F, 1F); glass1.render(f); glass2.render(f); }