Skip to content

Commit 5813d69

Browse files
committed
Add the option of using JOGL fixedfunc emulation, but it does not work.
1 parent 8de01e3 commit 5813d69

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

graphics/opengl/OpenGLJOGLJavaLibraryM/src/main/java/org/allbinary/opengles/JOGL10.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public class JOGL10 implements javax.microedition.khronos.opengles.GL10
4040
protected final String FACE = "face: ";
4141
protected final String TARGET = "target: ";
4242

43+
//private final com.jogamp.opengl.GL2ES1 gl10;
44+
//private final com.jogamp.opengl.GL2 gl2;
4345
private final com.jogamp.opengl.GL2 gl10;
4446
public final GLU glu;
4547

@@ -49,7 +51,7 @@ public class JOGL10 implements javax.microedition.khronos.opengles.GL10
4951
// private final com.jogamp.opengl.GL3 gl3;
5052
// private final com.jogamp.opengl.GL4 gl4;
5153

52-
public JOGL10(com.jogamp.opengl.GL gl)
54+
public JOGL10(final com.jogamp.opengl.GL gl, final com.jogamp.opengl.GL2 gl2)
5355
{
5456
//PreLogUtil.put(StringUtil.getInstance().EMPTY_STRING, this, commonStrings.CONSTRUCTOR);
5557

@@ -61,17 +63,23 @@ public JOGL10(com.jogamp.opengl.GL gl)
6163

6264
//final com.jogamp.opengl.GL2 gl2 = gl.getGL2();
6365

64-
final com.jogamp.opengl.GL2 gl2 = (com.jogamp.opengl.GL2) gl;
66+
//jogamp.opengl.util.glsl.fixedfunc.FixedFuncImpl
67+
//final com.jogamp.opengl.GL2ES1 gl2es1 = (com.jogamp.opengl.GL2ES1) gl;
68+
//final com.jogamp.opengl.GL2 gl2 = (com.jogamp.opengl.GL2) gl;
69+
//this.gl2 = gl2;
70+
//this.gl10 = gl2es1;
6571
this.gl10 = gl2;
72+
6673
this.glu = GLU.createGLU(this.gl10);
6774

68-
this.GL_LINE = this.gl10.GL_LINE;
69-
this.GL_QUAD_STRIP = this.gl10.GL_QUAD_STRIP;
75+
this.GL_LINE = com.jogamp.opengl.GL2.GL_LINE;
76+
this.GL_QUAD_STRIP = com.jogamp.opengl.GL2.GL_QUAD_STRIP;
7077

7178
//GLRendererQuirks glRendererQuirks = gl10.getContext().getRendererQuirks();
7279
}
7380

7481
public com.jogamp.opengl.GL2 getJOGLGL() {
82+
//return this.gl2;
7583
return this.gl10;
7684
}
7785

graphics/opengl/OpenGLJOGLJavaLibraryM/src/main/java/org/allbinary/opengles/JOGL11.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
*/
1414
package org.allbinary.opengles;
1515

16-
import com.jogamp.opengl.GL2;
1716
import com.jogamp.opengl.GL;
17+
import com.jogamp.opengl.GL2;
1818

1919
/**
2020
*
@@ -42,9 +42,14 @@ public class JOGL11 extends JOGL10 implements javax.microedition.khronos.opengle
4242

4343
private final GL2 gl11;
4444

45-
public JOGL11(GL gl)
45+
public JOGL11(final GL gl)
46+
{
47+
this(gl, (com.jogamp.opengl.GL2) gl);
48+
}
49+
50+
public JOGL11(final GL gl, final com.jogamp.opengl.GL2 gl2)
4651
{
47-
super(gl);
52+
super(gl, gl2);
4853

4954
//PreLogUtil.put(StringUtil.getInstance().EMPTY_STRING, this, commonStrings.CONSTRUCTOR);
5055
this.gl11 = getJOGLGL();
@@ -83,13 +88,15 @@ public void glClipPlanef(int plane, float[] equation, int offset)
8388
//stringBuilder.delete(0, stringBuilder.length());
8489
//PreLogUtil.put(stringBuilder.append("plane: ").append(plane).append(" equation: ").append(equation.length).toString(), this, "GL11.glClipPlanef");
8590
this.gl11.glClipPlanef(plane, equation, offset);
91+
//throw new RuntimeException();
8692
}
8793

8894
public void glClipPlanef(int plane, java.nio.FloatBuffer equation)
8995
{
9096
//stringBuilder.delete(0, stringBuilder.length());
9197
//PreLogUtil.put(stringBuilder.append("plane: ").append(plane).append(" equation: ").append(equation).toString(), this, "GL11.glClipPlanef");
9298
this.gl11.glClipPlanef(plane, equation);
99+
//throw new RuntimeException();
93100
}
94101

95102
// public void glClipPlanex(int plane, int[] equation, int offset)
@@ -188,13 +195,15 @@ public void glGetClipPlanef(int pname, float[] eqn, int offset)
188195
//stringBuilder.delete(0, stringBuilder.length());
189196
//PreLogUtil.put(stringBuilder.append(PNAME).append(pname).append(" eqn: ").append(eqn.length).toString(), this, "GL11.glGetClipPlanef");
190197
this.gl11.glGetClipPlanef(pname, eqn, offset);
198+
//throw new RuntimeException();
191199
}
192200

193201
public void glGetClipPlanef(int pname, java.nio.FloatBuffer eqn)
194202
{
195203
//stringBuilder.delete(0, stringBuilder.length());
196204
//PreLogUtil.put(stringBuilder.append(PNAME).append(pname).append(" eqn: ").append(eqn).toString(), this, "GL11.glGetClipPlanef");
197205
this.gl11.glGetClipPlanef(pname, eqn);
206+
//throw new RuntimeException();
198207
}
199208

200209
// public void glGetClipPlanex(int pname, int[] eqn, int offset)

0 commit comments

Comments
 (0)