diff options
author | Sven Gothel <[email protected]> | 2008-06-01 08:17:55 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-06-01 08:17:55 +0000 |
commit | 806564c9599510db2bb0e2d0e441ca6ad8068aa0 (patch) | |
tree | 1e3c4e827f9f9b64f70af277218728cb107b485e /src/classes/com/sun/opengl/impl/egl/EGLDrawable.java | |
parent | 31d1dd9cd0b0d1b5a0dd7ac61dfe88ee214364a8 (diff) |
Refactoring JOGL to partition core windowing, AWT, GL, ES1 and ES2 .. WIP
Compile Clean: X11, noAWT, ES1, no *.impl.x11/win/macosx
See jogl/make/build.xml for new build properties.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1654 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl/egl/EGLDrawable.java')
-rwxr-xr-x | src/classes/com/sun/opengl/impl/egl/EGLDrawable.java | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java index 8ac790157..0227ba32f 100755 --- a/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java +++ b/src/classes/com/sun/opengl/impl/egl/EGLDrawable.java @@ -35,12 +35,11 @@ package com.sun.opengl.impl.egl; +import com.sun.opengl.impl.GLDrawableImpl; + import javax.media.opengl.*; -public class EGLDrawable implements GLDrawable { - private long windowHandle; - private long screenHandle; - private long displayHandle; +public class EGLDrawable extends GLDrawableImpl { private long display; private GLCapabilities capabilities; private GLCapabilitiesChooser chooser; @@ -48,21 +47,16 @@ public class EGLDrawable implements GLDrawable { private long surface; private int[] tmp = new int[1]; - public EGLDrawable(long displayHandle, - long screenHandle, - long windowHandle, + public EGLDrawable(EGLDrawableFactory factory, + NativeWindow component, GLCapabilities capabilities, GLCapabilitiesChooser chooser) throws GLException { - this.displayHandle = displayHandle; - this.screenHandle = screenHandle; - this.windowHandle = windowHandle; + this.factory = factory; + this.component = component; this.capabilities = capabilities; this.chooser = chooser; - // Set things up - EGLDrawableFactory factory = (EGLDrawableFactory) GLDrawableFactory.getFactory(); - - display = EGL.eglGetDisplay((displayHandle>0)?displayHandle:EGL.EGL_DEFAULT_DISPLAY); + display = EGL.eglGetDisplay((component.getDisplayHandle()>0)?component.getDisplayHandle():EGL.EGL_DEFAULT_DISPLAY); if (display == EGL.EGL_NO_DISPLAY) { throw new GLException("eglGetDisplay failed"); } @@ -108,7 +102,7 @@ public class EGLDrawable implements GLDrawable { public void setRealized(boolean realized) { if (realized) { // Create the window surface - surface = EGL.eglCreateWindowSurface(display, config, windowHandle, null); + surface = EGL.eglCreateWindowSurface(display, config, component.getWindowHandle(), null); if (surface == EGL.EGL_NO_SURFACE) { throw new GLException("Creation of window surface (eglCreateWindowSurface) failed"); } @@ -153,9 +147,9 @@ public class EGLDrawable implements GLDrawable { } public String toString() { - return "EGLDrawable[ displayHandle " + displayHandle + - ", screenHandle "+ screenHandle + - ", windowHandle "+ windowHandle + + return "EGLDrawable[ displayHandle " + component.getDisplayHandle() + + ", screenHandle "+ component.getScreenHandle() + + ", windowHandle "+ component.getWindowHandle() + ", display " + display + ", config " + config + ", surface " + surface + |