From 0b7a4d59af3ec29740720c4c8d9b249efe06ff5f Mon Sep 17 00:00:00 2001 From: sg215889 Date: Fri, 24 Jul 2009 14:29:08 -0700 Subject: NEWT: Adding KD if building with OpenGL. Fixing build in case no native library is being build. Fixing KD build for non windows. --- src/newt/native/KDWindow.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src/newt/native/KDWindow.c') diff --git a/src/newt/native/KDWindow.c b/src/newt/native/KDWindow.c index 682edff24..8e57237b3 100755 --- a/src/newt/native/KDWindow.c +++ b/src/newt/native/KDWindow.c @@ -39,20 +39,24 @@ #include #include -/* This typedef is apparently needed for Microsoft compilers before VC8, - and on Windows CE */ -#if (_MSC_VER < 1400) || defined(UNDER_CE) - #ifdef _WIN64 - typedef long long intptr_t; +#ifdef _WIN32 + /* This typedef is apparently needed for Microsoft compilers before VC8, + and on Windows CE */ + #if (_MSC_VER < 1400) || defined(UNDER_CE) + #ifdef _WIN64 + typedef long long intptr_t; + #else + typedef int intptr_t; + #endif + #elif _MSC_VER <= 1500 + #ifdef _WIN64 // [ + typedef __int64 intptr_t; + #else // _WIN64 ][ + typedef int intptr_t; + #endif // _WIN64 ] #else - typedef int intptr_t; + #include #endif -#elif _MSC_VER <= 1500 - #ifdef _WIN64 // [ - typedef __int64 intptr_t; - #else // _WIN64 ][ - typedef int intptr_t; - #endif // _WIN64 ] #else #include #endif -- cgit v1.2.3 From 8949675c20e3fc064d170b509391fadbdb970611 Mon Sep 17 00:00:00 2001 From: sg215889 Date: Mon, 27 Jul 2009 19:25:33 -0700 Subject: Add Custom NativeWindow Type 'BroadcomEGL' (-Dnativewindow.ws.name=BroadcomEGL): 1st Draft of supporting broadcom's proprietary EGL mapping --- make/build-jogl.xml | 39 +---- make/build-nativewindow.xml | 15 +- make/build-newt.xml | 65 ++++++-- make/config/jogl/eglext.cfg | 3 - make/make.jogl.all.linux-x86.sh | 10 +- make/make.jogl.all.linux-x86_64.sh | 13 +- make/stub_includes/egl/EGL/egl.h | 5 - .../com/sun/opengl/impl/egl/EGLDrawable.java | 38 +++-- .../opengl/impl/egl/EGLGraphicsConfiguration.java | 19 ++- .../media/nativewindow/NativeWindowFactory.java | 4 +- src/newt/classes/com/sun/javafx/newt/Display.java | 7 +- .../classes/com/sun/javafx/newt/NewtFactory.java | 5 +- src/newt/classes/com/sun/javafx/newt/Screen.java | 2 + src/newt/classes/com/sun/javafx/newt/Window.java | 2 + .../javafx/newt/opengl/broadcom/BCEGLDisplay.java | 82 ++++++++++ .../javafx/newt/opengl/broadcom/BCEGLScreen.java | 64 ++++++++ .../javafx/newt/opengl/broadcom/BCEGLWindow.java | 126 +++++++++++++++ .../com/sun/javafx/newt/opengl/egl/EGLDisplay.java | 85 ----------- src/newt/native/BroadcomEGL.c | 170 +++++++++++++++++++++ src/newt/native/KDWindow.c | 18 +-- 20 files changed, 578 insertions(+), 194 deletions(-) create mode 100644 src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLDisplay.java create mode 100755 src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLScreen.java create mode 100755 src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java delete mode 100644 src/newt/classes/com/sun/javafx/newt/opengl/egl/EGLDisplay.java create mode 100755 src/newt/native/BroadcomEGL.c (limited to 'src/newt/native/KDWindow.c') diff --git a/make/build-jogl.xml b/make/build-jogl.xml index 348dc0624..fda65c5b2 100644 --- a/make/build-jogl.xml +++ b/make/build-jogl.xml @@ -1199,16 +1199,9 @@ - + - - - - - - - @@ -1293,8 +1286,6 @@ - - @@ -1302,8 +1293,6 @@ - - @@ -1311,8 +1300,6 @@ - - @@ -1320,8 +1307,6 @@ - - @@ -1329,23 +1314,15 @@ - - - - - + - - @@ -1354,8 +1331,6 @@ - - @@ -1364,8 +1339,6 @@ - - @@ -1373,8 +1346,6 @@ - - @@ -1382,8 +1353,6 @@ - - @@ -1394,8 +1363,6 @@ - - @@ -1554,7 +1521,7 @@ - + diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml index e583d05a6..641e2a4f5 100644 --- a/make/build-nativewindow.xml +++ b/make/build-nativewindow.xml @@ -490,6 +490,8 @@ + + @@ -531,35 +533,30 @@ - - - - - @@ -568,7 +565,6 @@ - @@ -576,7 +572,6 @@ - @@ -584,21 +579,18 @@ - - - @@ -608,7 +600,6 @@ - @@ -749,7 +740,7 @@ + linker.cfg.id="${linker.cfg.id.base}"/> diff --git a/make/build-newt.xml b/make/build-newt.xml index 31a23172a..95869546f 100644 --- a/make/build-newt.xml +++ b/make/build-newt.xml @@ -97,16 +97,13 @@ - - - - + @@ -118,7 +115,9 @@ + + @@ -135,7 +134,10 @@ value="com/sun/javafx/newt/macosx/*"/> + value="com/sun/javafx/newt/opengl/*, com/sun/javafx/newt/opengl/kd/*"/> + + @@ -148,7 +150,7 @@ + value="${java.part.opengl} ${java.part.broadcomegl}"> @@ -271,6 +273,7 @@ + @@ -279,6 +282,7 @@ + @@ -308,6 +312,7 @@ + @@ -364,7 +369,13 @@ + + + + + + @@ -421,7 +432,19 @@ - + + + + + + + + + + + + + @@ -521,6 +544,7 @@ + @@ -553,7 +577,8 @@ - + + @@ -583,16 +608,20 @@ - + + + + + - - - + + + - + + + + @@ -693,6 +726,10 @@ + + + @@ -735,7 +772,7 @@ + includes="${java.part.core} ${java.part.opengl} ${java.part.broadcomegl}"/> diff --git a/make/config/jogl/eglext.cfg b/make/config/jogl/eglext.cfg index 0447dd1e4..bdd9a3655 100755 --- a/make/config/jogl/eglext.cfg +++ b/make/config/jogl/eglext.cfg @@ -124,6 +124,3 @@ Ignore eglTerminate Ignore eglWaitClient Ignore eglWaitGL Ignore eglWaitNative - -Ignore EGLUtil_CreateDisplayByNative -Ignore EGLUtil_CreateWindowByNative diff --git a/make/make.jogl.all.linux-x86.sh b/make/make.jogl.all.linux-x86.sh index 915bacaf3..8842cbc0c 100644 --- a/make/make.jogl.all.linux-x86.sh +++ b/make/make.jogl.all.linux-x86.sh @@ -9,15 +9,17 @@ fi # -Dc.compiler.debug=true # -DuseOpenMAX=true \ # -Dbuild.noarchives=true +# -Dgluegen.cpptasks.detected.os=true \ +# -DisUnix=true \ +# -DisLinux=true \ +# -DisLinuxX86=true \ ant \ -Dbuild.noarchives=true \ -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86 \ -Drootrel.build=build-x86 \ - -Dgluegen.cpptasks.detected.os=true \ - -DisUnix=true \ - -DisLinux=true \ - -DisLinuxX86=true \ + -Dos.arch=x86 \ -DisX11=true \ + -DuseKD=true \ -DuseOpenMAX=true \ $* 2>&1 | tee make.jogl.all.linux-x86.log diff --git a/make/make.jogl.all.linux-x86_64.sh b/make/make.jogl.all.linux-x86_64.sh index b9e1d1789..90883f97c 100644 --- a/make/make.jogl.all.linux-x86_64.sh +++ b/make/make.jogl.all.linux-x86_64.sh @@ -8,14 +8,17 @@ fi # -Dc.compiler.debug=true # -Dbuild.noarchives=true +# -Dgluegen.cpptasks.detected.os=true \ +# -DisUnix=true \ +# -DisLinux=true \ +# -DisLinuxAMD64=true \ +# -DisX11=true \ + ant \ -Dbuild.noarchives=true \ -Djogl.cg=1 -Dx11.cg.lib=../../lib-linux-x86_64 \ -Dc.compiler.debug=true \ -Drootrel.build=build-x86_64 \ - -Dgluegen.cpptasks.detected.os=true \ - -DisUnix=true \ - -DisLinux=true \ - -DisLinuxAMD64=true \ - -DisX11=true \ + -DuseKD=true \ + -DuseOpenMAX=true \ $* 2>&1 | tee make.jogl.all.linux-x86_64.log diff --git a/make/stub_includes/egl/EGL/egl.h b/make/stub_includes/egl/EGL/egl.h index 5b4c4215c..86ca4818f 100755 --- a/make/stub_includes/egl/EGL/egl.h +++ b/make/stub_includes/egl/EGL/egl.h @@ -297,11 +297,6 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); -EGLAPI EGLDisplay EGLAPIENTRY EGLUtil_CreateDisplayByNative(EGLint w, EGLint h); - -EGLAPI EGLSurface EGLAPIENTRY EGLUtil_CreateWindowByNative(EGLDisplay dpy, EGLint xx, - EGLint *wvalue, EGLint *hvalue); - typedef void (* EGLAPIENTRY __EGLFuncPtr)(void); EGLAPI __EGLFuncPtr eglGetProcAddress(const char *procname); diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java index d2907c83d..aabc6f263 100755 --- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java +++ b/src/jogl/classes/com/sun/opengl/impl/egl/EGLDrawable.java @@ -45,10 +45,10 @@ import javax.media.opengl.*; public abstract class EGLDrawable extends GLDrawableImpl { protected boolean ownEGLDisplay = false; + protected boolean ownEGLSurface = false; private EGLGraphicsConfiguration eglConfig; protected long eglDisplay; protected long eglSurface; - private int[] tmp = new int[1]; protected EGLDrawable(EGLDrawableFactory factory, NativeWindow component) throws GLException { @@ -78,13 +78,16 @@ public abstract class EGLDrawable extends GLDrawableImpl { protected abstract long createSurface(long eglDpy, _EGLConfig eglNativeCfg); private void recreateSurface() { - if(EGL.EGL_NO_SURFACE!=eglSurface) { - EGL.eglDestroySurface(eglDisplay, eglSurface); - } - eglSurface = createSurface(eglDisplay, eglConfig.getNativeConfig()); + if(ownEGLSurface) { + // create a new EGLSurface .. + if(EGL.EGL_NO_SURFACE!=eglSurface) { + EGL.eglDestroySurface(eglDisplay, eglSurface); + } + eglSurface = createSurface(eglDisplay, eglConfig.getNativeConfig()); - if(DEBUG) { - System.err.println("setSurface using component: handle 0x"+Long.toHexString(component.getWindowHandle())+" -> 0x"+Long.toHexString(eglSurface)); + if(DEBUG) { + System.err.println("setSurface using component: handle 0x"+Long.toHexString(component.getWindowHandle())+" -> 0x"+Long.toHexString(eglSurface)); + } } } @@ -110,13 +113,28 @@ public abstract class EGLDrawable extends GLDrawableImpl { if (null == eglConfig) { throw new GLException("Null EGLGraphicsConfiguration from "+aConfig); } - eglConfig.updateGraphicsConfiguration(); + int[] tmp = new int[1]; + if (EGL.eglQuerySurface(eglDisplay, component.getWindowHandle(), EGL.EGL_CONFIG_ID, tmp, 0)) { + // component holds static EGLSurface + eglSurface = component.getWindowHandle(); + if(DEBUG) { + System.err.println("setSurface re-using component's EGLSurface: handle 0x"+Long.toHexString(eglSurface)); + } + } else { + // EGLSurface is ours .. + ownEGLSurface=true; + + eglConfig.updateGraphicsConfiguration(); + } } else { throw new GLException("EGLGraphicsConfiguration doesn't carry a EGLGraphicsDevice: "+aConfig); } } else { // create a new EGL config .. ownEGLDisplay=true; + // EGLSurface is ours .. + ownEGLSurface=true; + long nDisplay; if( NativeWindowFactory.TYPE_WINDOWS.equals(NativeWindowFactory.getNativeWindowType(false)) ) { nDisplay = component.getSurfaceHandle(); // don't even ask .. @@ -153,7 +171,7 @@ public abstract class EGLDrawable extends GLDrawableImpl { } finally { unlockSurface(); } - } else if (eglSurface != EGL.EGL_NO_SURFACE) { + } else if (ownEGLSurface && eglSurface != EGL.EGL_NO_SURFACE) { // Destroy the window surface if (!EGL.eglDestroySurface(eglDisplay, eglSurface)) { throw new GLException("Error destroying window surface (eglDestroySurface)"); @@ -168,6 +186,7 @@ public abstract class EGLDrawable extends GLDrawableImpl { } public int getWidth() { + int[] tmp = new int[1]; if (!EGL.eglQuerySurface(eglDisplay, eglSurface, EGL.EGL_WIDTH, tmp, 0)) { throw new GLException("Error querying surface width"); } @@ -175,6 +194,7 @@ public abstract class EGLDrawable extends GLDrawableImpl { } public int getHeight() { + int[] tmp = new int[1]; if (!EGL.eglQuerySurface(eglDisplay, eglSurface, EGL.EGL_HEIGHT, tmp, 0)) { throw new GLException("Error querying surface height"); } diff --git a/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfiguration.java index 4f04bb57a..08fbae5bc 100644 --- a/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfiguration.java +++ b/src/jogl/classes/com/sun/opengl/impl/egl/EGLGraphicsConfiguration.java @@ -37,6 +37,7 @@ package com.sun.opengl.impl.egl; import java.util.*; import javax.media.nativewindow.*; +import javax.media.nativewindow.egl.*; import javax.media.opengl.*; import com.sun.opengl.impl.*; import com.sun.gluegen.runtime.NativeLibrary; @@ -52,15 +53,29 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple return configID; } - public EGLGraphicsConfiguration(AbstractGraphicsScreen screen, + public EGLGraphicsConfiguration(AbstractGraphicsScreen absScreen, GLCapabilities capsChosen, GLCapabilities capsRequested, GLCapabilitiesChooser chooser, _EGLConfig cfg, int cfgID) { - super(screen, capsChosen, capsRequested); + super(absScreen, capsChosen, capsRequested); this.chooser = chooser; _config = cfg; configID = cfgID; } + public static EGLGraphicsConfiguration create(GLProfile glp, AbstractGraphicsScreen absScreen, int cfgID) { + AbstractGraphicsDevice absDevice = absScreen.getDevice(); + if(null==absDevice || !(absDevice instanceof EGLGraphicsDevice)) { + throw new GLException("GraphicsDevice must be a valid EGLGraphicsDevice"); + } + long dpy = absDevice.getHandle(); + if (dpy == EGL.EGL_NO_DISPLAY) { + throw new GLException("Invalid EGL display: "+absDevice); + } + _EGLConfig _cfg = EGLConfigId2EGLConfig(glp, dpy, cfgID); + GLCapabilities caps = EGLConfig2Capabilities(glp, dpy, _cfg); + return new EGLGraphicsConfiguration(absScreen, caps, caps, new DefaultGLCapabilitiesChooser(), _cfg, cfgID); + } + public Object clone() { return super.clone(); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java index fd6eb458e..cbd485649 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java @@ -80,7 +80,7 @@ public abstract class NativeWindowFactory { } private static String _getNativeWindowingType(String osNameLowerCase) { - if (osNameLowerCase.startsWith("kd") || osNameLowerCase.startsWith("linux")) { + if (osNameLowerCase.startsWith("kd")) { return TYPE_EGL; } else if (osNameLowerCase.startsWith("wind")) { return TYPE_WINDOWS; @@ -101,8 +101,6 @@ public abstract class NativeWindowFactory { AccessControlContext acc = AccessController.getContext(); nativeOSNamePure = Debug.getProperty("os.name", false, acc); nativeOSNameCustom = Debug.getProperty("nativewindow.ws.name", true, acc); - System.out.println(nativeOSNamePure); - System.out.println(nativeOSNameCustom); if(null==nativeOSNameCustom||nativeOSNameCustom.length()==0) { nativeOSNameCustom = nativeOSNamePure; } diff --git a/src/newt/classes/com/sun/javafx/newt/Display.java b/src/newt/classes/com/sun/javafx/newt/Display.java index bdac08dab..04fdb0181 100755 --- a/src/newt/classes/com/sun/javafx/newt/Display.java +++ b/src/newt/classes/com/sun/javafx/newt/Display.java @@ -45,16 +45,15 @@ public abstract class Display implements Runnable { { Class displayClass = null; if (NativeWindowFactory.TYPE_EGL.equals(type)) { - // displayClass = Class.forName("com.sun.javafx.newt.opengl.kd.KDDisplay"); - displayClass = Class.forName("com.sun.javafx.newt.opengl.egl.EGLDisplay"); + displayClass = Class.forName("com.sun.javafx.newt.opengl.kd.KDDisplay"); } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) { displayClass = Class.forName("com.sun.javafx.newt.windows.WindowsDisplay"); } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) { displayClass = Class.forName("com.sun.javafx.newt.macosx.MacDisplay"); } else if (NativeWindowFactory.TYPE_X11.equals(type)) { displayClass = Class.forName("com.sun.javafx.newt.x11.X11Display"); - } else if (NativeWindowFactory.TYPE_AWT.equals(type)) { - displayClass = Class.forName("com.sun.javafx.newt.awt.AWTDisplay"); + } else if (NewtFactory.TYPE_BROADCOM_EGL.equals(type)) { + displayClass = Class.forName("com.sun.javafx.newt.opengl.broadcom.BCEGLDisplay"); } else { throw new RuntimeException("Unknown display type \"" + type + "\""); } diff --git a/src/newt/classes/com/sun/javafx/newt/NewtFactory.java b/src/newt/classes/com/sun/javafx/newt/NewtFactory.java index b88e1e49e..dbae30a4b 100755 --- a/src/newt/classes/com/sun/javafx/newt/NewtFactory.java +++ b/src/newt/classes/com/sun/javafx/newt/NewtFactory.java @@ -39,6 +39,8 @@ import java.util.Iterator; import com.sun.nativewindow.impl.jvm.JVMUtil; public abstract class NewtFactory { + public static final String TYPE_BROADCOM_EGL = "BroadcomEGL"; + // Work-around for initialization order problems on Mac OS X // between native Newt and (apparently) Fmod static { @@ -50,7 +52,6 @@ public abstract class NewtFactory { * Create a Display entity, incl native creation */ public static Display createDisplay(String name) { - System.out.println("NewtFactory: NAME: " + name); return Display.create(NativeWindowFactory.getNativeWindowType(true), name); } @@ -58,8 +59,6 @@ public abstract class NewtFactory { * Create a Display entity using the given implementation type, incl native creation */ public static Display createDisplay(String type, String name) { - System.out.println("NewtFactory: TYPE: " + type); - System.out.println("NewtFactory: NAME: " + name); return Display.create(type, name); } diff --git a/src/newt/classes/com/sun/javafx/newt/Screen.java b/src/newt/classes/com/sun/javafx/newt/Screen.java index 2566041a8..57ed34211 100755 --- a/src/newt/classes/com/sun/javafx/newt/Screen.java +++ b/src/newt/classes/com/sun/javafx/newt/Screen.java @@ -54,6 +54,8 @@ public abstract class Screen { screenClass = Class.forName("com.sun.javafx.newt.x11.X11Screen"); } else if (NativeWindowFactory.TYPE_AWT.equals(type)) { screenClass = Class.forName("com.sun.javafx.newt.awt.AWTScreen"); + } else if (NewtFactory.TYPE_BROADCOM_EGL.equals(type)) { + screenClass = Class.forName("com.sun.javafx.newt.opengl.broadcom.BCEGLScreen"); } else { throw new RuntimeException("Unknown window type \"" + type + "\""); } diff --git a/src/newt/classes/com/sun/javafx/newt/Window.java b/src/newt/classes/com/sun/javafx/newt/Window.java index 36eafd32d..a1168d12d 100755 --- a/src/newt/classes/com/sun/javafx/newt/Window.java +++ b/src/newt/classes/com/sun/javafx/newt/Window.java @@ -74,6 +74,8 @@ public abstract class Window implements NativeWindow windowClass = Class.forName("com.sun.javafx.newt.x11.X11Window"); } else if (NativeWindowFactory.TYPE_AWT.equals(type)) { windowClass = Class.forName("com.sun.javafx.newt.awt.AWTWindow"); + } else if (NewtFactory.TYPE_BROADCOM_EGL.equals(type)) { + windowClass = Class.forName("com.sun.javafx.newt.opengl.broadcom.BCEGLWindow"); } else { throw new NativeWindowException("Unknown window type \"" + type + "\""); } diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLDisplay.java b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLDisplay.java new file mode 100644 index 000000000..abf9859c5 --- /dev/null +++ b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLDisplay.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any kind. ALL + * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, + * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN + * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR + * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR + * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR + * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR + * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE + * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, + * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF + * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + * + */ + +package com.sun.javafx.newt.opengl.broadcom; + +import com.sun.javafx.newt.*; +import com.sun.javafx.newt.impl.*; +import com.sun.opengl.impl.egl.*; +import javax.media.nativewindow.*; +import javax.media.nativewindow.egl.*; + +public class BCEGLDisplay extends Display { + + static { + NativeLibLoader.loadNEWT(); + + if (!BCEGLWindow.initIDs()) { + throw new NativeWindowException("Failed to initialize BCEGLWindow jmethodIDs"); + } + } + + public static void initSingleton() { + // just exist to ensure static init has been run + } + + + public BCEGLDisplay() { + } + + protected void createNative() { + long handle = CreateDisplay(BCEGLScreen.fixedWidth, BCEGLScreen.fixedHeight); + if (handle == EGL.EGL_NO_DISPLAY) { + throw new NativeWindowException("BC EGL CreateDisplay failed"); + } + aDevice = new EGLGraphicsDevice(handle); + } + + protected void closeNative() { + if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) { + DestroyDisplay(aDevice.getHandle()); + } + } + + protected void dispatchMessages() { + DispatchMessages(); + } + + private native long CreateDisplay(int width, int height); + private native void DestroyDisplay(long dpy); + private native void DispatchMessages(); +} + diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLScreen.java b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLScreen.java new file mode 100755 index 000000000..165081cde --- /dev/null +++ b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLScreen.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any kind. ALL + * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, + * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN + * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR + * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR + * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR + * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR + * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE + * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, + * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF + * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + * + */ + +package com.sun.javafx.newt.opengl.broadcom; + +import com.sun.javafx.newt.*; +import com.sun.javafx.newt.impl.*; +import javax.media.nativewindow.*; + +public class BCEGLScreen extends Screen { + + static { + BCEGLDisplay.initSingleton(); + } + + + public BCEGLScreen() { + } + + protected void createNative(int index) { + aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), index); + setScreenSize(fixedWidth, fixedHeight); + } + + protected void closeNative() { } + + //---------------------------------------------------------------------- + // Internals only + // + + static final int fixedWidth = 1920; + static final int fixedHeight = 1080; +} + diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java new file mode 100755 index 000000000..a91a91598 --- /dev/null +++ b/src/newt/classes/com/sun/javafx/newt/opengl/broadcom/BCEGLWindow.java @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any kind. ALL + * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, + * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN + * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR + * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR + * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR + * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR + * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE + * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, + * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF + * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + * + */ + +package com.sun.javafx.newt.opengl.broadcom; + +import com.sun.javafx.newt.*; +import com.sun.javafx.newt.impl.*; +import com.sun.opengl.impl.egl.*; +import javax.media.nativewindow.*; +import javax.media.opengl.GLCapabilities; +import javax.media.opengl.GLProfile; +import javax.media.nativewindow.NativeWindowException; + +public class BCEGLWindow extends Window { + static { + BCEGLDisplay.initSingleton(); + } + + public BCEGLWindow() { + } + + protected void createNative(Capabilities caps) { + // just save the GLProfile here, create window later .. + glProfile = ((GLCapabilities)caps).getGLProfile(); + } + + protected void closeNative() { + if(0!=windowHandleClose) { + CloseWindow(getDisplayHandle(), windowHandleClose); + } + } + + public void setVisible(boolean visible) { + if(this.visible!=visible) { + this.visible=visible; + if ( 0==windowHandle ) { + windowHandle = realizeWindow(true, width, height); + if (0 == windowHandle) { + throw new NativeWindowException("Error native Window Handle is null"); + } + } + clearEventMask(); + } + } + + public void setSize(int width, int height) { + if(0!=windowHandle) { + // n/a in BroadcomEGL + System.err.println("setSize n/a in BroadcomEGL with realized window"); + } else { + this.width = width; + this.height = height; + } + } + + public void setPosition(int x, int y) { + // n/a in BroadcomEGL + System.err.println("setPosition n/a in BroadcomEGL"); + } + + public boolean setFullscreen(boolean fullscreen) { + // n/a in BroadcomEGL + System.err.println("setFullscreen n/a in BroadcomEGL"); + return false; + } + + //---------------------------------------------------------------------- + // Internals only + // + + protected static native boolean initIDs(); + private native long CreateWindow(long eglDisplayHandle, boolean chromaKey, int width, int height); + private native void CloseWindow(long eglDisplayHandle, long eglWindowHandle); + + + private long realizeWindow(boolean chromaKey, int width, int height) { + long handle = CreateWindow(getDisplayHandle(), chromaKey, width, height); + if (0 == handle) { + throw new NativeWindowException("Error native Window Handle is null"); + } + windowHandleClose = handle; + return handle; + } + + private void windowCreated(int cfgID, int width, int height) { + this.width = width; + this.height = height; + config = EGLGraphicsConfiguration.create(glProfile, screen.getGraphicsScreen(), cfgID); + if (config == null) { + throw new NativeWindowException("Error creating EGLGraphicsConfiguration from id: "+cfgID+", "+this); + } + } + + private long windowHandleClose; + private GLProfile glProfile; +} diff --git a/src/newt/classes/com/sun/javafx/newt/opengl/egl/EGLDisplay.java b/src/newt/classes/com/sun/javafx/newt/opengl/egl/EGLDisplay.java deleted file mode 100644 index bebb7ccf2..000000000 --- a/src/newt/classes/com/sun/javafx/newt/opengl/egl/EGLDisplay.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * - Redistribution of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistribution in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * Neither the name of Sun Microsystems, Inc. or the names of - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * This software is provided "AS IS," without a warranty of any kind. ALL - * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, - * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN - * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR - * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR - * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR - * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR - * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE - * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, - * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF - * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - * - */ - -package com.sun.javafx.newt.opengl.egl; - -import com.sun.javafx.newt.*; -import com.sun.javafx.newt.impl.*; -import com.sun.opengl.impl.egl.*; -import javax.media.nativewindow.*; -import javax.media.nativewindow.egl.*; - -public class EGLDisplay extends Display { - - static { - NativeLibLoader.loadNEWT(); - - System.loadLibrary("EglUtil"); - } - - public static void initSingleton() { - // just exist to ensure static init has been run - } - - - public EGLDisplay() { - } - - protected void createNative() { - try { - int windowWidth = 1920, windowHeight = 1080; - int width[] = { windowWidth }; - int height[] = { windowHeight }; - long eglDisplayHandle = - EGL.EGLUtil_CreateDisplayByNative(windowWidth, windowHeight); - long eglSurfaceHandle = - EGL.EGLUtil_CreateWindowByNative(eglDisplayHandle, 1, - width, 0, height, 0); - } catch (Throwable th) { - th.printStackTrace(); - } - } - - protected void closeNative() { - if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) { - EGL.eglTerminate(aDevice.getHandle()); - } - } - - protected void dispatchMessages() { - DispatchMessages(); - } - - private native void DispatchMessages(); -} - diff --git a/src/newt/native/BroadcomEGL.c b/src/newt/native/BroadcomEGL.c new file mode 100755 index 000000000..8afa71a47 --- /dev/null +++ b/src/newt/native/BroadcomEGL.c @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistribution of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistribution in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * Neither the name of Sun Microsystems, Inc. or the names of + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any kind. ALL + * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, + * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN + * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR + * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR + * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR + * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR + * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE + * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, + * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF + * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + * + */ + +#ifdef _WIN32 + #include +#else + #include +#endif + +#include +#include +#include + +#include "com_sun_javafx_newt_opengl_broadcom_BCEGLWindow.h" + +#include "EventListener.h" +#include "MouseEvent.h" +#include "KeyEvent.h" + +#include + +typedef unsigned int GLuint; + +EGLDisplay EGLUtil_CreateDisplay( GLuint uiWidth, GLuint uiHeight ); +void EGLUtil_DestroyDisplay( EGLDisplay eglDisplay ); + +EGLSurface EGLUtil_CreateWindow( EGLDisplay eglDisplay, /* bool */ GLuint bChromakey, GLuint *puiWidth, GLuint *puiHeight ); +void EGLUtil_DestroyWindow( EGLDisplay eglDisplay, EGLSurface eglSurface ); +void EGLUtil_SwapWindow( EGLDisplay eglDisplay, EGLSurface eglSurface ); + +#define VERBOSE_ON 1 + +#ifdef VERBOSE_ON + #define DBG_PRINT(...) fprintf(stdout, __VA_ARGS__) +#else + #define DBG_PRINT(...) +#endif + +static jmethodID windowCreatedID = NULL; + +/** + * Display + */ + +JNIEXPORT void JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLDisplay_DispatchMessages + (JNIEnv *env, jobject obj) +{ + // FIXME: n/a + (void) env; + (void) obj; +} + +JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLDisplay_CreateDisplay + (JNIEnv *env, jobject obj, jint width, jint height) +{ + (void) env; + (void) obj; + EGLDisplay dpy = EGLUtil_CreateDisplay( (GLuint) width, (GLuint) height ); + if(NULL==dpy) { + fprintf(stderr, "[CreateDisplay] failed: NULL\n"); + } else { + DBG_PRINT( "[CreateDisplay] ok: %p, %ux%u\n", dpy, width, height); + } + return (jlong) (intptr_t) dpy; +} + +JNIEXPORT void JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLDisplay_DestroyDisplay + (JNIEnv *env, jobject obj, jlong display) +{ + EGLDisplay dpy = (EGLDisplay)(intptr_t)display; + (void) env; + (void) obj; + EGLUtil_DestroyDisplay(dpy); +} + +/** + * Window + */ + +JNIEXPORT jboolean JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLWindow_initIDs + (JNIEnv *env, jclass clazz) +{ + windowCreatedID = (*env)->GetMethodID(env, clazz, "windowCreated", "(III)V"); + if (windowCreatedID == NULL) { + DBG_PRINT( "initIDs failed\n" ); + return JNI_FALSE; + } + DBG_PRINT( "initIDs ok\n" ); + return JNI_TRUE; +} + +JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLWindow_CreateWindow + (JNIEnv *env, jobject obj, jlong display, jboolean chromaKey, jint width, jint height) +{ + EGLDisplay dpy = (EGLDisplay)(intptr_t)display; + EGLSurface window = 0; + GLuint uiWidth=(GLuint)width, uiHeight=(GLuint)height; + + if(dpy==NULL) { + fprintf(stderr, "[RealizeWindow] invalid display connection..\n"); + return 0; + } + + window = EGLUtil_CreateWindow( dpy, chromaKey, &uiWidth, &uiHeight ); + // EGLUtil_DestroyWindow( dpy, window ); + + if(NULL==window) { + fprintf(stderr, "[RealizeWindow.Create] failed: NULL\n"); + return 0; + } + EGLint cfgID=0; + if(EGL_FALSE==eglQuerySurface(dpy, window, EGL_CONFIG_ID, &cfgID)) { + fprintf(stderr, "[RealizeWindow.ConfigID] failed: window %p\n", window); + EGLUtil_DestroyWindow(dpy, window); + return 0; + } + (*env)->CallVoidMethod(env, obj, windowCreatedID, (jint) cfgID, (jint)uiWidth, (jint)uiHeight); + DBG_PRINT( "[RealizeWindow.Create] ok: %p, cfgid %d, %ux%u\n", window, cfgID, uiWidth, uiHeight); + + // release and destroy already made context .. + EGLContext ctx = eglGetCurrentContext(); + eglMakeCurrent(dpy, + EGL_NO_SURFACE, + EGL_NO_SURFACE, + EGL_NO_CONTEXT); + eglDestroyContext(dpy, ctx); + + return (jlong) (intptr_t) window; +} + +JNIEXPORT void JNICALL Java_com_sun_javafx_newt_opengl_broadcom_BCEGLWindow_CloseWindow + (JNIEnv *env, jobject obj, jlong display, jlong window) +{ + EGLDisplay dpy = (EGLDisplay)(intptr_t)display; + EGLSurface surf = (EGLSurface) (intptr_t) window; + EGLUtil_DestroyWindow(dpy, surf); + + DBG_PRINT( "[CloseWindow]\n"); +} + diff --git a/src/newt/native/KDWindow.c b/src/newt/native/KDWindow.c index 8e57237b3..6c7aa7731 100755 --- a/src/newt/native/KDWindow.c +++ b/src/newt/native/KDWindow.c @@ -103,7 +103,7 @@ static jmethodID sendKeyEventID = NULL; * Display */ -JNIEXPORT void JNICALL Java_com_sun_javafx_newt_kd_KDDisplay_DispatchMessages +JNIEXPORT void JNICALL Java_com_sun_javafx_newt_opengl_kd_KDDisplay_DispatchMessages (JNIEnv *env, jobject obj) { const KDEvent * evt; @@ -200,7 +200,7 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_newt_kd_KDDisplay_DispatchMessages * Window */ -JNIEXPORT jboolean JNICALL Java_com_sun_javafx_newt_kd_KDWindow_initIDs +JNIEXPORT jboolean JNICALL Java_com_sun_javafx_newt_opengl_kd_KDWindow_initIDs (JNIEnv *env, jclass clazz) { #ifdef VERBOSE_ON @@ -228,7 +228,7 @@ JNIEXPORT jboolean JNICALL Java_com_sun_javafx_newt_kd_KDWindow_initIDs return JNI_TRUE; } -JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_kd_KDWindow_CreateWindow +JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_opengl_kd_KDWindow_CreateWindow (JNIEnv *env, jobject obj, jlong display, jintArray jAttrs) { jint * attrs = NULL; @@ -270,7 +270,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_kd_KDWindow_CreateWindow return (jlong) (intptr_t) window; } -JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_kd_KDWindow_RealizeWindow +JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_opengl_kd_KDWindow_RealizeWindow (JNIEnv *env, jobject obj, jlong window) { KDWindow *w = (KDWindow*) (intptr_t) window; @@ -285,7 +285,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_newt_kd_KDWindow_RealizeWindow return (jlong) (intptr_t) nativeWindow; } -JNIEXPORT jint JNICALL Java_com_sun_javafx_newt_kd_KDWindow_CloseWindow +JNIEXPORT jint JNICALL Java_com_sun_javafx_newt_opengl_kd_KDWindow_CloseWindow (JNIEnv *env, jobject obj, jlong window, jlong juserData) { KDWindow *w = (KDWindow*) (intptr_t) window; @@ -299,11 +299,11 @@ JNIEXPORT jint JNICALL Java_com_sun_javafx_newt_kd_KDWindow_CloseWindow } /* - * Class: com_sun_javafx_newt_kd_KDWindow + * Class: com_sun_javafx_newt_opengl_kd_KDWindow * Method: setVisible0 * Signature: (JJZ)V */ -JNIEXPORT void JNICALL Java_com_sun_javafx_newt_kd_KDWindow_setVisible0 +JNIEXPORT void JNICALL Java_com_sun_javafx_newt_opengl_kd_KDWindow_setVisible0 (JNIEnv *env, jobject obj, jlong window, jboolean visible) { KDWindow *w = (KDWindow*) (intptr_t) window; @@ -312,7 +312,7 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_newt_kd_KDWindow_setVisible0 DBG_PRINT( "[setVisible] v=%d\n", visible); } -JNIEXPORT void JNICALL Java_com_sun_javafx_newt_kd_KDWindow_setFullScreen0 +JNIEXPORT void JNICALL Java_com_sun_javafx_newt_opengl_kd_KDWindow_setFullScreen0 (JNIEnv *env, jobject obj, jlong window, jboolean fullscreen) { KDWindow *w = (KDWindow*) (intptr_t) window; @@ -323,7 +323,7 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_newt_kd_KDWindow_setFullScreen0 (void)res; } -JNIEXPORT void JNICALL Java_com_sun_javafx_newt_kd_KDWindow_setSize0 +JNIEXPORT void JNICALL Java_com_sun_javafx_newt_opengl_kd_KDWindow_setSize0 (JNIEnv *env, jobject obj, jlong window, jint width, jint height) { KDWindow *w = (KDWindow*) (intptr_t) window; -- cgit v1.2.3