Example usage for org.lwjgl.opengl GL11 glRotatef

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

Introduction

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

Prototype

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

Source Link

Document

Manipulates the current matrix with a rotation matrix.

Usage

From source file:game.level.entities.mobs.enemies.Skeleton.java

License:Open Source License

@Override
public void Render(int x, int y) {
    GL11.glRotatef(Facing * 90f, 0f, 0f, 1f);
    GL11.glEnable(GL11.GL_TEXTURE_2D);// w w  w . j av a 2s.c  o m
    Color.white.bind();
    MobArt.Skeleton.bind();
    GL11.glBegin(GL11.GL_QUADS);

    GL11.glTexCoord2f(0, 0);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    GL11.glTexCoord2f(0, 1);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    GL11.glTexCoord2f(1, 1);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    GL11.glTexCoord2f(1, 0);
    GL11.glVertex3f(-0.3f, 0.3f, 0);

    // Topwards side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 18f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(64f / 64f, 36f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(18 / 64f, 36f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);

    // Top left
    GL11.glTexCoord2f(18f / 64f, 18f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);

    // Rightwards side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 0f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    // Bottom Right
    GL11.glTexCoord2f(64f / 64f, 18f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(19 / 64f, 18f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(19f / 64f, 0f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);

    // Front
    // Bottom left
    GL11.glTexCoord2f(0, 46f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(18f / 64f, 46f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, 0);

    // Top right
    GL11.glTexCoord2f(18f / 64f, 0);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(0, 0);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);

    // Leftwards Side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 37f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(64f / 64f, 54f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(19 / 64f, 54f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(19f / 64f, 37f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);

    // TOP
    // Top right
    GL11.glTexCoord2f(18f / 64f, 46f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(0, 46f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);
    // Bottom left
    GL11.glTexCoord2f(0, 64f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);
    // Bottom left+Right
    GL11.glTexCoord2f(18f / 64f, 64f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);
    GL11.glEnd();
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glBegin(GL11.GL_QUADS);
    RenderHealthBar();
    GL11.glEnd();
    GL11.glRotatef(Facing * -90f, 0f, 0f, 1f);

}

From source file:game.level.entities.mobs.enemies.Vampire.java

License:Open Source License

@Override
public void Render(int x, int y) {
    GL11.glRotatef(Facing * 90f, 0f, 0f, 1f);
    GL11.glEnable(GL11.GL_TEXTURE_2D);//from w  ww  .  java  2s  .c o  m
    Color.white.bind();
    MobArt.Vampire.bind();
    GL11.glBegin(GL11.GL_QUADS);

    GL11.glTexCoord2f(0, 0);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    GL11.glTexCoord2f(0, 1);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    GL11.glTexCoord2f(1, 1);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    GL11.glTexCoord2f(1, 0);
    GL11.glVertex3f(-0.3f, 0.3f, 0);

    // Topwards side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 18f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(64f / 64f, 36f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(18 / 64f, 36f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);

    // Top left
    GL11.glTexCoord2f(18f / 64f, 18f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);

    // Rightwards side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 0f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    // Bottom Right
    GL11.glTexCoord2f(64f / 64f, 18f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(19 / 64f, 18f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(19f / 64f, 0f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);

    // Front
    // Bottom left
    GL11.glTexCoord2f(0, 46f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(18f / 64f, 46f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, 0);

    // Top right
    GL11.glTexCoord2f(18f / 64f, 0);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(0, 0);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);

    // Leftwards Side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 37f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(64f / 64f, 54f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(19 / 64f, 54f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(19f / 64f, 37f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);

    // TOP
    // Top right
    GL11.glTexCoord2f(18f / 64f, 46f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(0, 46f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);
    // Bottom left
    GL11.glTexCoord2f(0, 64f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);
    // Bottom left+Right
    GL11.glTexCoord2f(18f / 64f, 64f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);
    GL11.glEnd();
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glBegin(GL11.GL_QUADS);
    RenderHealthBar();
    GL11.glEnd();
    GL11.glRotatef(Facing * -90f, 0f, 0f, 1f);
}

From source file:game.level.entities.mobs.enemies.Werewolf.java

License:Open Source License

@Override
public void Render(int x, int y) {
    GL11.glRotatef(Facing * 90f, 0f, 0f, 1f);
    GL11.glEnable(GL11.GL_TEXTURE_2D);//from  w ww  .j  a  va2s  .  c o  m
    Color.white.bind();
    MobArt.Werewolf.bind();
    GL11.glBegin(GL11.GL_QUADS);

    // Topwards side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 18f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(64f / 64f, 36f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(18 / 64f, 36f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);

    // Top left
    GL11.glTexCoord2f(18f / 64f, 18f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);

    // Rightwards side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 0f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    // Bottom Right
    GL11.glTexCoord2f(64f / 64f, 18f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(19 / 64f, 18f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(19f / 64f, 0f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);

    // Front
    // Bottom left
    GL11.glTexCoord2f(0, 46f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(18f / 64f, 46f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, 0);

    // Top right
    GL11.glTexCoord2f(18f / 64f, 0);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(0, 0);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);

    // Leftwards Side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 37f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(64f / 64f, 54f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(19 / 64f, 54f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(19f / 64f, 37f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);

    // TOP
    // Top right
    GL11.glTexCoord2f(18f / 64f, 46f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(0, 46f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);
    // Bottom left
    GL11.glTexCoord2f(0, 64f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);
    // Bottom left+Right
    GL11.glTexCoord2f(18f / 64f, 64f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);

    GL11.glEnd();
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glBegin(GL11.GL_QUADS);
    RenderHealthBar();
    GL11.glEnd();
    GL11.glRotatef(Facing * -90f, 0f, 0f, 1f);

}

From source file:game.level.entities.mobs.enemies.Zombie.java

License:Open Source License

@Override
public void Render(int x, int y) {
    GL11.glRotatef(Facing * 90f, 0f, 0f, 1f);
    GL11.glEnable(GL11.GL_TEXTURE_2D);//from w  w  w.j a va2  s .  c o  m
    Color.white.bind();
    MobArt.Zombie.bind();
    GL11.glBegin(GL11.GL_QUADS);

    GL11.glTexCoord2f(0, 0);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    GL11.glTexCoord2f(0, 1);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    GL11.glTexCoord2f(1, 1);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    GL11.glTexCoord2f(1, 0);
    GL11.glVertex3f(-0.3f, 0.3f, 0);

    // Topwards side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 18f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(64f / 64f, 36f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(18 / 64f, 36f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);

    // Top left
    GL11.glTexCoord2f(18f / 64f, 18f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);

    // Rightwards side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 0f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    // Bottom Right
    GL11.glTexCoord2f(64f / 64f, 18f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(19 / 64f, 18f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(19f / 64f, 0f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);

    // Front
    // Bottom left
    GL11.glTexCoord2f(0, 46f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(18f / 64f, 46f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, 0);

    // Top right
    GL11.glTexCoord2f(18f / 64f, 0);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(0, 0);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);

    // Leftwards Side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 37f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(64f / 64f, 54f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(19 / 64f, 54f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(19f / 64f, 37f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);

    // TOP
    // Top right
    GL11.glTexCoord2f(18f / 64f, 46f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -MOB_HEIGHT);
    // Top left
    GL11.glTexCoord2f(0, 46f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -MOB_HEIGHT);
    // Bottom left
    GL11.glTexCoord2f(0, 64f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, -MOB_HEIGHT);
    // Bottom left+Right
    GL11.glTexCoord2f(18f / 64f, 64f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, -MOB_HEIGHT);
    GL11.glEnd();
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glBegin(GL11.GL_QUADS);
    RenderHealthBar();
    GL11.glEnd();
    GL11.glRotatef(Facing * -90f, 0f, 0f, 1f);

}

From source file:game.level.entities.mobs.Player.java

License:Open Source License

@Override
public void Render(int x, int y) {

    GL11.glRotatef(Facing * 90f, 0f, 0f, 1f);
    GL11.glEnable(GL11.GL_TEXTURE_2D);// ww w  .j ava2 s .c  o  m
    Color.white.bind();
    MobArt.Player.bind();
    GL11.glBegin(GL11.GL_QUADS);

    GL11.glTexCoord2f(0, 0);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    GL11.glTexCoord2f(0, 1);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    GL11.glTexCoord2f(1, 1);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    GL11.glTexCoord2f(1, 0);
    GL11.glVertex3f(-0.3f, 0.3f, 0);

    // Topwards side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 18f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(64f / 64f, 36f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(18 / 64f, 36f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -PLAYER_HEIGHT);

    // Top left
    GL11.glTexCoord2f(18f / 64f, 18f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -PLAYER_HEIGHT);

    // Rightwards side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 0f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, 0);
    // Bottom Right
    GL11.glTexCoord2f(64f / 64f, 18f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(19 / 64f, 18f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, -PLAYER_HEIGHT);
    // Top left
    GL11.glTexCoord2f(19f / 64f, 0f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -PLAYER_HEIGHT);

    // Front
    // Bottom left
    GL11.glTexCoord2f(0, 46f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(18f / 64f, 46f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, 0);

    // Top right
    GL11.glTexCoord2f(18f / 64f, 0);
    GL11.glVertex3f(-0.3f, 0.3f, -PLAYER_HEIGHT);
    // Top left
    GL11.glTexCoord2f(0, 0);
    GL11.glVertex3f(0.3f, 0.3f, -PLAYER_HEIGHT);

    // Leftwards Side
    // Top right
    GL11.glTexCoord2f(64f / 64f, 37f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, 0);
    // Bottom left+Right
    GL11.glTexCoord2f(64f / 64f, 54f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, 0);
    // Bottom left
    GL11.glTexCoord2f(19 / 64f, 54f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -PLAYER_HEIGHT);
    // Top left
    GL11.glTexCoord2f(19f / 64f, 37f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, -PLAYER_HEIGHT);

    // TOP
    // Top right
    GL11.glTexCoord2f(18f / 64f, 46f / 64f);
    GL11.glVertex3f(-0.3f, -0.3f, -PLAYER_HEIGHT);
    // Top left
    GL11.glTexCoord2f(0, 46f / 64f);
    GL11.glVertex3f(0.3f, -0.3f, -PLAYER_HEIGHT);
    // Bottom left
    GL11.glTexCoord2f(0, 64f / 64f);
    GL11.glVertex3f(0.3f, 0.3f, -PLAYER_HEIGHT);
    // Bottom left+Right
    GL11.glTexCoord2f(18f / 64f, 64f / 64f);
    GL11.glVertex3f(-0.3f, 0.3f, -PLAYER_HEIGHT);
    GL11.glEnd();
    GL11.glDisable(GL11.GL_TEXTURE_2D);
    GL11.glBegin(GL11.GL_QUADS);
    // HEAD
    GL11.glColor3f(255f / 255f, 187f / 255f, 255f / 255f);
    GL11.glVertex3f(-0.2f, -0.2f, -PLAYER_HEIGHT - 0.5f);
    GL11.glVertex3f(0.2f, -0.2f, -PLAYER_HEIGHT - 0.5f);
    GL11.glVertex3f(0.2f, 0.2f, -PLAYER_HEIGHT - 0.5f);
    GL11.glVertex3f(-0.2f, 0.2f, -PLAYER_HEIGHT - 0.5f);

    GL11.glVertex3f(-0.2f, -0.2f, -PLAYER_HEIGHT);
    GL11.glVertex3f(0.2f, -0.2f, -PLAYER_HEIGHT);
    GL11.glVertex3f(0.2f, -0.2f, -PLAYER_HEIGHT - 0.5f);
    GL11.glVertex3f(-0.2f, -0.2f, -PLAYER_HEIGHT - 0.5f);

    GL11.glVertex3f(0.2f, -0.2f, -PLAYER_HEIGHT);
    GL11.glVertex3f(0.2f, 0.2f, -PLAYER_HEIGHT);
    GL11.glVertex3f(0.2f, 0.2f, -PLAYER_HEIGHT - 0.5f);
    GL11.glVertex3f(0.2f, -0.2f, -PLAYER_HEIGHT - 0.5f);

    GL11.glVertex3f(0.2f, 0.2f, -PLAYER_HEIGHT);
    GL11.glVertex3f(-0.2f, 0.2f, -PLAYER_HEIGHT);
    GL11.glVertex3f(-0.2f, 0.2f, -PLAYER_HEIGHT - 0.5f);
    GL11.glVertex3f(0.2f, 0.2f, -PLAYER_HEIGHT - 0.5f);

    GL11.glVertex3f(-0.2f, 0.2f, -PLAYER_HEIGHT);
    GL11.glVertex3f(-0.2f, -0.2f, -PLAYER_HEIGHT);
    GL11.glVertex3f(-0.2f, -0.2f, -PLAYER_HEIGHT - 0.5f);
    GL11.glVertex3f(-0.2f, 0.2f, -PLAYER_HEIGHT - 0.5f);
    RenderHealthBar();
    GL11.glEnd();
    GL11.glRotatef(Facing * -90f, 0f, 0f, 1f);

}

From source file:game.level.entities.pickup.EquipDrop.java

License:Open Source License

@Override
public void Render(int x, int y) {

    GL11.glRotatef(YawRotate, 0, 0, 1);
    GL11.glBegin(GL11.GL_QUADS);//  w  w w . jav a2  s  .  c om

    GL11.glColor3f(0.5f, 0.5f, 0.5f);
    GL11.glVertex3f(+0.3f, -0.3f, -0.5f);
    GL11.glVertex3f(-0.3f, -0.3f, -0.5f);
    GL11.glVertex3f(-0.3f, 0.3f, -0.5f);
    GL11.glVertex3f(0.3f, 0.3f, -0.5f);

    GL11.glColor3f(1, 1, 1);
    GL11.glVertex3f(+0.2f, -0.2f, -1f);
    GL11.glVertex3f(-0.2f, -0.2f, -1f);
    GL11.glVertex3f(-0.2f, 0.2f, -1f);
    GL11.glVertex3f(0.2f, 0.2f, -1f);

    GL11.glEnd();

    GL11.glRotatef(-YawRotate, 0, 0, 1);

    YawRotate++;
}

From source file:game.level.entities.pickup.Experience.java

License:Open Source License

@Override
public void Render(int x, int y) {

    GL11.glRotatef(YawRotate, 0, 0, 1);
    GL11.glRotatef(-YawRotate, 0, 1, 0);
    GL11.glRotatef(YawRotate, 1, 0, 0);//from   w w w  .  j  a v  a2 s  .  c  om
    GL11.glBegin(GL11.GL_LINE_LOOP);

    GL11.glColor3f(255f / 256f, 215f / 256f, 0);
    GL11.glVertex3f(+0.5f, -0.5f, -0.5f);
    GL11.glVertex3f(-0.5f, -0.5f, -0.5f);
    GL11.glVertex3f(0, 0.5f, -0.5f);

    GL11.glColor3f(255f / 256f, 215f / 256f, 0);
    GL11.glVertex3f(+0.5f, -0.5f, -0.5f);
    GL11.glVertex3f(-0.5f, -0.5f, -0.5f);
    GL11.glColor3f(1, 1, 1);
    GL11.glVertex3f(0, 0, -1f);

    GL11.glColor3f(255f / 256f, 215f / 256f, 0);
    GL11.glVertex3f(-0.5f, -0.5f, -0.5f);
    GL11.glVertex3f(0, +0.5f, -0.5f);
    GL11.glColor3f(1, 1, 1);
    GL11.glVertex3f(0, 0, -1f);

    GL11.glColor3f(255f / 256f, 215f / 256f, 0);
    GL11.glVertex3f(0, +0.5f, -0.5f);
    GL11.glVertex3f(+0.5f, -0.5f, -0.5f);
    GL11.glColor3f(1, 1, 1);
    GL11.glVertex3f(0, 0, -1f);

    GL11.glEnd();
    GL11.glRotatef(-YawRotate, 1, 0, 0);
    GL11.glRotatef(YawRotate, 0, 1, 0);
    GL11.glRotatef(-YawRotate, 0, 0, 1);

    YawRotate++;
}

From source file:game.level.entities.pickup.Health.java

License:Open Source License

@Override
public void Render(int x, int y) {

    GL11.glRotatef(YawRotate, 0, 0, 1);
    GL11.glBegin(GL11.GL_TRIANGLES);//from w w w . j  a  v a  2 s. c o  m

    GL11.glColor3f(1, 0, 0);
    GL11.glVertex3f(+0.5f, -0.5f, -0.5f);
    GL11.glVertex3f(-0.5f, -0.5f, -0.5f);
    GL11.glColor3f(1, 1, 1);
    GL11.glVertex3f(0, 0, -1f);

    GL11.glColor3f(1, 0, 0);
    GL11.glVertex3f(-0.5f, -0.5f, -0.5f);
    GL11.glVertex3f(0, +0.5f, -0.5f);
    GL11.glColor3f(1, 1, 1);
    GL11.glVertex3f(0, 0, -1f);

    GL11.glColor3f(1, 0, 0);
    GL11.glVertex3f(0, +0.5f, -0.5f);
    GL11.glVertex3f(+0.5f, -0.5f, -0.5f);
    GL11.glColor3f(1, 1, 1);
    GL11.glVertex3f(0, 0, -1f);

    GL11.glEnd();

    GL11.glRotatef(-YawRotate, 0, 0, 1);

    YawRotate++;
}

From source file:game.objects.player.Camera.java

public void lookThrough() {
    GL11.glRotatef(pitch, 1.0f, 0.0f, 0.0f);
    GL11.glRotatef(yaw, 0.0f, 1.0f, 0.0f);
    GL11.glTranslatef(-position.x, -position.y, -position.z);

}

From source file:game.player.Camera.java

public void lookThrough() {
    GL11.glRotatef(pitch, 1.0f, 0.0f, 0.0f);
    GL11.glRotatef(yaw, 0.0f, 1.0f, 0.0f);
    GL11.glTranslatef(position.x, position.y, position.z);

}