summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/build-jogl.xml4
-rw-r--r--make/config/jogl/egl-CustomCCode.c4
-rw-r--r--make/config/jogl/egl-CustomJavaCode.java12
-rw-r--r--make/config/jogl/egl-common.cfg4
-rw-r--r--make/config/jogl/egl.cfg7
-rw-r--r--make/config/jogl/eglext.cfg17
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-common.java6
7 files changed, 30 insertions, 24 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index 4efe992de..7c34691a0 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -99,7 +99,7 @@
value="com/jogamp/opengl/cg com/jogamp/opengl/cg/* jogamp/opengl/cg/*"/>
<property name="java.part.egl"
- value="jogamp/opengl/egl/*"/>
+ value="com/jogamp/opengl/egl/* jogamp/opengl/egl/*"/>
<property name="java.part.glu"
value="javax/media/opengl/glu/* javax/media/opengl/glu/gl2es1/* jogamp/opengl/glu/* jogamp/opengl/glu/error/* jogamp/opengl/glu/tessellator/** jogamp/opengl/glu/mipmap/**"/>
@@ -1517,6 +1517,7 @@
<patternset id="c.src.files.jogl.desktop">
<include name="${rootrel.src.c}/JoglCommon.c"/>
<include name="${rootrel.src.c}/GLContext.c"/>
+ <include name="${rootrel.src.c}/EGLContext.c"/>
<include name="${rootrel.src.c}/GLDebugMessageHandler.c"/>
<include name="${rootrel.src.c}/timespec.c" if="isOSX"/> <!-- currently only used for OSX -->
<include name="${rootrel.src.c}/macosx/MacOSXCustomCGLCode.c" if="isOSX"/>
@@ -1543,6 +1544,7 @@
<patternset id="c.src.files.jogl.mobile">
<include name="${rootrel.src.c}/JoglCommon.c"/>
<include name="${rootrel.src.c}/GLContext.c"/>
+ <include name="${rootrel.src.c}/EGLContext.c"/>
<include name="${rootrel.src.c}/GLDebugMessageHandler.c"/>
<include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
<include name="${rootrel.src.c.libav}/ffmpeg_static.c"/>
diff --git a/make/config/jogl/egl-CustomCCode.c b/make/config/jogl/egl-CustomCCode.c
index 0163c6742..5dd34232c 100644
--- a/make/config/jogl/egl-CustomCCode.c
+++ b/make/config/jogl/egl-CustomCCode.c
@@ -4,10 +4,10 @@
#include <EGL/egl.h>
/* Java->C glue code:
- * Java package: jogamp.opengl.egl.EGL
+ * Java package: com.jogamp.opengl.egl.EGL
* Java method: void eglGetConfigAttributes(long dpy, long config, IntBuffer attributes, IntBuffer values)
*/
-Java_jogamp_opengl_egl_EGL_dispatch_1eglGetConfigAttributes(JNIEnv *env, jclass _unused, jlong dpy, jlong config, jint attributeCount, jobject attributes, jint attributes_byte_offset, jobject values, jint values_byte_offset, jlong procAddress) {
+Java_com_jogamp_opengl_egl_EGL_dispatch_1eglGetConfigAttributes(JNIEnv *env, jclass _unused, jlong dpy, jlong config, jint attributeCount, jobject attributes, jint attributes_byte_offset, jobject values, jint values_byte_offset, jlong procAddress) {
typedef EGLBoolean (EGLAPIENTRY*_local_PFNEGLGETCONFIGATTRIBPROC)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint * value);
_local_PFNEGLGETCONFIGATTRIBPROC ptr_eglGetConfigAttrib = (_local_PFNEGLGETCONFIGATTRIBPROC) (intptr_t) procAddress;
assert(ptr_eglGetConfigAttrib != NULL);
diff --git a/make/config/jogl/egl-CustomJavaCode.java b/make/config/jogl/egl-CustomJavaCode.java
index 4cc486fd4..0c3935691 100644
--- a/make/config/jogl/egl-CustomJavaCode.java
+++ b/make/config/jogl/egl-CustomJavaCode.java
@@ -1,7 +1,8 @@
private static EGLProcAddressTable _table = new EGLProcAddressTable(new GLProcAddressResolver());
- static void resetProcAddressTable(DynamicLookupHelper lookup) {
+ protected static boolean resetProcAddressTable(DynamicLookupHelper lookup) {
_table.reset(lookup);
+ return 0 != _table._addressof_eglGetDisplay && 0 != _table._addressof_eglInitialize;
}
// There are some #defines in egl.h that GlueGen and PCPP don't currently handle
@@ -12,15 +13,6 @@
public static final int EGL_DONT_CARE = -1;
public static final int EGL_UNKNOWN = -1;
- static long eglGetProcAddress(long eglGetProcAddressHandle, java.lang.String procname)
- {
- if (eglGetProcAddressHandle == 0) {
- throw new GLException("Passed null pointer for method \"eglGetProcAddress\"");
- }
- return dispatch_eglGetProcAddress0(procname, eglGetProcAddressHandle);
- }
-
-
/**
* In case of an error on a particualr attribute, the attribute in the attributes-buffer is set to 0.
* <p>
diff --git a/make/config/jogl/egl-common.cfg b/make/config/jogl/egl-common.cfg
index cf5d0b083..62694da53 100644
--- a/make/config/jogl/egl-common.cfg
+++ b/make/config/jogl/egl-common.cfg
@@ -29,7 +29,9 @@ Opaque long __EGLFuncPtr
# Implement the first argument to eglGetProcAddress as String instead
# of byte[]
-ArgumentIsString eglGetProcAddress 0
+#ArgumentIsString eglGetProcAddress 0
+#Implemented in EGLContext
+Ignore eglGetProcAddress
ReturnsString eglQueryString
# Force all of the methods to be emitted using dynamic linking so we
diff --git a/make/config/jogl/egl.cfg b/make/config/jogl/egl.cfg
index 94b67951d..453987d3e 100644
--- a/make/config/jogl/egl.cfg
+++ b/make/config/jogl/egl.cfg
@@ -3,7 +3,7 @@
JavaOutputDir gensrc/classes
NativeOutputDir gensrc/native/jogl/egl
-Package jogamp.opengl.egl
+Package com.jogamp.opengl.egl
JavaClass EGL
Style AllStatic
# Shouldn't matter which one of these we pick up
@@ -19,10 +19,13 @@ HierarchicalNativeOutput false
EmitProcAddressTable true
ProcAddressTableClassName EGLProcAddressTable
GetProcAddressTableExpr _table
+AccessControl com.jogamp.opengl.egl.EGLProcAddressTable PACKAGE_PRIVATE
# Implement the first argument to eglGetProcAddress as String instead
# of byte[]
-ArgumentIsString eglGetProcAddress 0
+#ArgumentIsString eglGetProcAddress 0
+#Implemented in EGLContext
+Ignore eglGetProcAddress
ReturnsString eglQueryString
IncludeAs CustomJavaCode EGL egl-CustomJavaCode.java
diff --git a/make/config/jogl/eglext.cfg b/make/config/jogl/eglext.cfg
index 7fccce716..1da9b253d 100644
--- a/make/config/jogl/eglext.cfg
+++ b/make/config/jogl/eglext.cfg
@@ -3,7 +3,7 @@
JavaOutputDir gensrc/classes
NativeOutputDir gensrc/native/jogl/egl
-Package jogamp.opengl.egl
+Package com.jogamp.opengl.egl
Style InterfaceAndImpl
JavaClass EGLExt
ImplPackage jogamp.opengl.egl
@@ -15,7 +15,7 @@ Include egl-common.cfg
NIOOnly __ALL__
NIODirectOnly __ALL__
-ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/jogamp/opengl/egl/EGL.java
+ExtendedInterfaceSymbolsIgnore ../build-temp/gensrc/classes/com/jogamp/opengl/egl/EGL.java
IgnoreExtension EGL_VERSION_1_X
@@ -24,7 +24,11 @@ HierarchicalNativeOutput false
# Use a ProcAddressTable so we dynamically look up the routines
EmitProcAddressTable true
ProcAddressTableClassName EGLExtProcAddressTable
-GetProcAddressTableExpr _context.getEGLExtProcAddressTable()
+GetProcAddressTableExpr _table
+AccessControl jogamp.opengl.egl.EGLExtProcAddressTable PACKAGE_PRIVATE
+
+Import com.jogamp.opengl.egl.EGLExt
+Import com.jogamp.opengl.egl.EGLClientPixmapHI
CustomCCode #include <stdio.h> /* android */
CustomCCode #include <gluegen_stdint.h>
@@ -47,8 +51,9 @@ CustomJavaCode EGLExt public static final long EGL_NO_SYNC_KHR = 0;
CustomJavaCode EGLExt public boolean isFunctionAvailable(String glFunctionName);
CustomJavaCode EGLExt public boolean isExtensionAvailable(String glExtensionName);
-CustomJavaCode EGLExtImpl public EGLExtImpl(EGLContext context) {
+CustomJavaCode EGLExtImpl public EGLExtImpl(EGLContext context, EGLExtProcAddressTable table) {
CustomJavaCode EGLExtImpl this._context = context;
+CustomJavaCode EGLExtImpl this._table = table;
CustomJavaCode EGLExtImpl }
CustomJavaCode EGLExtImpl public boolean isFunctionAvailable(String glFunctionName)
@@ -61,5 +66,7 @@ CustomJavaCode EGLExtImpl {
CustomJavaCode EGLExtImpl return _context.isExtensionAvailable(glExtensionName);
CustomJavaCode EGLExtImpl }
-CustomJavaCode EGLExtImpl private EGLContext _context;
+CustomJavaCode EGLExtImpl private final EGLContext _context;
+CustomJavaCode EGLExtImpl private final EGLExtProcAddressTable _table;
+CustomJavaCode EGLExtImpl final EGLExtProcAddressTable getProcAdressTable() { return _table; }
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-common.java b/make/config/jogl/gl-impl-CustomJavaCode-common.java
index a2ca12960..6db08efa7 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-common.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-common.java
@@ -1,8 +1,10 @@
+ private final GLProfile glProfile;
+ private final GLContextImpl _context;
+
@Override
public GLProfile getGLProfile() {
return this.glProfile;
}
- private final GLProfile glProfile;
@Override
public final int getBoundBuffer(int target) {
@@ -85,8 +87,6 @@
return _context;
}
- private final GLContextImpl _context;
-
/**
* @see javax.media.opengl.GLContext#setSwapInterval(int)
*/