Exemplo n.º 1
0
 /**
  * Renders the animal's fur to the screen
  *
  * @param prog The Program to use for drawing
  */
 public void drawFur(Program prog) {
   prog.setUniform(
       "worldMatrix",
       mul(
           mul(axisRotation(new vec4(0.0f, 1.0f, 0.0f, 0.0f), mRotY), translation(mPos)),
           translation(new vec3(0, mYOffset, 0))));
   mMesh.drawFur(prog);
 }
Exemplo n.º 2
0
 public void draw(Program prog) {
   prog.setUniform("elapsed", waterTracker);
   prog.setUniform("freq", freq);
   prog.setUniform("speed", speed);
   prog.setUniform("steepness", steepness);
   prog.setUniform("amplitude", amplitude);
   prog.setUniform(
       "worldMatrix",
       scaling(1000, 1000, 1000)
           .mul(axisRotation(new vec3(1, 0, 0), Math.PI / 2))
           .mul(translation(new vec3(-500, mPos.y, -500))));
   mMesh.draw(prog);
 }