Package Hexel.rendering

Examples of Hexel.rendering.GLObj


    step++;
  }

  @Override
  public void render(GL2 gl) {
    GLObj obj = Deer.obj;
    if (step - lastHurt < 10){
      obj = Deer.objHurt;
    }
    if (obj.buffer == null){
      obj.initBuffer(gl);
    }
    gl.glPushMatrix();
    gl.glTranslated((float)x+xlen/2, (float)y+ylen/2, (float)z);
    gl.glScaled(.5, .5, .5);
    gl.glRotated(this.dir*180/Math.PI, 0, 0, 1);
    gl.glRotated(90, 1, 0, 0);
    obj.render(gl);
    gl.glPopMatrix();
  }
View Full Code Here


  }

  @Override
  public void render(GL2 gl) {
    GLObj obj = Zombie.obj;
    if (this.hurt > 0){
      obj = Zombie.objHurt;
      this.hurt -= 1;
    }
    if (obj.buffer == null){
      obj.initBuffer(gl);
    }
    gl.glPushMatrix();
    gl.glTranslated((float)x+xlen/2, (float)y+ylen/2, (float)z);
    gl.glScaled(1, 1, 1);
    gl.glRotated(this.dir*180/Math.PI, 0, 0, 1);
    gl.glRotated(90, 1, 0, 0);
    obj.render(gl);
    gl.glPopMatrix();
  }
View Full Code Here

TOP

Related Classes of Hexel.rendering.GLObj

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.