Posted by
Sven Gothel on
Oct 07, 2019; 11:19am
URL: https://forum.jogamp.org/glClipPlanef-not-work-in-Java-11-tp4040085p4040086.html
Hi yaqiang,
please find my reply inline below.
Best,
~Sven
On 10/7/19 4:04 AM, yaqiang [via jogamp] wrote:
> I am developing an open source GIS and scientific computation software
> MeteoInfo (
http://www.meteothink.org). Recently I add 3D plot functions using
> JOGL 2.3.2 (
http://www.meteothink.org/news/meteoinfo_2.0.html). It works fine
> in my PC with Java 9, but the glClipPlanef function not work in my laptop with
> Java 11.
First, let's have a look at your two configurations
(1) PC + Java9
(2) Laptop + Java11
Your issue with 'glClipPlanef' is probably related to the OpenGL vendor driver
you are using and which differs on your two platforms.
Java9 vs Java11 is highly likely unrelated, but you could test
(1b) PC + Java11
'glClipPlanef' is represented in GL2 as follows:
+++
/** Entry point to C language function: <code> void {@native
glClipPlanef}(GLenum plane, const GLfloat * equation) </code> <br>Part of
<code>GL_VERSION_ES_CM</code>, <code>GL_IMG_user_clip_plane</code>,
<code>GL_OES_single_precision</code><br>Alias for:
<code>glClipPlanefIMG</code>, <code>glClipPlanefOES</code>
@param equation a direct or array-backed {@link java.nio.FloatBuffer} */
public void glClipPlanef(int plane, FloatBuffer equation);
/** Entry point to C language function: <code> void {@native
glClipPlanef}(GLenum plane, const GLfloat * equation) </code> <br>Part of
<code>GL_VERSION_ES_CM</code>, <code>GL_IMG_user_clip_plane</code>,
<code>GL_OES_single_precision</code><br>Alias for:
<code>glClipPlanefIMG</code>, <code>glClipPlanefOES</code> */
public void glClipPlanef(int plane, float[] equation, int equation_offset);
<
https://www.khronos.org/registry/OpenGL-Refpages/es1.1/xhtml/glClipPlane.xml>
<
https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/GL2.html#glClipPlanef(int,%20float[],%20int)>
+++
You see, both depend of having one of the listed extensions being implemented.
Alternatively you could (and maybe should) use the double variant on desktop:
+++
/** Entry point to C language function: <code> void {@native
glClipPlane}(GLenum plane, const GLdouble * equation) </code> <br>Part of
<code>GL_VERSION_1_0</code><br>
@param equation a direct or array-backed {@link java.nio.DoubleBuffer} */
public void glClipPlane(int plane, DoubleBuffer equation);
/** Entry point to C language function: <code> void {@native
glClipPlane}(GLenum plane, const GLdouble * equation) </code> <br>Part of
<code>GL_VERSION_1_0</code><br> */
public void glClipPlane(int plane, double[] equation, int equation_offset);
<
https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glClipPlane.xml>
<
https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/GL2.html#glClipPlane(int,%20double[],%20int)>
+++
> The related code can be found here:
>
https://github.com/meteoinfo/MeteoInfo/blob/master/MeteoInfoLib/src/main/java/org/meteoinfo/chart/jogl/Plot3DGL.java .
> I am a quite new user of JOGL and want to know why glClipPlanef function was
> not supported in Java 11. Or I can use other solution to sovle this problem?
Hope the above helps, i.e. use the GL2 variant.
Sorry for the confusion.
--
health & wealth
mailto:
[hidden email] ;
http://jausoft.comland : +49 (471) 4707742 ; fax : +49 (471) 4707741
Timezone CET: PST+9, EST+6, UTC+1