aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-11-27 06:57:50 +0000
committerSven Gothel <[email protected]>2008-11-27 06:57:50 +0000
commit93531a87d4ec985e6088fd8c63b75457c09d8c0e (patch)
tree02214d138f65353fe2f293cb7d3c6d4e40880a42 /src/classes/com/sun
parent6c6663bf9e424ef88eddd333a1a379b3059662f8 (diff)
KD Fix: Use EGL AttributeList directly
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1809 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun')
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/kd/KDWindow.java4
-rw-r--r--src/classes/com/sun/opengl/impl/egl/EGLConfig.java5
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/egl/EGLContext.java2
3 files changed, 7 insertions, 4 deletions
diff --git a/src/classes/com/sun/javafx/newt/kd/KDWindow.java b/src/classes/com/sun/javafx/newt/kd/KDWindow.java
index ebd8edc36..b7b9f6686 100755
--- a/src/classes/com/sun/javafx/newt/kd/KDWindow.java
+++ b/src/classes/com/sun/javafx/newt/kd/KDWindow.java
@@ -76,7 +76,7 @@ public class KDWindow extends Window {
windowHandle = 0;
windowID = ++_windowID;
- eglWindowHandle = CreateWindow(windowID, getDisplayHandle(), visualID, eglRenderableType);
+ eglWindowHandle = CreateWindow(windowID, getDisplayHandle(), config.getAttributeList());
if (eglWindowHandle == 0) {
throw new RuntimeException("Error creating egl window: "+eglWindowHandle);
}
@@ -140,7 +140,7 @@ public class KDWindow extends Window {
//
private static native boolean initIDs();
- private native long CreateWindow(int owner, long displayHandle, long eglConfig, int eglRenderableType);
+ private native long CreateWindow(int owner, long displayHandle, int[] attributes);
private native long RealizeWindow(long eglWindowHandle);
private native int CloseWindow(long eglWindowHandle);
private native void setVisible0(long eglWindowHandle, boolean visible);
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLConfig.java b/src/classes/com/sun/opengl/impl/egl/EGLConfig.java
index 49c1a895f..4948b3a0c 100644
--- a/src/classes/com/sun/opengl/impl/egl/EGLConfig.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLConfig.java
@@ -54,6 +54,10 @@ public class EGLConfig {
return capabilities;
}
+ public int[] getAttributeList() {
+ return glCapabilities2AttribList(capabilities);
+ }
+
public EGLConfig(long display, int configID) {
int[] attrs = new int[] {
EGL.EGL_RENDERABLE_TYPE, -1,
@@ -163,6 +167,5 @@ public class EGLConfig {
private _EGLConfig _config;
private int configID;
private GLCapabilities capabilities;
-
}
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLContext.java b/src/classes/com/sun/opengl/impl/egl/EGLContext.java
index 8ba07bc51..40ab077a6 100755
--- a/src/classes/com/sun/opengl/impl/egl/EGLContext.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLContext.java
@@ -182,7 +182,7 @@ public class EGLContext extends GLContextImpl {
protected void create() throws GLException {
long display = drawable.getDisplay();
_EGLConfig config = drawable.getEGLConfig().getNativeConfig();
- long shareWith = 0;
+ long shareWith = EGL.EGL_NO_CONTEXT;
if (display == 0) {
throw new GLException("Error: attempted to create an OpenGL context without a display connection");