Author: DigiBen
This shows how to do 3D with the OpenGL libraries. To do this we create a JPanel and pin the OpenGL scene to it. To use OpenGL with Java you will want to download the JOGL libraries. Check our beginner FAQ for information on how to download and install JOGL. For learning more about OpenGL please refer to our C++ OpenGL section, which has over 75 tutorials on using the API.
Functions Used: setSize(), createGLCanvas(), addGLEventListener(), setLayout(), add(), addKeyListener(), getGL(), getGLU(), getKeyCode(), start(), stop(), glClear(), glLoadIdentity(), glBegin(), glEnd(), gluLookAt(), glVertex3f(), glSwapBuffer(), OnSizeChanged(), glViewport(), glMatrixMode(), gluPerspective()
purchase full version
Access EXE