Login  Register

Totally confused

Posted by tomd on Nov 11, 2010; 6:21pm
URL: https://forum.jogamp.org/Totally-confused-tp1884224.html

I am new to JOGL (and OpenGL). I am getting very confused by the tutorials. eg

    public void drawPyramid(GLAutoDrawable drawable) {
        GL gl = drawable.getGL();

        gl.glBegin(GL.GL_TRIANGLES);
        gl.glVertex3f(0.0f, 1.5f, 0.0f);
        gl.glVertex3f(-1.0f, -1.0f, 0.0f);
        gl.glVertex3f(1.0f, -1.0f, 0.0f);
        gl.glEnd();

    }

doesn't compile at all. Looking at the API, there is no glBegin, or glVertex3f. Has the code changed a lot since these tutorials were created? Or have I downloaded the wrong thing altogether?

TIA