We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm currently working on a voxel engine game and I would like to implement fog, however poking through the opengl library I can't seem to find any reference to that OpenGL function.
Any help?
Thanks!
Answers
advanced jogl in processing
opengl reference:
https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glFog.xml
google search:
https://www.google.com/search?q=gl_fog+opengl+example
So it appears that glFog is only available in GL2.
I'm able to get the GL2 context from the GL2ES2 gl like this
pgl = (PJOGL) beginPGL(); GL2ES2 gl = pgl.gl.getGL2ES2() GL2 = gl.getGL2()
I'm able to access the glFog() functions but when I run the program I get the error
com.jogamp.opengl.GLException: Not a GL2 implementation
I'm stuck...
Nevermind, I had to set PJOGL.profile = 1;
in settings() to have backwards compatibility. Thanks for the help nabr!
duplicate:
https://forum.processing.org/two/discussion/26085/can-t-get-fog-working-in-my-test#latest
It will work with an older version of processing version 2.2.1
https://github.com/processing/processing/wiki/Advanced-OpenGL-in-Processing-2.x
https://pastebin.com/yBhuNwqe
Hey nabr, I downloaded processing 2.2.1 and ran the pastebin sketch.. It still didn't work. I'm giving up on the glFog idea and i'm probably just gonna learn how to write a fog shader... Thanks for the help regardless.