LWJGL Forum

Programming => OpenGL => Topic started by: Mihai_Ionut_Floares on December 07, 2020, 01:16:33

Title: The backface of quads are rendered
Post by: Mihai_Ionut_Floares on December 07, 2020, 01:16:33
https://streamable.com/mielrx
Why is rendered the inside of the cube?
Title: Re: The backface of quads are rendered
Post by: KaiHH on December 07, 2020, 09:03:22
Have you enabled backface culling, then?
https://learnopengl.com/Advanced-OpenGL/Face-culling
Title: Re: The backface of quads are rendered
Post by: Mihai_Ionut_Floares on December 07, 2020, 10:25:15
No. I enabled only the depth test...
And that line that I don't really know what it does: glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Title: Re: The backface of quads are rendered
Post by: KaiHH on December 07, 2020, 10:42:22
Quote from: Mihai_Ionut_Floares on December 07, 2020, 10:25:15
No. I enabled only the depth test...
Well... you need to enable backface culling then. Please read the referenced article.
And about what glClear() does: You can always just search/google the function names, you know, and you will get the documentation for that
-> https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glClear.xml