Answer the question
In order to leave comments, you need to log in
Stencil Buffer not working?
I understand terribly little about graphics programming, so please explain what I'm doing wrong. I write in Java in OpenGL via LWJGL. The crux of the problem is that Stencil Buffer just doesn't work.
There is a large and long program in which you need to hide a part of the graphics that will be drawn in one place. Having suffered with this buffer, I realized that something was wrong. Piece of code:
GL11.glEnable(GL11.GL_STENCIL_TEST);
GL11.glStencilFunc(GL11.GL_NEVER, 0, 0);
// Рисуем объекты
GL11.glDisable(GL11.GL_STENCIL_TEST);
Answer the question
In order to leave comments, you need to log in
With such questions, it is better to contact the forum www.gamedev.ru/forum/
In general, there is an article that explains everything in some detail ... www.gamedev.ru/code/terms/StencilBuffer
All these articles do not explain in any way how to set the depth of the stencilbuffer in LWJGL. Thank you very much, Bagobor, everything works.
99% of articles on OpenGL for all sorts of C ++ and glut, I don’t have this, so they only help on OpenGL functions and general principles.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question