Search in sources :

Example 1 with GLUquadric

use of com.jogamp.opengl.glu.GLUquadric in project narchy by automenta.

the class Sphere method display.

@Override
public void display(GLAutoDrawable drawable) {
    GL2 gl = (GL2) drawable.getGL();
    GLU glu = GLU.createGLU(gl);
    // Kugel mittels "Quadrik"-Objekt zeichnen:
    GLUquadric quadric = glu.gluNewQuadric();
    gl.glPushMatrix();
    gl.glTranslated(center.x, center.y, center.z);
    if (RaytracerConstants.GL_GRID_MODE_ENABLED)
        glu.gluQuadricDrawStyle(quadric, GLU.GLU_LINE);
    glu.gluSphere(quadric, radius, RaytracerConstants.GL_RESOLUTION, RaytracerConstants.GL_RESOLUTION);
    gl.glPopMatrix();
    glu.gluDeleteQuadric(quadric);
}
Also used : GLU(com.jogamp.opengl.glu.GLU) GLUquadric(com.jogamp.opengl.glu.GLUquadric) GL2(com.jogamp.opengl.GL2)

Example 2 with GLUquadric

use of com.jogamp.opengl.glu.GLUquadric in project gephi by gephi.

the class CompatibilityEngine method initDisplayLists.

@Override
public void initDisplayLists(GL2 gl, GLU glu) {
    // Quadric for all the glu models
    GLUquadric quadric = glu.gluNewQuadric();
    int ptr = gl.glGenLists(4);
    nodeModeler.initDisplayLists(gl, glu, quadric, ptr);
    glu.gluDeleteQuadric(quadric);
}
Also used : GLUquadric(com.jogamp.opengl.glu.GLUquadric)

Aggregations

GLUquadric (com.jogamp.opengl.glu.GLUquadric)2 GL2 (com.jogamp.opengl.GL2)1 GLU (com.jogamp.opengl.glu.GLU)1