Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

How to call glAlphaFunc()? Can't figure out these compile errors

$
0
0
I'm trying to figure out how to enable GL_ALPHA_TEST and how to call glAlphaFunc(), as they are not wrapped in PGL.

Looking at Processing's source code, I found in PGL.java:

  1. import javax.media.opengl.GL;
  2. //...
  3. /** Basic GL functionality, common to all profiles */
  4. public static GL gl;
And looking at the Javadoc for javax.media.opengl.GL :

javax.media.opengl 
Interface GL

static intGL_ALPHA_TEST
...
voidglAlphaFunc(int func, float ref)
 

So, I would expect this to work, or at least to compile:

  1. PGL pgl= ((PGraphicsOpenGL)g).pgl;
  2. pgl.enable(GL.GL_ALPHA_TEST); //3008
  3. PGL.gl.glAlphaFunc(516, 0.0);
However, I get at line 2:
"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.

Viewing all articles
Browse latest Browse all 1768

Trending Articles