Javatpoint Logo
Javatpoint Logo

JOGL 3D Cuboid

In the previous section, we create a cube which is hollow from inside. Now, we will create a solid cuboid and rotate it. While rotating, the cuboid will also move on the whole screen.

To create a solid graphical 3D object it is required to enable depth test. The gl.glEnable( GL2.GL_DEPTH_TEST ) method is used to enable it.

JCuboid.java

Output:


JOGL Cuboid




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA