aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-12-12 02:04:47 +0000
committerKenneth Russel <[email protected]>2008-12-12 02:04:47 +0000
commitea9e7fdda3b3142682029e746ddf8cf44aeed812 (patch)
tree7f31847de07e3e945410e79a5463d2d2686c5b5e /src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
parent98df81306243ff09b0a60229c34381c04b86a02f (diff)
Fixed breakage of GLJPanel caused by confusion between requested and
chosen GLCapabilities. Separated these out and refactored requested GLCapabilities into GLDrawableImpl superclass. Removed setChosenGLCapabilities from the public API and made it protected on GLDrawableImpl. Removed it from all public GLDrawable implementations such as GLCanvas and GLJPanel. Fixed bug in Gears demo where mouse listener was not being hooked up correctly. Tested so far on Windows; testing on other platforms to follow. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1815 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java')
-rw-r--r--src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
index 2e6d03e93..c8965e0db 100644
--- a/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLDrawable.java
@@ -56,10 +56,9 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
protected static final int MAX_ATTRIBS = 256;
public WindowsWGLDrawable(GLDrawableFactory factory, NativeWindow comp, boolean realized,
- GLCapabilities capabilities,
+ GLCapabilities requestedCapabilities,
GLCapabilitiesChooser chooser) {
- super(factory, comp, realized);
- setChosenGLCapabilities(capabilities);
+ super(factory, comp, requestedCapabilities, realized);
this.chooser = chooser;
}
@@ -105,7 +104,7 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
PIXELFORMATDESCRIPTOR pfd = null;
int pixelFormat = 0;
GLCapabilities chosenCaps = null;
- GLCapabilities capabilities = getCapabilities();
+ GLCapabilities capabilities = getRequestedGLCapabilities();
long hdc = getNativeWindow().getSurfaceHandle();
if (onscreen) {
if ((pixelFormat = WGL.GetPixelFormat(hdc)) != 0) {