aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun')
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/windows/WindowsWindow.java2
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/x11/X11Display.java2
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/x11/X11Screen.java2
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/x11/X11Window.java2
-rw-r--r--src/classes/com/sun/opengl/impl/NativeLibLoader.java31
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java13
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java2
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java2
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java2
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/awt/X11AWTGLXDrawableFactory.java2
10 files changed, 46 insertions, 14 deletions
diff --git a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
index eda64cc20..7393326d3 100755
--- a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
+++ b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
@@ -40,7 +40,7 @@ public class WindowsWindow extends Window {
private static final String WINDOW_CLASS_NAME = "NewtWindow";
static {
- NativeLibLoader.loadCore();
+ NativeLibLoader.loadNEWT();
if (!initIDs()) {
throw new RuntimeException("Failed to initialize jmethodIDs");
diff --git a/src/classes/com/sun/javafx/newt/x11/X11Display.java b/src/classes/com/sun/javafx/newt/x11/X11Display.java
index 00df325c6..7f921739b 100755
--- a/src/classes/com/sun/javafx/newt/x11/X11Display.java
+++ b/src/classes/com/sun/javafx/newt/x11/X11Display.java
@@ -38,7 +38,7 @@ import com.sun.opengl.impl.*;
public class X11Display extends Display {
static {
- NativeLibLoader.loadCore();
+ NativeLibLoader.loadNEWT();
}
public X11Display() {
diff --git a/src/classes/com/sun/javafx/newt/x11/X11Screen.java b/src/classes/com/sun/javafx/newt/x11/X11Screen.java
index 4094c557c..5920d4997 100755
--- a/src/classes/com/sun/javafx/newt/x11/X11Screen.java
+++ b/src/classes/com/sun/javafx/newt/x11/X11Screen.java
@@ -38,7 +38,7 @@ import com.sun.opengl.impl.*;
public class X11Screen extends Screen {
static {
- NativeLibLoader.loadCore();
+ NativeLibLoader.loadNEWT();
}
public X11Screen() {
diff --git a/src/classes/com/sun/javafx/newt/x11/X11Window.java b/src/classes/com/sun/javafx/newt/x11/X11Window.java
index 63e558bbc..299b78429 100755
--- a/src/classes/com/sun/javafx/newt/x11/X11Window.java
+++ b/src/classes/com/sun/javafx/newt/x11/X11Window.java
@@ -42,7 +42,7 @@ public class X11Window extends Window {
private int nfs_width, nfs_height, nfs_x, nfs_y;
static {
- NativeLibLoader.loadCore();
+ NativeLibLoader.loadNEWT();
if (!initIDs()) {
throw new RuntimeException("Failed to initialize jmethodIDs");
diff --git a/src/classes/com/sun/opengl/impl/NativeLibLoader.java b/src/classes/com/sun/opengl/impl/NativeLibLoader.java
index 4fe59b003..6a1270ac2 100644
--- a/src/classes/com/sun/opengl/impl/NativeLibLoader.java
+++ b/src/classes/com/sun/opengl/impl/NativeLibLoader.java
@@ -106,10 +106,37 @@ public class NativeLibLoader {
}
}
- public static void loadCore() {
+ public static void loadNEWT() {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
- loadLibrary("jogl", null, false, false);
+ loadLibrary("newt", null, false, false);
+ return null;
+ }
+ });
+ }
+
+ public static void loadGL2() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("jogl_gl2", null, false, false);
+ return null;
+ }
+ });
+ }
+
+ public static void loadES2() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("jogl_es2", null, false, false);
+ return null;
+ }
+ });
+ }
+
+ public static void loadES1() {
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ loadLibrary("jogl_es1", null, false, false);
return null;
}
});
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
index a796aa01c..9ba2a0c40 100755
--- a/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawableFactory.java
@@ -41,9 +41,6 @@ import com.sun.opengl.impl.*;
import com.sun.gluegen.runtime.NativeLibrary;
public class EGLDrawableFactory extends GLDrawableFactoryImpl {
- static {
- NativeLibLoader.loadCore();
- }
// We need more than one of these on certain devices (the NVidia APX 2500 in particular)
private List/*<NativeLibrary>*/ glesLibraries;
@@ -70,9 +67,11 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
if (GLProfile.isGLES2()) {
glesLibNames.add("libGLESv2_CM");
glesLibNames.add("GLESv2_CM");
- } else {
+ } else if (GLProfile.isGLES1()) {
glesLibNames.add("libGLESv1_CM");
glesLibNames.add("GLESv1_CM");
+ } else {
+ throw new GLException("Invalid GL Profile for EGL: "+GLProfile.getProfile());
}
ClassLoader loader = getClass().getClassLoader();
@@ -94,6 +93,12 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
libs.add(eglLib);
}
glesLibraries = libs;
+
+ if (GLProfile.isGLES2()) {
+ NativeLibLoader.loadES2();
+ } else if (GLProfile.isGLES1()) {
+ NativeLibLoader.loadES1();
+ }
}
public AbstractGraphicsConfiguration chooseGraphicsConfiguration(GLCapabilities capabilities,
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
index ae108121c..04c9df103 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -47,7 +47,7 @@ import com.sun.opengl.impl.*;
public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
static {
- NativeLibLoader.loadCore();
+ NativeLibLoader.loadGL2();
}
public MacOSXCGLDrawableFactory() {
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
index fd4e5620c..4e162f57d 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -54,7 +54,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
private long hglu32;
static {
- NativeLibLoader.loadCore();
+ NativeLibLoader.loadGL2();
}
public WindowsWGLDrawableFactory() {
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
index ed48f9186..dd5e69dcd 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXDrawableFactory.java
@@ -88,7 +88,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
// See DRIHack.java for an explanation of why this is necessary
DRIHack.begin();
- com.sun.opengl.impl.NativeLibLoader.loadCore();
+ com.sun.opengl.impl.NativeLibLoader.loadGL2();
DRIHack.end();
}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/awt/X11AWTGLXDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/glx/awt/X11AWTGLXDrawableFactory.java
index d969f18aa..a6f545b87 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/awt/X11AWTGLXDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/awt/X11AWTGLXDrawableFactory.java
@@ -58,7 +58,7 @@ public class X11AWTGLXDrawableFactory extends X11GLXDrawableFactory {
// See DRIHack.java for an explanation of why this is necessary
DRIHack.begin();
- com.sun.opengl.impl.NativeLibLoader.loadCore();
+ com.sun.opengl.impl.NativeLibLoader.loadGL2();
DRIHack.end();
}