|
25 | 25 |
|
26 | 26 | package sun.java2d.opengl;
|
27 | 27 |
|
28 |
| -import java.awt.Graphics; |
29 | 28 | import java.awt.GraphicsConfiguration;
|
30 | 29 | import java.awt.GraphicsDevice;
|
31 | 30 | import java.awt.GraphicsEnvironment;
|
32 | 31 | import java.awt.Image;
|
33 | 32 | import java.awt.Rectangle;
|
34 | 33 | import java.awt.image.ColorModel;
|
35 | 34 |
|
36 |
| -import sun.java2d.SunGraphics2D; |
37 | 35 | import sun.java2d.SurfaceData;
|
38 |
| - |
39 | 36 | import sun.lwawt.macosx.CPlatformView;
|
40 | 37 |
|
41 | 38 | public abstract class CGLSurfaceData extends OGLSurfaceData {
|
@@ -342,43 +339,4 @@ public Object getDestination() {
|
342 | 339 | return offscreenImage;
|
343 | 340 | }
|
344 | 341 | }
|
345 |
| - |
346 |
| - // Mac OS X specific APIs for JOGL/Java2D bridge... |
347 |
| - |
348 |
| - // given a surface create and attach GL context, then return it |
349 |
| - private static native long createCGLContextOnSurface(CGLSurfaceData sd, |
350 |
| - long sharedContext); |
351 |
| - |
352 |
| - public static long createOGLContextOnSurface(Graphics g, long sharedContext) { |
353 |
| - SurfaceData sd = ((SunGraphics2D) g).surfaceData; |
354 |
| - if ((sd instanceof CGLSurfaceData) == true) { |
355 |
| - CGLSurfaceData cglsd = (CGLSurfaceData) sd; |
356 |
| - return createCGLContextOnSurface(cglsd, sharedContext); |
357 |
| - } else { |
358 |
| - return 0L; |
359 |
| - } |
360 |
| - } |
361 |
| - |
362 |
| - // returns whether or not the makeCurrent operation succeeded |
363 |
| - static native boolean makeCGLContextCurrentOnSurface(CGLSurfaceData sd, |
364 |
| - long ctx); |
365 |
| - |
366 |
| - public static boolean makeOGLContextCurrentOnSurface(Graphics g, long ctx) { |
367 |
| - SurfaceData sd = ((SunGraphics2D) g).surfaceData; |
368 |
| - if ((ctx != 0L) && ((sd instanceof CGLSurfaceData) == true)) { |
369 |
| - CGLSurfaceData cglsd = (CGLSurfaceData) sd; |
370 |
| - return makeCGLContextCurrentOnSurface(cglsd, ctx); |
371 |
| - } else { |
372 |
| - return false; |
373 |
| - } |
374 |
| - } |
375 |
| - |
376 |
| - // additional cleanup |
377 |
| - private static native void destroyCGLContext(long ctx); |
378 |
| - |
379 |
| - public static void destroyOGLContext(long ctx) { |
380 |
| - if (ctx != 0L) { |
381 |
| - destroyCGLContext(ctx); |
382 |
| - } |
383 |
| - } |
384 | 342 | }
|
0 commit comments