Example usage for org.lwjgl.opengl GL11 glScalef

List of usage examples for org.lwjgl.opengl GL11 glScalef

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL11 glScalef.

Prototype

public static native void glScalef(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y,
        @NativeType("GLfloat") float z);

Source Link

Document

Manipulates the current matrix with a general scaling matrix along the x-, y- and z- axes.

Usage

From source file:forestry.lepidopterology.render.ButterflyItemRenderer.java

License:Open Source License

private void renderButterflyItem(IButterfly butterfly, float translateX, float translateY, float translateZ) {
    float yaw = 1;
    float pitch = 1;

    GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
    GL11.glEnable(GL11.GL_LIGHTING);//from w w  w  .  ja v  a 2 s . c om
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_COLOR_MATERIAL);

    GL11.glPushMatrix();

    if (RenderItem.renderInFrame) {
        //GL11.glScalef(-2.0f, 2.0f, 2.0f);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
        GL11.glScalef(1.1f, 1f, 1f);

        GL11.glTranslatef(0, -0.7f, 0.2f);

        entity.renderYawOffset = 0;
        entity.rotationYaw = 0;
        entity.rotationPitch = 0;
        entity.rotationYawHead = entity.rotationYaw;

        RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0f);

    } else {
        GL11.glTranslatef(translateX, translateY, translateZ);

        GL11.glScalef(-2.0f, 2.0f, 2.0f);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(-((float) Math.atan((double) (pitch / 40.0F))) * 20.0F, 1.0F, 0.0F, 0.0F);

        entity.renderYawOffset = (float) Math.atan((double) (yaw / 40.0F)) * 20.0F;
        entity.rotationYaw = (float) Math.atan((double) (yaw / 40.0F)) * 40.0F;
        entity.rotationPitch = -((float) Math.atan((double) (pitch / 40.0F))) * 20.0F;
        entity.rotationYawHead = entity.rotationYaw;

        RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, getWingYaw(butterfly));

    }

    GL11.glPopMatrix();

    RenderHelper.disableStandardItemLighting();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
    GL11.glPopAttrib();

}

From source file:forestry.lepidopterology.render.ButterflyItemRenderer.java

License:Open Source License

private void renderButterflyInInventory(IButterfly butterfly) {

    GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
    GL11.glEnable(GL11.GL_LIGHTING);/*from www  . jav  a2 s .com*/
    GL11.glEnable(GL11.GL_DEPTH_TEST);
    GL11.glEnable(GL11.GL_COLOR_MATERIAL);
    RenderHelper.enableStandardItemLighting();
    GL11.glPushMatrix();

    GL11.glTranslatef(0f, -0.75f, 0f);
    GL11.glScalef(-2.0f, 2.0f, 2.0f);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(-35.0F, 1.0F, 0.0F, 0.0F);
    GL11.glScalef(1.1f, 1f, 1f);

    entity.renderYawOffset = 0;
    entity.rotationYaw = 0;
    entity.rotationPitch = 0;
    entity.rotationYawHead = entity.rotationYaw;

    RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, getWingYaw(butterfly));

    GL11.glPopMatrix();
    RenderHelper.disableStandardItemLighting();
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
    GL11.glPopAttrib();

}

From source file:forestry.lepidopterology.render.ModelButterfly.java

License:Open Source License

@Override
public void render(Entity entity, float f, float f1, float swing, float f3, float f4, float f5) {
    super.render(entity, f, f1, swing, f3, f4, f5);

    //body.rotateAngleX = ((float)Math.PI / 4F) + MathHelper.cos(swing * 0.1F) * 0.15F;
    //body.rotateAngleY = 0.0F;
    wingRight.rotateAngleZ = MathHelper.cos(swing * 1.3F) * (float) Math.PI * 0.25F;
    wingLeft.rotateAngleZ = -wingRight.rotateAngleZ;

    GL11.glPushMatrix();//from   ww w.java2  s.c om
    GL11.glScalef(scale, scale, scale);
    GL11.glTranslatef(0.0F, (12.0f / scale) * f5, 0.0F);
    wingRight.render(f5);
    eyeRight.render(f5);
    eyeLeft.render(f5);
    wingLeft.render(f5);
    body.render(f5);
    GL11.glPopMatrix();

}

From source file:fr.def.iss.vd2.lib_v3d.element.basemap.PolyBasemap.java

License:Open Source License

private void draw() {

    vertices.clear();//from   www  . j a  v  a 2 s. co  m
    stripVertexCount.clear();

    float dx = -(minX / 2 + maxX / 2) * innerScale;
    float dy = -(minY / 2 + maxY / 2) * innerScale;

    GL11.glPushMatrix();
    GL11.glTranslatef(dx, dy, 0);
    GL11.glScalef(innerScale, innerScale, innerScale);

    while (stripVertexCount.hasRemaining()) {
        int lineLenght = stripVertexCount.get();

        GL11.glBegin(GL11.GL_LINE_STRIP); // Draw line
        for (int j = 0; j < lineLenght; j++) {

            if (vertices.remaining() >= 2) {
                float x = vertices.get();
                float y = vertices.get();
                GL11.glVertex3f(x, y, 0.0f);
            } else {
                // we should log the problem, but this method is called too
                // often (each time GL redraws). We don't want to flood the
                // logs, so we just ignore the problem silently. The
                // correctness of the data should be done at load time.
            }
        }

        GL11.glEnd();

    }

    GL11.glPopMatrix();

}

From source file:fr.def.iss.vd2.lib_v3d.element.V3DAbsoluteSizeElement.java

License:Open Source License

@Override
protected void doDisplay(I3dCamera camera) {
    if (childElement == null) {
        return;//from   w w w  .j a v a 2  s  .  c o  m
    }

    float zoomFactor = camera.getRelativeSize();

    V3DVect3 boundingBoxSize = absoluteSize.multiply(zoomFactor);
    V3DVect3 scale = boundingBoxSize.divideBy(childElement.getBoundingBox().getSize());

    if (!maxOnly) {

        GL11.glPushMatrix();
        GL11.glScalef(scale.x, scale.y, scale.z);

        childElement.display(camera);

        GL11.glPopMatrix();
    } else {

        float min = Math.min(scale.x, scale.y);
        if (scale.z != 0) {
            min = Math.min(min, scale.z);
        }

        GL11.glPushMatrix();
        GL11.glScalef(min, min, min);

        childElement.display(camera);

        GL11.glPopMatrix();

    }
}

From source file:fr.def.iss.vd2.lib_v3d.element.V3DAbsoluteSizeElement.java

License:Open Source License

@Override
protected void doSelect(I3dCamera camera, long parentId) {
    if (childElement == null) {
        return;//ww w.ja  v a2  s  .  c  om
    }

    float zoomFactor = camera.getRelativeSize();

    V3DVect3 boundingBoxSize = absoluteSize.multiply(zoomFactor);
    V3DVect3 scale = boundingBoxSize.divideBy(childElement.getBoundingBox().getSize());

    if (!maxOnly) {

        GL11.glPushMatrix();
        GL11.glScalef(scale.x, scale.y, scale.z);

        childElement.select(camera, parentId);

        GL11.glPopMatrix();
    } else {

        float min = Math.min(scale.x, scale.y);
        if (scale.z != 0) {
            min = Math.min(min, scale.z);
        }

        GL11.glPushMatrix();
        GL11.glScalef(min, min, min);

        childElement.select(camera, parentId);

        GL11.glPopMatrix();

    }

}

From source file:fr.def.iss.vd2.lib_v3d.element.V3DElement.java

License:Open Source License

/**
 * Internal public method Mthode principal du rendu d'un lment. Cette
 * mthode appelle le code de rendu spcifique de l'lment via la mthode
 * doDisplay si ncessaire.//w w  w.  ja v a  2s  .c o  m
 * 
 * @param gl
 *            context gl du rendu
 * @param camera
 *            point de vue
 */
final public void display(V3DCamera camera) {
    if (!visible) {
        return;
    }

    if (!inited) {
        init();
    }

    GL11.glPushMatrix();
    if (transformMatrix != null) {
        GL11.glMultMatrix(transformMatrix);
    } else {
        if (rotation.x != 0) {
            GL11.glRotatef(rotation.x, 1, 0, 0);
        }
        if (rotation.y != 0) {
            GL11.glRotatef(rotation.y, 0, 1, 0);
        }
        if (rotation.z != 0) {
            GL11.glRotatef(rotation.z, 0, 0, 1);
        }

        if (position.x != 0 || position.y != 0 || position.z != 0) {
            GL11.glTranslatef(position.x, position.y, position.z);
        }
    }

    if (scale.x != 1 || scale.y != 1 || scale.z != 1) {
        GL11.glScalef(scale.x, scale.y, scale.z);
    }

    animation.preDisplay();

    if (animation.doDisplay()) {

        if (showShape) {
            doDisplay(camera);
        }

        if (showBoundingBox) {
            getBoundingBox().display();
        }
    }
    animation.postDisplay();

    GL11.glPopMatrix();
}

From source file:fr.def.iss.vd2.lib_v3d.element.V3DElement.java

License:Open Source License

/**
 * Internal public method Mthode principal du rendu de selection d'un
 * lment. Cette mthode appelle le code de rendu de selection spcifique
 * de l'lment via la mthode doSelect si ncessaire. Les animations
 * n'entrent pas en jeu dans le rendu de selection.
 * /*from w  w  w. j  a  v a 2s .c  om*/
 * @param gl
 *            context gl du rendu de selection
 * @param camera
 *            point de vue
 */
final public void select(V3DCamera camera, long parentId) {

    if (!inited) {
        init();
    }

    if (!isTangible() || !showShape) {
        return;
    }

    GL11.glPushMatrix();

    // TODO: verify this cast. Maybe change id from long to int
    if (selectable) {
        GL11.glLoadName((int) id);
    }

    if (rotation.x != 0) {
        GL11.glRotatef(rotation.x, 1, 0, 0);
    }
    if (rotation.y != 0) {
        GL11.glRotatef(rotation.y, 0, 1, 0);
    }
    if (rotation.z != 0) {
        GL11.glRotatef(rotation.z, 0, 0, 1);
    }

    if (position.x != 0 || position.y != 0 || position.z != 0) {
        GL11.glTranslatef(position.x, position.y, position.z);
    }

    if (scale.x != 1 || scale.y != 1 || scale.z != 1) {
        GL11.glScalef(scale.x, scale.y, scale.z);
    }

    if (selectable) {
        doSelect(camera, id);
    } else {
        doSelect(camera, parentId);
    }

    if (selectable) {
        GL11.glLoadName((int) parentId);
    }

    GL11.glPopMatrix();

}

From source file:fr.mcnanotech.kevin_68.nanotechmod.city.client.renderer.tileentity.TileEntityTextSpotLightRender.java

License:Creative Commons License

public void renderTileEntitySignAt(TileEntityTextSpotLight tileentity, double par2, double par4, double par6,
        float par8) {
    float f = tileentity.isActiveFloat();
    if (f > 0.0F) {
        GL11.glPushMatrix();/*from  w ww  . ja  v a2  s. co m*/
        float f1 = 0.6666667F;
        float f2 = 0.0F;

        float d2 = (float) tileentity.getWorldObj().getTotalWorldTime() + par8;
        byte b1 = 1;
        double d3 = (double) d2 * 0.025D * (1.0D - (double) (b1 & 1) * 2.5D);
        int i1 = (tileentity.get(TileEntityTextSpotLight.REVERSEROTATION) == 1 ? -1 : 1);

        GL11.glTranslatef((float) par2 + 0.5F, (float) par4 + 0.75F * f1, (float) par6 + 0.5F);
        GL11.glRotatef(-f2, 0.0F, 1.0F, 0.0F);
        GL11.glTranslatef(0.0F, -0.4F, 0.0F);
        GL11.glScaled(0.9D, 0.9D, 0.9D);
        if (tileentity.get(TileEntityTextSpotLight.ROTATE) == 0) {
            GL11.glRotated(d3 * 5 * tileentity.get(TileEntityTextSpotLight.ROTATIONSPEED) * i1, 0.0F, 1.0F,
                    0.0F);
        } else {
            GL11.glRotatef(tileentity.get(TileEntityTextSpotLight.ANGLE), 0.0F, 1.0F, 0.0F);
        }
        this.modelSign.signStick.showModel = false;

        this.bindTexture(field_110638_a);
        GL11.glPushMatrix();
        GL11.glScalef(f1, -f1, -f1);
        this.modelSign.renderSign();
        GL11.glPopMatrix();
        FontRenderer fontrenderer = this.func_147498_b();
        f2 = 0.016666668F * f1;
        GL11.glTranslatef(0.0F, 0.5F * f1, 0.07F * f1);
        GL11.glScalef(f2 * 5, -f2 * 5, f2 * 5);
        GL11.glNormal3f(0.0F, 0.0F, -1.0F * f2);
        GL11.glDepthMask(false);

        GL11.glTranslated(0.0F, -tileentity.get(TileEntityTextSpotLight.HEIGHT), 0.0F);
        // GL11.glTranslated(0.0F, tileentity.getScale() / 5.0F, 0.0F);
        GL11.glScaled(1.0 + (1.0 * (tileentity.get(TileEntityTextSpotLight.SCALE) / 10)),
                1.0 + (1.0 * (tileentity.get(TileEntityTextSpotLight.SCALE) / 10)),
                1.0 + (1.0 * (tileentity.get(TileEntityTextSpotLight.SCALE) / 10)));

        String s = tileentity.signText;
        fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, -20,
                (tileentity.get(TileEntityTextSpotLight.RED) * 65536)
                        + (tileentity.get(TileEntityTextSpotLight.GREEN) * 256)
                        + tileentity.get(TileEntityTextSpotLight.BLUE));
        // GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
        // fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2,
        // -20, (tileentity.getRedValue() * 65536) +
        // (tileentity.getGreenValue() * 256) + tileentity.getBlueValue());

        GL11.glDepthMask(true);
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        GL11.glPopMatrix();
    }
}

From source file:fr.mcnanotech.kevin_68.nanotechmod.city.client.renderer.tileentity.TileEntityTrailRenderTESR.java

License:Creative Commons License

public void renderTileEntityAtBlockTrail(TileEntityTrail tileentity, double x, double y, double z,
        float scale) {
    GL11.glPushMatrix();//from   w  w w.  j  ava 2s  .co  m
    GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);

    boolean[] flag = CTHelper.get(tileentity.getWorldObj(), tileentity.xCoord, tileentity.yCoord,
            tileentity.zCoord, NanotechCityBlock.trail);

    if ((flag[CTHelper.VrN] || flag[CTHelper.SrN] || flag[CTHelper.tErN] || flag[CTHelper.tWrN]
            || flag[CTHelper.tEWrN] || flag[CTHelper.tSEWrN] || flag[CTHelper.tNSEWrN])
            && !flag[CTHelper.SEWrN]) {
        GL11.glScalef(1.0F, 0.99F, 0.999F);
        GL11.glTranslatef(0.0F, -0.015F, 0.004F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 0);
    } else if ((flag[CTHelper.VrS] || flag[CTHelper.NrS] || flag[CTHelper.tErS] || flag[CTHelper.tWrS]
            || flag[CTHelper.tEWrS] || flag[CTHelper.tNEWrS] || flag[CTHelper.tNSEWrS])
            && !flag[CTHelper.NEWrS]) {
        GL11.glScalef(1.0F, 0.99F, 0.999F);
        GL11.glTranslatef(0.0F, -0.015F, -0.0048F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 0);
    }

    else if ((flag[CTHelper.VrE] || flag[CTHelper.WrE] || flag[CTHelper.tNrE] || flag[CTHelper.tSrE]
            || flag[CTHelper.tNSrE] || flag[CTHelper.tNSWrE] || flag[CTHelper.tNSEWrE])
            && !flag[CTHelper.NSWrE]) {
        GL11.glScalef(0.999F, 0.99F, 1.0F);
        GL11.glTranslatef(-0.004F, -0.015F, 0.0F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 0);
    }

    else if ((flag[CTHelper.VrW] || flag[CTHelper.ErW] || flag[CTHelper.tNrW] || flag[CTHelper.tSrW]
            || flag[CTHelper.tNSrW] || flag[CTHelper.tNSErW] || flag[CTHelper.tNSEWrW])
            && !flag[CTHelper.NSErW]) {
        GL11.glScalef(0.999F, 0.99F, 1.0F);
        GL11.glTranslatef(0.004F, -0.015F, 0.0F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 0);
    } else if (flag[CTHelper.VrNS] || flag[CTHelper.EWrNS]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 1);
    } else if (flag[CTHelper.VrEW] || flag[CTHelper.NSrEW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 1);
    } else if (flag[CTHelper.VrNE] || flag[CTHelper.tSrNE] || flag[CTHelper.tWrNE]
            || flag[CTHelper.SWswrNEnenwse]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(-0.0045F, -0.015F, 0.0045F);
        this.bindTexture(texture5);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 4);
    } else if (flag[CTHelper.VrNW] || flag[CTHelper.tSrNW] || flag[CTHelper.tErNW]
            || flag[CTHelper.SEserNWnenwsw]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0046F, -0.015F, 0.0046F);
        this.bindTexture(texture5);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 4);
    } else if (flag[CTHelper.VrSE] || flag[CTHelper.tNrSE] || flag[CTHelper.tWrSE]
            || flag[CTHelper.NWnwrSEnesesw]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(-0.0046F, -0.015F, -0.0046F);
        this.bindTexture(texture5);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 4);
    } else if (flag[CTHelper.VrSW] || flag[CTHelper.tNrSW] || flag[CTHelper.tErSW]
            || flag[CTHelper.NEnerSWnwsesw]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0046F, -0.015F, -0.0046F);
        this.bindTexture(texture5);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 4);
    } else if (flag[CTHelper.VrNSE] || flag[CTHelper.WrNSE]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
    } else if (flag[CTHelper.VrNSW] || flag[CTHelper.ErNSW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 6);
    } else if (flag[CTHelper.VrNEW] || flag[CTHelper.SrNEW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
    } else if (flag[CTHelper.VrSEW] || flag[CTHelper.NrSEW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
    } else if (flag[CTHelper.VrNSEW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.0F);
        this.bindTexture(texture6);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 5);
    } else if (flag[CTHelper.tNErne]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(-0.0048F, -0.015F, 0.0048F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 2);
        this.bindTexture(texture4);
        this.model2.render(0.0625F, 3);
    } else if (flag[CTHelper.tNWrnw]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0048F, -0.015F, 0.0048F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 2);
        this.bindTexture(texture4);
        this.model2.render(0.0625F, 3);
    } else if (flag[CTHelper.tSErse]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(-0.0048F, -0.015F, -0.0048F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 2);
        this.bindTexture(texture4);
        this.model2.render(0.0625F, 3);
    } else if (flag[CTHelper.tSWrsw]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0048F, -0.015F, -0.0048F);
        this.bindTexture(texture2);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 2);
        this.bindTexture(texture4);
        this.model2.render(0.0625F, 3);
    } else if (flag[CTHelper.NErSW]) {
        GL11.glScalef(0.98F, 0.98F, 0.98F);
        GL11.glTranslatef(0.0F, -0.03F, 0.0011F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.NWrSE]) {
        GL11.glScalef(0.98F, 0.98F, 0.98F);
        GL11.glTranslatef(0.0011F, -0.03F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.SErNW]) {
        GL11.glScalef(0.98F, 0.98F, 0.98F);
        GL11.glTranslatef(-0.0011F, -0.03F, 0.0F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 6);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.SWrNE]) {
        GL11.glScalef(0.98F, 0.98F, 0.98F);
        GL11.glTranslatef(0.0F, -0.03F, -0.0011F);
        this.bindTexture(texture7);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 6);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.NSErW]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 1);
        this.bindTexture(texture6);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.NSWrE]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 1);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.NEWrS]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 1);
        this.bindTexture(texture6);
        GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.SEWrN]) {
        GL11.glScalef(0.99F, 0.99F, 0.99F);
        GL11.glTranslatef(0.0F, -0.015F, 0.00F);
        this.bindTexture(texture3);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 1);
        this.bindTexture(texture6);
        this.model2.render(0.0625F, 7);
    } else if (flag[CTHelper.NSEWrnesenwsw]) {
        GL11.glScalef(0.9995F, 0.9995F, 0.9995F);
        GL11.glTranslatef(0.0F, -0.0046F, 0.0F);
        this.bindTexture(texture8);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model2.render(0.0625F, 8);
    } else {
        GL11.glScalef(0.9995F, 0.9995F, 0.9995F);
        GL11.glTranslatef(0.0F, -0.0046F, 0.0F);
        this.bindTexture(texture);
        GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
        this.model.render(0.0625F);
    }
    GL11.glPopMatrix();
}