List of usage examples for org.lwjgl.opengl GL11 glVertex3f
public static native void glVertex3f(@NativeType("GLfloat") float x, @NativeType("GLfloat") float y, @NativeType("GLfloat") float z);
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);/*w ww. j a v a 2s. co m*/ GL11.glBegin(GL11.GL_TRIANGLES); 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.states.State_PREFAB_EDITOR.java
License:Open Source License
private void DrawWall(int x, int y, int i) { // BOTTOM// www . jav a 2 s . co m GL11.glBegin(GL11.GL_QUADS); TileDefinition.setColor(i); GL11.glNormal3f(0, -1, 0); GL11.glVertex3f(-1f, -1f, 0f); GL11.glVertex3f(1f, -1f, 0); GL11.glVertex3f(1f, 1f, 0f); GL11.glVertex3f(-1f, 1f, 0f); // SIDES GL11.glNormal3f(1, 0, 0); GL11.glVertex3f(-1f, -1f, 0f); GL11.glVertex3f(1f, -1f, 0f); GL11.glVertex3f(1f, -1f, -4f); GL11.glVertex3f(-1f, -1f, -4f); GL11.glNormal3f(0, 0, 1); GL11.glVertex3f(1f, -1f, 0f); GL11.glVertex3f(1f, 1f, 0f); GL11.glVertex3f(1f, 1f, -4f); GL11.glVertex3f(1f, -1f, -4f); GL11.glNormal3f(1, 0, 0); GL11.glVertex3f(1f, 1f, 0f); GL11.glVertex3f(-1f, 1f, 0f); GL11.glVertex3f(-1f, 1f, -4f); GL11.glVertex3f(1f, 1f, -4f); GL11.glNormal3f(0, 0, 1); GL11.glVertex3f(-1f, 1f, 0f); GL11.glVertex3f(-1f, -1f, 0f); GL11.glVertex3f(-1f, -1f, -4f); GL11.glVertex3f(-1f, 1f, -4f); // BOTTOM GL11.glNormal3f(0, 1, 0); GL11.glVertex3f(-1f, -1f, -4f); GL11.glVertex3f(1f, -1f, -4f); GL11.glVertex3f(1f, 1f, -4f); GL11.glVertex3f(-1f, 1f, -4f); GL11.glEnd(); }
From source file:game.states.State_PREFAB_EDITOR.java
License:Open Source License
private void DrawFloor(int x, int y, int i) { GL11.glBegin(GL11.GL_QUADS);//from w w w . j av a2s . c o m TileDefinition.setColor(i); GL11.glNormal3f(0, 1, 0); GL11.glVertex3f(-1f, -1f, 0f); GL11.glVertex3f(1f, -1f, 0f); GL11.glVertex3f(1f, 1f, 0f); GL11.glVertex3f(-1f, 1f, 0f); GL11.glEnd(); }
From source file:io.flob.blackheart.CollisionBox.java
License:Open Source License
public void render() { GL11.glColor3d(1, 0, 1);// w w w .ja v a 2s. com GL11.glBegin(GL11.GL_LINE_STRIP); GL11.glVertex3f(position_minimum().getX(), position_minimum().getY(), position_minimum().getZ()); GL11.glVertex3f(position_maximum().getX(), position_minimum().getY(), position_minimum().getZ()); GL11.glVertex3f(position_maximum().getX(), position_maximum().getY(), position_minimum().getZ()); GL11.glVertex3f(position_minimum().getX(), position_maximum().getY(), position_minimum().getZ()); GL11.glVertex3f(position_minimum().getX(), position_minimum().getY(), position_minimum().getZ()); GL11.glVertex3f(position_minimum().getX(), position_minimum().getY(), position_maximum().getZ()); GL11.glVertex3f(position_maximum().getX(), position_minimum().getY(), position_maximum().getZ()); GL11.glVertex3f(position_maximum().getX(), position_maximum().getY(), position_maximum().getZ()); GL11.glVertex3f(position_minimum().getX(), position_maximum().getY(), position_maximum().getZ()); GL11.glVertex3f(position_minimum().getX(), position_minimum().getY(), position_maximum().getZ()); GL11.glEnd(); GL11.glBegin(GL11.GL_LINES); GL11.glVertex3f(position_maximum().getX(), position_minimum().getY(), position_minimum().getZ()); GL11.glVertex3f(position_maximum().getX(), position_minimum().getY(), position_maximum().getZ()); GL11.glVertex3f(position_maximum().getX(), position_maximum().getY(), position_minimum().getZ()); GL11.glVertex3f(position_maximum().getX(), position_maximum().getY(), position_maximum().getZ()); GL11.glVertex3f(position_minimum().getX(), position_maximum().getY(), position_minimum().getZ()); GL11.glVertex3f(position_minimum().getX(), position_maximum().getY(), position_maximum().getZ()); GL11.glEnd(); GL11.glColor3d(1, 1, 1); }
From source file:io.flob.blackheart.FloorBlood.java
License:Open Source License
@Override public void _render() { if (texture == null) { texture = TextureLibrary.placeholder; }//from w ww . j a va 2s .c o m GL11.glNormal3f(0, 1, 0); GL11.glTexCoord2f(texture.getU(), texture.getV()); GL11.glVertex3f(-size + position.getX(), size + position.getY(), -size + position.getZ()); GL11.glTexCoord2f(texture.getU(), texture.getV2()); GL11.glVertex3f(-size + position.getX(), size + position.getY(), size + position.getZ()); GL11.glTexCoord2f(texture.getU2(), texture.getV2()); GL11.glVertex3f(size + position.getX(), size + position.getY(), size + position.getZ()); GL11.glTexCoord2f(texture.getU2(), texture.getV()); GL11.glVertex3f(size + position.getX(), size + position.getY(), -size + position.getZ()); }
From source file:io.flob.blackheart.ICeiling.java
License:Open Source License
@Override public void _render() { if (texture == null) { texture = TextureLibrary.placeholder; }// w w w . j av a 2 s .com GL11.glNormal3f(0, -1, 0); GL11.glTexCoord2f(texture.getU2(), texture.getV()); GL11.glVertex3f(-size + position.getX(), -size + position.getY(), -size + position.getZ()); GL11.glTexCoord2f(texture.getU(), texture.getV()); GL11.glVertex3f(size + position.getX(), -size + position.getY(), -size + position.getZ()); GL11.glTexCoord2f(texture.getU(), texture.getV2()); GL11.glVertex3f(size + position.getX(), -size + position.getY(), size + position.getZ()); GL11.glTexCoord2f(texture.getU2(), texture.getV2()); GL11.glVertex3f(-size + position.getX(), -size + position.getY(), size + position.getZ()); }
From source file:io.flob.blackheart.IDoor.java
License:Open Source License
private void render_front() { TextureUV _texture;/*from w w w . j a v a2 s. com*/ float offset = -Level.texture_bleed_offset; if (parallel) { _texture = texture_face; } else { _texture = texture_side; } GL11.glNormal3f(0f, 0f, 1f); GL11.glTexCoord2f(_texture.getU(), _texture.getV2()); GL11.glVertex3f(-size + position.getX(), -size + position.getY(), size + position.getZ() + offset); GL11.glTexCoord2f(_texture.getU2(), _texture.getV2()); GL11.glVertex3f(size + position.getX(), -size + position.getY(), size + position.getZ() + offset); GL11.glTexCoord2f(_texture.getU2(), _texture.getV()); GL11.glVertex3f(size + position.getX(), size + position.getY(), size + position.getZ() + offset); GL11.glTexCoord2f(_texture.getU(), _texture.getV()); GL11.glVertex3f(-size + position.getX(), size + position.getY(), size + position.getZ() + offset); }
From source file:io.flob.blackheart.IDoor.java
License:Open Source License
private void render_back() { TextureUV _texture;/* w w w . j a v a 2 s . c om*/ float offset; if (parallel) { _texture = texture_face; offset = Level.texture_bleed_offset; } else { _texture = texture_side; offset = -Level.texture_bleed_offset; } GL11.glNormal3f(0f, 0f, -1f); GL11.glTexCoord2f(_texture.getU2(), _texture.getV2()); GL11.glVertex3f(-size + position.getX(), -size + position.getY(), -size + position.getZ() + offset); GL11.glTexCoord2f(_texture.getU2(), _texture.getV()); GL11.glVertex3f(-size + position.getX(), size + position.getY(), -size + position.getZ() + offset); GL11.glTexCoord2f(_texture.getU(), _texture.getV()); GL11.glVertex3f(size + position.getX(), size + position.getY(), -size + position.getZ() + offset); GL11.glTexCoord2f(_texture.getU(), _texture.getV2()); GL11.glVertex3f(size + position.getX(), -size + position.getY(), -size + position.getZ() + offset); }
From source file:io.flob.blackheart.IDoor.java
License:Open Source License
private void render_left() { TextureUV _texture;// w w w.j a v a 2s . c o m float offset = Level.texture_bleed_offset; if (parallel) { _texture = texture_side; } else { _texture = texture_face; } GL11.glNormal3f(-1, 0, 0); GL11.glTexCoord2f(_texture.getU(), _texture.getV2()); GL11.glVertex3f(-size + position.getX() + offset, -size + position.getY(), -size + position.getZ()); GL11.glTexCoord2f(_texture.getU2(), _texture.getV2()); GL11.glVertex3f(-size + position.getX() + offset, -size + position.getY(), size + position.getZ()); GL11.glTexCoord2f(_texture.getU2(), _texture.getV()); GL11.glVertex3f(-size + position.getX() + offset, size + position.getY(), size + position.getZ()); GL11.glTexCoord2f(_texture.getU(), _texture.getV()); GL11.glVertex3f(-size + position.getX() + offset, size + position.getY(), -size + position.getZ()); }
From source file:io.flob.blackheart.IDoor.java
License:Open Source License
private void render_right() { TextureUV _texture;/* w ww . ja va2 s . c o m*/ float offset; if (parallel) { _texture = texture_side; offset = -Level.texture_bleed_offset; } else { _texture = texture_face; offset = Level.texture_bleed_offset; } GL11.glNormal3f(1, 0, 0); GL11.glTexCoord2f(_texture.getU2(), _texture.getV2()); GL11.glVertex3f(size + position.getX() - offset, -size + position.getY(), -size + position.getZ()); GL11.glTexCoord2f(_texture.getU2(), _texture.getV()); GL11.glVertex3f(size + position.getX() - offset, size + position.getY(), -size + position.getZ()); GL11.glTexCoord2f(_texture.getU(), _texture.getV()); GL11.glVertex3f(size + position.getX() - offset, size + position.getY(), size + position.getZ()); GL11.glTexCoord2f(_texture.getU(), _texture.getV2()); GL11.glVertex3f(size + position.getX() - offset, -size + position.getY(), size + position.getZ()); }