From a74f1100b11eb3a6944a73eea48bf17d14ede8c1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 13 Mar 2009 11:55:23 +0000 Subject: New package Native Window Interface 'java.media.nwi', to loose JOGL dependencies for the moved interfaces, mainly NativeWindow. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1863 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/opengl/impl/GLDrawableImpl.java | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/classes/com/sun/opengl/impl/GLDrawableImpl.java') diff --git a/src/classes/com/sun/opengl/impl/GLDrawableImpl.java b/src/classes/com/sun/opengl/impl/GLDrawableImpl.java index 0818ac1c4..46c79cf2b 100644 --- a/src/classes/com/sun/opengl/impl/GLDrawableImpl.java +++ b/src/classes/com/sun/opengl/impl/GLDrawableImpl.java @@ -39,19 +39,20 @@ package com.sun.opengl.impl; +import javax.media.nwi.*; import javax.media.opengl.*; public abstract class GLDrawableImpl implements GLDrawable { - private GLCapabilities requestedCapabilities; + private NWCapabilities requestedCapabilities; protected GLDrawableImpl(GLDrawableFactory factory, NativeWindow comp, - GLCapabilities requestedCapabilities, + NWCapabilities requestedCapabilities, boolean realized) { this.factory = factory; this.component = comp; this.requestedCapabilities = - (requestedCapabilities == null) ? null : (GLCapabilities) requestedCapabilities.clone(); + (requestedCapabilities == null) ? null : (NWCapabilities) requestedCapabilities.clone(); this.realized = realized; } @@ -72,20 +73,20 @@ public abstract class GLDrawableImpl implements GLDrawable { return GLContextImpl.toHexString(hex); } - protected GLCapabilities getRequestedGLCapabilities() { + protected NWCapabilities getRequestedNWCapabilities() { return requestedCapabilities; } - public GLCapabilities getChosenGLCapabilities() { + public NWCapabilities getChosenNWCapabilities() { if (chosenCapabilities == null) return null; // Must return a new copy to avoid mutation by end user - return (GLCapabilities) chosenCapabilities.clone(); + return (NWCapabilities) chosenCapabilities.clone(); } - protected void setChosenGLCapabilities(GLCapabilities caps) { - chosenCapabilities = (caps==null) ? null : (GLCapabilities) caps.clone(); + protected void setChosenNWCapabilities(NWCapabilities caps) { + chosenCapabilities = (caps==null) ? null : (NWCapabilities) caps.clone(); } public NativeWindow getNativeWindow() { @@ -99,7 +100,7 @@ public abstract class GLDrawableImpl implements GLDrawable { public void setRealized(boolean realized) { this.realized = realized; if(!realized) { - setChosenGLCapabilities(null); + setChosenNWCapabilities(null); component.invalidate(); } } @@ -140,7 +141,7 @@ public abstract class GLDrawableImpl implements GLDrawable { protected GLDrawableFactory factory; protected NativeWindow component; - private GLCapabilities chosenCapabilities; + private NWCapabilities chosenCapabilities; // Indicates whether the component (if an onscreen context) has been // realized. Plausibly, before the component is realized the JAWT -- cgit v1.2.3