LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: wartemw on December 04, 2016, 14:06:23

Title: need an example 3d cube.
Post by: wartemw on December 04, 2016, 14:06:23
please. give an example of 3d cube with texture and thus it is that he rotate. I just can not figure out which libraries are needed for painting textures
https://github.com/wartemw/Oskar_Veerhoek/blob/master/src/kz/wartemw/CubeRotate/Main.java (https://github.com/wartemw/Oskar_Veerhoek/blob/master/src/kz/wartemw/CubeRotate/Main.java)
(demo 3d cube nou texture)(rotation expression on the keys W,S,A,D)
how to remove the transparent rear wall?
how to apply a texture?
Title: Re: need an example 3d cube.
Post by: abcdef on December 05, 2016, 10:05:59
I think you have a bug here

GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_COLOR_BUFFER_BIT);

You need to clear the depth buffer too.