aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax/media')
-rw-r--r--src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java1
-rw-r--r--src/jogl/classes/javax/media/opengl/GLAnimatorControl.java8
-rw-r--r--src/jogl/classes/javax/media/opengl/GLArrayData.java27
-rw-r--r--src/jogl/classes/javax/media/opengl/GLAutoDrawable.java6
-rw-r--r--src/jogl/classes/javax/media/opengl/GLBase.java27
-rw-r--r--src/jogl/classes/javax/media/opengl/GLCapabilities.java1
-rw-r--r--src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java1
-rw-r--r--src/jogl/classes/javax/media/opengl/GLContext.java1
-rw-r--r--src/jogl/classes/javax/media/opengl/GLDrawable.java15
-rw-r--r--src/jogl/classes/javax/media/opengl/GLDrawableFactory.java5
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java1
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLCanvas.java4
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java4
13 files changed, 80 insertions, 21 deletions
diff --git a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
index ee41c9161..dc6daa645 100644
--- a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
+++ b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2010 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java b/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java
index 13788fe53..3aba634a0 100644
--- a/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java
+++ b/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java
@@ -66,10 +66,7 @@ public interface GLAnimatorControl {
/**
- * @return Number of frames issued to all registered GLAutoDrawables registered
- */
- /**
- * @return Number of frame cycles displayed by all registered {@link javax.media.opengl.GLAutoDrawable}
+ * @return Number of frame cycles displayed
* since the first display call, ie <code>getStartTime()</code>.
* This value is reset if started or resumed.
*
@@ -78,6 +75,9 @@ public interface GLAnimatorControl {
*/
int getTotalFrames();
+ /** Reset all performance counter (startTime, currentTime, frame number) */
+ public void resetCounter();
+
/**
* Indicates whether this animator is currently running, ie started.
*
diff --git a/src/jogl/classes/javax/media/opengl/GLArrayData.java b/src/jogl/classes/javax/media/opengl/GLArrayData.java
index 088c71bd8..6c8122f27 100644
--- a/src/jogl/classes/javax/media/opengl/GLArrayData.java
+++ b/src/jogl/classes/javax/media/opengl/GLArrayData.java
@@ -1,3 +1,30 @@
+/**
+ * Copyright 2010 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
package javax.media.opengl;
diff --git a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
index bc2f633ce..12ded8736 100644
--- a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
+++ b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
@@ -56,7 +56,7 @@ import java.security.*;
based rendering mechanism as well by end users directly.<P>
The implementation shall initialize itself as soon as possible,
- ie if the attached {@link javax.media.nativewindow.NativeWindow NativeWindow} is become visible.
+ ie if the attached {@link javax.media.nativewindow.NativeSurface NativeSurface} becomes visible/realized.
The following protocol shall be satisfied:
<ul>
<li> Create the {@link GLDrawable} with the requested {@link GLCapabilities}</li>
@@ -70,12 +70,12 @@ import java.security.*;
Another implementation detail is the drawable reconfiguration. One use case is where a window is being
dragged to another screen with a different pixel configuration, ie {@link GLCapabilities}. The implementation
- shall be able to detect such cases in conjunction with the associated {@link javax.media.nativewindow.NativeWindow NativeWindow}.<br>
+ shall be able to detect such cases in conjunction with the associated {@link javax.media.nativewindow.NativeSurface NativeSurface}.<br>
For example, AWT's {@link java.awt.Canvas} 's {@link java.awt.Canvas#getGraphicsConfiguration getGraphicsConfiguration()}
is capable to determine a display device change. This is demonstrated within {@link javax.media.opengl.awt.GLCanvas}'s
and NEWT's <code>AWTCanvas</code> {@link javax.media.opengl.awt.GLCanvas#getGraphicsConfiguration getGraphicsConfiguration()}
specialization. Another demonstration is NEWT's {@link javax.media.nativewindow.NativeWindow NativeWindow}
- implementation on the the Windows platform, which utilizes the native platform's <i>MonitorFromWindow(HWND)</i> function.<br>
+ implementation on the Windows platform, which utilizes the native platform's <i>MonitorFromWindow(HWND)</i> function.<br>
All OpenGL resources shall be regenerated, while the drawable's {@link GLCapabilities} has
to be choosen again. The following protocol shall be satisfied.
<ul>
diff --git a/src/jogl/classes/javax/media/opengl/GLBase.java b/src/jogl/classes/javax/media/opengl/GLBase.java
index 5ba410a61..90b320ed3 100644
--- a/src/jogl/classes/javax/media/opengl/GLBase.java
+++ b/src/jogl/classes/javax/media/opengl/GLBase.java
@@ -1,5 +1,30 @@
-/*
+/**
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2010 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
*/
package javax.media.opengl;
diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilities.java b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
index 530078ec0..11d353e61 100644
--- a/src/jogl/classes/javax/media/opengl/GLCapabilities.java
+++ b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2010 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java b/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java
index 38cda8cdf..73a77de27 100644
--- a/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java
+++ b/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2010 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index b11374f9d..0cc63fb1a 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2010 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawable.java b/src/jogl/classes/javax/media/opengl/GLDrawable.java
index 46296ca52..e4861edd2 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawable.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawable.java
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2010 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -103,13 +104,13 @@ public interface GLDrawable {
*
* With an argument of <code>true</code>,
* the minimum implementation shall call
- * {@link NativeWindow#lockSurface() NativeWindow's lockSurface()} and if successfull:
+ * {@link NativeSurface#lockSurface() NativeSurface's lockSurface()} and if successfull:
* <ul>
* <li> Update the {@link GLCapabilities}, which are associated with
- * the attached {@link NativeWindow}'s {@link AbstractGraphicsConfiguration}.</li>
- * <li> Release the lock with {@link NativeWindow#unlockSurface() NativeWindow's unlockSurface()}.</li>
+ * the attached {@link NativeSurface}'s {@link AbstractGraphicsConfiguration}.</li>
+ * <li> Release the lock with {@link NativeSurface#unlockSurface() NativeSurface's unlockSurface()}.</li>
* </ul><br>
- * This is important since {@link NativeWindow#lockSurface() NativeWindow's lockSurface()}
+ * This is important since {@link NativeSurface#lockSurface() NativeSurface's lockSurface()}
* ensures resolving the window/surface handles, and the drawable's {@link GLCapabilities}
* might have changed.
*
@@ -143,7 +144,7 @@ public interface GLDrawable {
On some platforms, the pixel format is not directly associated
with the drawable; a best attempt is made to return a reasonable
value in this case. <br>
- This object shall be directly associated to the attached {@link NativeWindow}'s
+ This object shall be directly associated to the attached {@link NativeSurface}'s
{@link AbstractGraphicsConfiguration}, and if changes are necessary,
they should reflect those as well.
@return A copy of the queried object.
@@ -155,11 +156,11 @@ public interface GLDrawable {
*/
public GLProfile getGLProfile();
- public NativeWindow getNativeWindow();
+ public NativeSurface getNativeSurface();
/**
* This is the GL/Windowing drawable handle.<br>
- * It is usually the {@link javax.media.nativewindow.NativeWindow#getSurfaceHandle()},
+ * It is usually the {@link javax.media.nativewindow.NativeSurface#getSurfaceHandle()},
* ie the native surface handle of the underlying windowing toolkit.<br>
* However, on X11/GLX this reflects a GLXDrawable, which represents a GLXWindow, GLXPixmap, or GLXPbuffer.<br>
* On EGL, this represents the EGLSurface.<br>
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 86e3def38..a85993c8e 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2010 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -177,7 +178,7 @@ public abstract class GLDrawableFactory {
* which determines pixel format, on- and offscreen incl. PBuffer type.
* <p>
* The native platform's chosen Capabilties are referenced within the target
- * NativeWindow's AbstractGraphicsConfiguration.<p>
+ * NativeSurface's AbstractGraphicsConfiguration.<p>
*
* In case {@link javax.media.nativewindow.Capabilities#isOnscreen()} is true,<br>
* an onscreen GLDrawable will be realized.
@@ -193,7 +194,7 @@ public abstract class GLDrawableFactory {
*
* @see javax.media.nativewindow.GraphicsConfigurationFactory#chooseGraphicsConfiguration(Capabilities, CapabilitiesChooser, AbstractGraphicsScreen)
*/
- public abstract GLDrawable createGLDrawable(NativeWindow target)
+ public abstract GLDrawable createGLDrawable(NativeSurface target)
throws IllegalArgumentException, GLException;
/**
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index 3b40dbe69..287e7a5a9 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2010 JogAmp Community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index 4e63a8048..60ed731f1 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -567,8 +567,8 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable {
return (GLCapabilities)awtConfig.getRequestedCapabilities();
}
- public NativeWindow getNativeWindow() {
- return drawable.getNativeWindow();
+ public NativeSurface getNativeSurface() {
+ return drawable.getNativeSurface();
}
public long getHandle() {
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 72b782f9a..e4a295ba3 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -488,7 +488,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
return glProfile;
}
- public NativeWindow getNativeWindow() {
+ public NativeSurface getNativeSurface() {
throw new GLException("FIXME");
}
@@ -1541,7 +1541,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
}
}
if (joglContext == null) {
- AbstractGraphicsDevice device = j2dContext.getGLDrawable().getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice();
+ AbstractGraphicsDevice device = j2dContext.getGLDrawable().getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice();
if (factory.canCreateExternalGLDrawable(device)) {
joglDrawable = factory.createExternalGLDrawable();
// FIXME: Need to share with j2d context, due to FBO resource ..