How to call glAlphaFunc()? Can't figure out these compile errors
in
Core Library Questions
•
5 months ago
I'm trying to figure out how to enable GL_ALPHA_TEST and how to call glAlphaFunc(), as they are not wrapped in PGL.
So, I would expect this to work, or at least to compile:
Looking at Processing's source code, I found in PGL.java:
- import javax.media.opengl.GL;
- //...
- /** Basic GL functionality, common to all profiles */
- public static GL gl;
javax.media.opengl
Interface GL...
static int
GL_ALPHA_TEST
void
glAlphaFunc(int func, float ref)
So, I would expect this to work, or at least to compile:
- PGL pgl= ((PGraphicsOpenGL)g).pgl;
- pgl.enable(GL.GL_ALPHA_TEST); //3008
- PGL.gl.glAlphaFunc(516, 0.0);
"Cannot find anything named GL.GL_ALPHA_TEST".
If I comment out line 2 I get at line 3:
"The function glAlphaFunct(int, float) does not exist".
This is complete nonsense to me. That constant and that function do exist in javax.media.opengl.GL.
What am I missing?
And in the end how do I access those functionalities for which PGL does not provide a wrapper such as the function glAlphaFunc()?
I know there are several occurrences of this last question in the forum, but this seems to change at every 2.0bx version of Processing, and none of the provided answers currently works.
1