Re: Java3D + OpenGL ES
Posted by philjord on Jan 17, 2019; 9:25pm
URL: https://forum.jogamp.org/Java3D-OpenGL-ES-tp4039401p4039406.html
Java3D 1.7 has the newer OpenGL profile support.
It continues to support the same fixed function pipeline (with basic shader support) as Java3D1.6 and will default to that rendering system when used.
If it is given the property System.setProperty("j3d.rend", "jogl2es2"); then it will use it's newer pipeline that uses the GL2ES2 profile.
It will then map all of the Java3D scene graph elements across to the shader system automatically. It also has a new sub class of ShaderAppearance called SimpleShaderAppearance, which allows all current Shape3D Appearance structures to automatically build reasonable basic shaders incorporating the attributes of the appearance.
It also automatically checks for some features that are not backward compatible (like VAO use) and uses the correct structure for the profile it is given.
To answer the question, in Java3D 1.7 you are free to use any shader functionality that's supported by the OpenGL system your GPU supports, but you will be significantly constrained by the way that shader attributes are loaded into the shaders from the Java3D pipeline.
The OpenGL profile is encapsulated in the pipeline and removed from access by design in Java3D and I can't think of (off the top of my head) any OpenGL 3 or 4 functions that an implementation using Java3D 1.7 would want to use but be unable to use because of the profile requested (profile = GLProfile.get(GLProfile.GL2ES2);).
The design requirement for GL2ES2 support in Java3D was to get it running on ES devices rather than to leverage teh power of the newer features of OpenGL, and given that Vulcan is here that will probably be the next thing to get support in Java3D rather than OpenGL3+
I hope this helps, please do ask any more questions so I can give a clearer answer.
Phil.