aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-06-25 09:38:10 +0000
committerSven Gothel <[email protected]>2008-06-25 09:38:10 +0000
commit6e9438e631b9f75340c1f7e7cf06b38a358861c4 (patch)
tree9500137a98e187f5e1c09fdf037043613e333cbb
parent16f1e768f7a9162ac50cefc811a1fce019831bdf (diff)
GLES1 NEWT X11 - RedSquare - working
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1683 232f8b59-042b-4e1e-8c03-345bb8c30851
-rwxr-xr-xmake/gl-es1.cfg2
-rwxr-xr-xmake/gl-es2.cfg2
-rw-r--r--make/gl-gl2.cfg3
-rw-r--r--make/gl-impl-CustomJavaCode-common.java2
-rw-r--r--make/make.jogl.all.linux-x86.sh2
-rw-r--r--src/classes/com/sun/opengl/impl/GLContextImpl.java18
-rwxr-xr-xsrc/native/newt/X11Window.c11
7 files changed, 27 insertions, 13 deletions
diff --git a/make/gl-es1.cfg b/make/gl-es1.cfg
index d81b8d0cc..662c3d51f 100755
--- a/make/gl-es1.cfg
+++ b/make/gl-es1.cfg
@@ -6,6 +6,8 @@ Extends GLES1 GL
Extends GLES1 GL2ES1
ImplPackage com.sun.opengl.impl.es1
ImplJavaClass GLES1Impl
+Implements GLES1Impl GL
+Implements GLES1Impl GL2ES1
Include gl-common-es1.cfg
Include gl-ignore-gl2_es-enums.cfg
Include gl-ignore-gl2_es1-enums.cfg
diff --git a/make/gl-es2.cfg b/make/gl-es2.cfg
index 1371dde64..e091b085d 100755
--- a/make/gl-es2.cfg
+++ b/make/gl-es2.cfg
@@ -6,6 +6,8 @@ Extends GLES2 GL
Extends GLES2 GL2ES2
ImplPackage com.sun.opengl.impl.es2
ImplJavaClass GLES2Impl
+Implements GLES2Impl GL
+Implements GLES2Impl GL2ES2
Include gl-common-es2.cfg
Include gl-ignore-gl2_es-enums.cfg
Include gl-ignore-gl2_es2-enums.cfg
diff --git a/make/gl-gl2.cfg b/make/gl-gl2.cfg
index 6dae9e6d3..e739e84f8 100644
--- a/make/gl-gl2.cfg
+++ b/make/gl-gl2.cfg
@@ -10,6 +10,9 @@ Extends GL2 GL2ES1
Extends GL2 GL2ES2
ImplPackage com.sun.opengl.impl.gl2
ImplJavaClass GL2Impl
+Implements GL2Impl GL
+Implements GL2Impl GL2ES1
+Implements GL2Impl GL2ES2
Include gl-common-gl2.cfg
Include gl-desktop.cfg
Include gl-ignore-gl2_es-enums.cfg
diff --git a/make/gl-impl-CustomJavaCode-common.java b/make/gl-impl-CustomJavaCode-common.java
index 0829d588a..2273ebf12 100644
--- a/make/gl-impl-CustomJavaCode-common.java
+++ b/make/gl-impl-CustomJavaCode-common.java
@@ -24,7 +24,7 @@
public final GL2 getGL2() throws GLException {
if(!isGL2()) {
- throw new GLException("Not a GL2implementation");
+ throw new GLException("Not a GL2 implementation");
}
return (GL2)this;
}
diff --git a/make/make.jogl.all.linux-x86.sh b/make/make.jogl.all.linux-x86.sh
index f538018be..556224d4c 100644
--- a/make/make.jogl.all.linux-x86.sh
+++ b/make/make.jogl.all.linux-x86.sh
@@ -2,7 +2,7 @@
. ../../setenv-build-jogl.sh
-ant -v \
+ant \
-Dgluegen.cpptasks.detected.os=true \
-DisUnix=true \
-DisLinux=true \
diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java
index 13b847e51..6bec8c1e5 100644
--- a/src/classes/com/sun/opengl/impl/GLContextImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java
@@ -226,7 +226,7 @@ public abstract class GLContextImpl extends GLContext {
// Helpers for various context implementations
//
- private Object createObject(String suffix) {
+ private Object createObject(String suffix, Class[] cstrArgs) {
String clazzName = null;
Class factoryClass = null;
Constructor factory = null;
@@ -246,11 +246,17 @@ public abstract class GLContextImpl extends GLContext {
throw new GLException(clazzName + " not yet implemented");
}
try {
- factory = factoryClass.getDeclaredConstructor(new Class[] { GLContextImpl.class });
+ factory = factoryClass.getDeclaredConstructor( cstrArgs );
} catch(NoSuchMethodException nsme) {
- throw new GLException(clazzName + "(GLContextImpl) not yet implemented / missing cstr");
+ throw new GLException("Constructor: '" + clazzName + "("+cstrArgs+")' not found");
}
- return factory.newInstance(new Object[] { this });
+ if(cstrArgs.length==0) {
+ return factory.newInstance(null);
+ }
+ if(cstrArgs[0].equals(GLContextImpl.class)) {
+ return factory.newInstance(new Object[] { this });
+ }
+ throw new GLException("Constructor: '" + clazzName + "("+cstrArgs[0]+")' not yet supported");
} catch (Exception e) {
throw new GLException(e);
}
@@ -258,7 +264,7 @@ public abstract class GLContextImpl extends GLContext {
/** Create the GL for this context. */
protected GL createGL() {
- GL gl = (GL) createObject("Impl");
+ GL gl = (GL) createObject("Impl", new Class[] { GLContextImpl.class } );
/* FIXME: refactor dependence on Java 2D / JOGL bridge
if (tracker != null) {
@@ -338,7 +344,7 @@ public abstract class GLContextImpl extends GLContext {
System.err.println(getThreadName() + ": !!! Initializing OpenGL extension address table for " + this);
}
if (glProcAddressTable == null) {
- glProcAddressTable = (ProcAddressTable) createObject("ProcAddressTable");
+ glProcAddressTable = (ProcAddressTable) createObject("ProcAddressTable", new Class[0]);
// FIXME: cache ProcAddressTables by capability bits so we can
// share them among contexts with the same capabilities
}
diff --git a/src/native/newt/X11Window.c b/src/native/newt/X11Window.c
index 3f08b5d49..1640a36fc 100755
--- a/src/native/newt/X11Window.c
+++ b/src/native/newt/X11Window.c
@@ -153,7 +153,7 @@ JNIEXPORT jboolean JNICALL Java_com_sun_javafx_newt_x11_X11Window_initIDs
positionChangedID = (*env)->GetMethodID(env, clazz, "positionChanged", "(II)V");
windowClosedID = (*env)->GetMethodID(env, clazz, "windowClosed", "()V");
windowDestroyedID = (*env)->GetMethodID(env, clazz, "windowDestroyed", "()V");
- windowCreatedID = (*env)->GetMethodID(env, clazz, "windowCreated", "(IJ)V");
+ windowCreatedID = (*env)->GetMethodID(env, clazz, "windowCreated", "(JJ)V");
sendMouseEventID = (*env)->GetMethodID(env, clazz, "sendMouseEvent", "(IIIII)V");
sendKeyEventID = (*env)->GetMethodID(env, clazz, "sendKeyEvent", "(IIIC)V");
if (sizeChangedID == NULL ||
@@ -216,7 +216,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_x11_X11Window_CreateWindow
if(pVisualQuery!=NULL) {
visual = pVisualQuery->visual;
depth = pVisualQuery->depth;
- visualID = pVisualQuery->visualid;
+ visualID = (jlong)pVisualQuery->visualid;
XFree(pVisualQuery);
pVisualQuery=NULL;
}
@@ -229,7 +229,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_x11_X11Window_CreateWindow
// try default ..
visual = XDefaultVisualOfScreen(scrn);
if(visual!=NULL) {
- visualID = visual->visualid;
+ visualID = (jlong)visual->visualid;
// try given VisualID on screen
memset(&visualTemplate, 0, sizeof(XVisualInfo));
visualTemplate.screen = scrn_idx;
@@ -239,7 +239,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_x11_X11Window_CreateWindow
if(pVisualQuery!=NULL) {
visual = pVisualQuery->visual;
depth = pVisualQuery->depth;
- visualID = pVisualQuery->visualid;
+ visualID = (jlong)pVisualQuery->visualid;
XFree(pVisualQuery);
pVisualQuery=NULL;
} else {
@@ -362,13 +362,14 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_newt_x11_X11Window_DispatchMessages
XSelectInput(dpy, w, xevent_mask_win|xevent_mask_key|xevent_mask_ptr);
+ /**
if(0!=xevent_mask_ptr) {
XGrabPointer(dpy, w, True, xevent_mask_ptr,
GrabModeAsync, GrabModeAsync, w, None, CurrentTime);
}
if(0!=xevent_mask_key) {
XGrabKeyboard(dpy, w, True, GrabModeAsync, GrabModeAsync, CurrentTime);
- }
+ } */
}