Examples of glVertex3f()


Examples of org.lwjgl.test.opengles.util.ImmediateModeBuffer.glVertex3f()

      imb.glNormal3f(cos(angle), sin(angle), 0.0f);
      imb.glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5f);

      imb.glNormal3f(cos(angle), sin(angle), 0.0f);
      imb.glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5f);

      u = r2 * cos(angle + da) - r1 * cos(angle);
      v = r2 * sin(angle + da) - r1 * sin(angle);
      len = (float)Math.sqrt(u * u + v * v);
      u /= len;
View Full Code Here

Examples of org.lwjgl.test.opengles.util.ImmediateModeBuffer.glVertex3f()

      len = (float)Math.sqrt(u * u + v * v);
      u /= len;
      v /= len;

      imb.glNormal3f(v, -u, 0.0f);
      imb.glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5f);

      imb.glNormal3f(v, -u, 0.0f);
      imb.glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5f);

      imb.glNormal3f(cos(angle), sin(angle), 0.0f);
View Full Code Here

Examples of org.lwjgl.test.opengles.util.ImmediateModeBuffer.glVertex3f()

      imb.glNormal3f(v, -u, 0.0f);
      imb.glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5f);

      imb.glNormal3f(v, -u, 0.0f);
      imb.glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5f);

      imb.glNormal3f(cos(angle), sin(angle), 0.0f);
      imb.glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5f);

      imb.glNormal3f(cos(angle), sin(angle), 0.0f);
View Full Code Here

Examples of org.lwjgl.test.opengles.util.ImmediateModeBuffer.glVertex3f()

      imb.glNormal3f(v, -u, 0.0f);
      imb.glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5f);

      imb.glNormal3f(cos(angle), sin(angle), 0.0f);
      imb.glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5f);

      imb.glNormal3f(cos(angle), sin(angle), 0.0f);
      imb.glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5f);

      u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da);
 
View Full Code Here

Examples of org.lwjgl.test.opengles.util.ImmediateModeBuffer.glVertex3f()

      imb.glNormal3f(cos(angle), sin(angle), 0.0f);
      imb.glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5f);

      imb.glNormal3f(cos(angle), sin(angle), 0.0f);
      imb.glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5f);

      u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da);
      v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da);

      imb.glNormal3f(v, -u, 0.0f);
View Full Code Here

Examples of org.lwjgl.test.opengles.util.ImmediateModeBuffer.glVertex3f()

      u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da);
      v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da);

      imb.glNormal3f(v, -u, 0.0f);
      imb.glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5f);

      imb.glNormal3f(v, -u, 0.0f);
      imb.glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5f);
    }
    imb.glNormal3f(cos(0), sin(0), 0.0f);
View Full Code Here

Examples of org.lwjgl.test.opengles.util.ImmediateModeBuffer.glVertex3f()

      imb.glNormal3f(v, -u, 0.0f);
      imb.glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5f);

      imb.glNormal3f(v, -u, 0.0f);
      imb.glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5f);
    }
    imb.glNormal3f(cos(0), sin(0), 0.0f);
    imb.glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5f);

    imb.glNormal3f(cos(0), sin(0), 0.0f);
View Full Code Here

Examples of org.lwjgl.test.opengles.util.ImmediateModeBuffer.glVertex3f()

      imb.glNormal3f(v, -u, 0.0f);
      imb.glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5f);
    }
    imb.glNormal3f(cos(0), sin(0), 0.0f);
    imb.glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5f);

    imb.glNormal3f(cos(0), sin(0), 0.0f);
    imb.glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5f);

    //glShadeModel(GL_SMOOTH);
 
View Full Code Here

Examples of org.lwjgl.test.opengles.util.ImmediateModeBuffer.glVertex3f()

    }
    imb.glNormal3f(cos(0), sin(0), 0.0f);
    imb.glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5f);

    imb.glNormal3f(cos(0), sin(0), 0.0f);
    imb.glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5f);

    //glShadeModel(GL_SMOOTH);

    // draw inside radius cylinder
    lastDrawIndex += gear.addDrawCommand(GL_TRIANGLE_STRIP, lastDrawIndex, (teeth + 1) * 2);
 
View Full Code Here

Examples of org.lwjgl.test.opengles.util.ImmediateModeBuffer.glVertex3f()

    lastDrawIndex += gear.addDrawCommand(GL_TRIANGLE_STRIP, lastDrawIndex, (teeth + 1) * 2);
    for ( i = 0; i <= teeth; i++ ) {
      angle = i * 2.0f * (float)Math.PI / teeth;

      imb.glNormal3f(-cos(angle), -sin(angle), 0.0f);
      imb.glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5f);

      imb.glNormal3f(-cos(angle), -sin(angle), 0.0f);
      imb.glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5f);
    }

 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.