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:com.teambr.bookshelf.client.gui.component.NinePatchRenderer.java

License:Creative Commons License

protected void renderBackground(Gui gui, int width, int height) {
    GL11.glPushMatrix();//from   w w  w. ja v  a  2  s . c o m
    GL11.glTranslatef(cellSize - 1, cellSize - 1, 0);
    GL11.glScalef(width - (cellSize * 2) + 2, height - (cellSize * 2) + 2, 0);
    gui.drawTexturedModalRect(0, 0, u + cellSize, v + cellSize, 1, 1);
    GL11.glPopMatrix();
}

From source file:com.teambrmodding.neotech.client.renderers.tiles.TileRenderHelper.java

License:Creative Commons License

protected void moveRendering(float size, double posX, double posY, double posz) {
    GL11.glTranslated(0, 0, posz);//from   w w  w.  j  ava2s  .com
    GL11.glScalef(scale, scale, -0.0001f); // We flatten the rendering and scale it to the right size
    GL11.glTranslated(posX, posY, 0); // Finally, we translate the icon itself to the correct position
    GL11.glScalef(size, size, 1.0f);
}

From source file:com.theoriginalbit.moarperipherals.client.render.RendererItemSonic.java

License:Apache License

@Override
protected void manipulateEntityRender(ItemStack stack) {
    float scale = 0.145f;
    GL11.glScalef(scale, scale, scale);
    GL11.glRotatef(180, 1, 0, 0);//  www  .  j  a  v  a 2s. com
    GL11.glTranslatef(0f, -1f, 0f);
}

From source file:com.theoriginalbit.moarperipherals.client.render.RendererItemSonic.java

License:Apache License

@Override
protected void manipulateInventoryRender(ItemStack stack) {
    float scale = 0.3f;
    GL11.glScalef(scale, scale, scale);
    GL11.glRotatef(180, 1, 0, 0);// w ww .j  a  v a2s. com
    GL11.glTranslatef(0f, 1f, 0f);
}

From source file:com.theoriginalbit.moarperipherals.client.render.RendererItemSonic.java

License:Apache License

@Override
protected void manipulateThirdPersonRender(ItemStack stack) {
    float scale = 0.225f;
    GL11.glScalef(scale, scale, scale);
    GL11.glRotatef(175, 1, 0, 0);/*from   ww  w.  j ava2  s.c o  m*/
    GL11.glTranslatef(0f, -3.5f, -4.5f);
}

From source file:com.theoriginalbit.moarperipherals.client.render.RendererItemSonic.java

License:Apache License

@Override
protected void manipulateFirstPersonRender(ItemStack stack) {
    float scale = 0.25f;
    GL11.glScalef(scale, scale, scale);
    GL11.glRotatef(180, 1, 0, 0);// w w  w  .  j av  a2s.  c o m
    GL11.glRotatef(-90, 0, 1, 0);
    GL11.glRotatef(10, 0, 0, 1);
    GL11.glTranslatef(-3f, -3f, 0f);
}

From source file:com.theslarfab.tmnmod.client.model.ModelHippopotamus.java

License:Open Source License

@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
    {/*www .  jav  a2s  . c om*/
        this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);

        if (this.isChild) {
            float f6 = 2.0F;
            GL11.glPushMatrix();
            GL11.glTranslatef(0.0F, this.float1 * f5, this.float2 * f5);
            GL11.glPopMatrix();
            GL11.glPushMatrix();
            GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6);
            GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
            this.tailBase.render(f5);
            this.body.render(f5);
            this.leg4.render(f5);
            this.leg1.render(f5);
            this.leg2.render(f5);
            this.leg3.render(f5);
            this.head.render(f5);
            GL11.glPopMatrix();
        } else {
            this.tailBase.render(f5);
            this.body.render(f5);
            this.leg4.render(f5);
            this.leg1.render(f5);
            this.leg2.render(f5);
            this.leg3.render(f5);
            this.head.render(f5);
        }
    }
}

From source file:com.theslarfab.tmnmod.client.model.ModelKangaroo.java

License:Open Source License

public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
    {//from   w ww.j  av  a 2 s.com
        this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);

        if (this.isChild) {
            float f6 = 2.0F;
            GL11.glPushMatrix();
            GL11.glTranslatef(0.0F, this.float1 * f5, this.float2 * f5);
            GL11.glPopMatrix();
            GL11.glPushMatrix();
            GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6);
            GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
            this.lleg.render(f5);
            this.tail1.render(f5);
            this.tail2.render(f5);
            this.rleg.render(f5);
            this.rarm.render(f5);
            this.larm.render(f5);
            this.body.render(f5);
            this.neck.render(f5);
            GL11.glPopMatrix();
        } else {
            this.lleg.render(f5);
            this.tail1.render(f5);
            this.tail2.render(f5);
            this.rleg.render(f5);
            this.rarm.render(f5);
            this.larm.render(f5);
            this.body.render(f5);
            this.neck.render(f5);
        }
    }
}

From source file:com.theslarfab.tmnmod.client.model.ModelLonghorn.java

License:Open Source License

@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
    {//  w  w  w .  j  a  v a 2s .co m
        this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);

        if (this.isChild) {
            float f6 = 2.0F;
            GL11.glPushMatrix();
            GL11.glTranslatef(0.0F, this.float1 * f5, this.float2 * f5);
            this.head.render(f5);
            GL11.glPopMatrix();
            GL11.glPushMatrix();
            GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6);
            GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
            this.rleg1.render(f5);
            this.lleg2.render(f5);
            this.lleg1.render(f5);
            this.rleg2.render(f5);
            this.body.render(f5);
            GL11.glPopMatrix();
        } else {
            this.rleg1.render(f5);
            this.lleg2.render(f5);
            this.head.render(f5);
            this.lleg1.render(f5);
            this.rleg2.render(f5);
            this.body.render(f5);
        }
    }
}

From source file:com.theslarfab.tmnmod.client.model.ModelZebra.java

License:Open Source License

@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
    {/*from  ww w . j a v  a 2  s .  co m*/
        this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);

        if (this.isChild) {
            float f6 = 2.0F;
            GL11.glPushMatrix();
            GL11.glTranslatef(0.0F, this.float1 * f5, this.float2 * f5);
            GL11.glPopMatrix();
            GL11.glPushMatrix();
            GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6);
            GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
            this.leg1A.render(f5);
            this.leg4A.render(f5);
            this.leg2A.render(f5);
            this.leg3A.render(f5);
            this.body.render(f5);
            this.neck.render(f5);
            GL11.glPopMatrix();
        } else {
            this.leg1A.render(f5);
            this.leg4A.render(f5);
            this.leg2A.render(f5);
            this.leg3A.render(f5);
            this.body.render(f5);
            this.neck.render(f5);
        }
    }
}