From ea948abf0911a0e10c1d7191458eb546370e2aad Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 14 Sep 2010 03:57:32 +0200 Subject: Removed COPYRIGHT.txt file, which is redundant due to COPYRIGHT notice in LICENSE.txt. It's product usage terms are no more applicable, since our repository is not used by Sun Microsystems to deliver a product. LICENSE.txt changes: - Updated SGI FreeB license reference from 1.1 to 2.0 - Dropped Sun alternative license, which is redundant due to the FreeB 2.0 license. - Added JogAmp Community and common denominator: New BSD 3-clause license README: - Added contacts - Sun -> JogAmp - Added Michael Bien Changed 'Sven Gothel' and 'Michael Bien' New BSD 3-clause license to 'JogAmp Community' Simplified BSD 2-clause license. --- .../cgl/MacOSXCGLDynamicLibraryBundleInfo.java | 51 +++++++++++----------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl/impl/macosx') diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java index 154cf61b5..a9b1a5977 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java @@ -1,30 +1,31 @@ -/* - * Copyright (c) 2010, Sven Gothel - * 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: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * 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. - * * Neither the name of Sven Gothel nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 Sven Gothel 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. + * 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 com.jogamp.opengl.impl.macosx.cgl; import com.jogamp.opengl.impl.*; -- cgit v1.2.3 From dc9191f1733960d8a035b5fb8c5f8314f54a0ca7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 15 Sep 2010 00:43:27 +0200 Subject: Misc Cleanups - www/index.html: absolute local refs -> relative - Platform GLContextImpl specialisations: remove local overriding drawable instance - X11ExternalGLXDrawable: Remove dead code, left over. --- .../classes/com/jogamp/opengl/impl/GLContextImpl.java | 10 +++++----- .../opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java | 2 -- .../opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java | 8 +++----- .../opengl/impl/windows/wgl/WindowsPbufferWGLContext.java | 8 +++----- .../opengl/impl/x11/glx/X11ExternalGLXDrawable.java | 15 ++------------- .../impl/x11/glx/X11GLXGraphicsConfigurationFactory.java | 5 ++--- .../opengl/impl/x11/glx/X11OffscreenGLXContext.java | 2 -- .../jogamp/opengl/impl/x11/glx/X11PbufferGLXContext.java | 4 +--- www/index.html | 10 +++++----- 9 files changed, 21 insertions(+), 43 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl/impl/macosx') diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java index 258445ce2..c19871560 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java @@ -492,11 +492,11 @@ public abstract class GLContextImpl extends GLContext { if (!mappedVersionsAvailableSet) { synchronized (mappedVersionsAvailableLock) { if (!mappedVersionsAvailableSet) { - createContextARBMapVersionsAvailable(4, false); // GL4 - createContextARBMapVersionsAvailable(4, true); // GL4bc - createContextARBMapVersionsAvailable(3, false); // GL3 - createContextARBMapVersionsAvailable(3, true); // GL3bc - createContextARBMapVersionsAvailable(2, true); // GL2 + createContextARBMapVersionsAvailable(4, false /* core */); // GL4 + createContextARBMapVersionsAvailable(4, true /* compat */); // GL4bc + createContextARBMapVersionsAvailable(3, false /* core */); // GL3 + createContextARBMapVersionsAvailable(3, true /* compat */); // GL3bc + createContextARBMapVersionsAvailable(2, true /* compat */); // GL2 mappedVersionsAvailableSet = true; if (DEBUG) { System.err.println(getThreadName() + ": !!! createContextARB: SET mappedVersionsAvailableSet " + mappedVersionsAvailableSet); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java index 568204384..e494fd121 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java @@ -46,12 +46,10 @@ import javax.media.opengl.*; import com.jogamp.opengl.impl.*; public class MacOSXOnscreenCGLContext extends MacOSXCGLContext { - protected MacOSXOnscreenCGLDrawable drawable; public MacOSXOnscreenCGLContext(MacOSXOnscreenCGLDrawable drawable, GLContext shareWith) { super(drawable, shareWith); - this.drawable = drawable; } protected void makeCurrentImpl(boolean newCreated) throws GLException { diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java index 9c630d24b..3964c9771 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java @@ -9,7 +9,6 @@ import javax.media.nativewindow.*; import com.jogamp.opengl.impl.*; public class MacOSXPbufferCGLContext extends MacOSXCGLContext { - protected MacOSXPbufferCGLDrawable drawable; // State for render-to-texture and render-to-texture-rectangle support private int textureTarget; // e.g. GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_NV @@ -28,7 +27,6 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext { public MacOSXPbufferCGLContext(MacOSXPbufferCGLDrawable drawable, GLContext shareWith) { super(drawable, shareWith); - this.drawable = drawable; initOpenGLImpl(); } @@ -45,8 +43,8 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext { } protected void makeCurrentImpl(boolean newCreated) throws GLException { - if (getOpenGLMode() != drawable.getOpenGLMode()) { - setOpenGLMode(drawable.getOpenGLMode()); + if (getOpenGLMode() != ((MacOSXPbufferCGLDrawable)drawable).getOpenGLMode()) { + setOpenGLMode(((MacOSXPbufferCGLDrawable)drawable).getOpenGLMode()); } if (!impl.makeCurrent(contextHandle)) { @@ -149,7 +147,7 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext { throw new GLException("Can't switch between using NSOpenGLPixelBuffer and CGLPBufferObj more than once"); } destroyImpl(); - drawable.setOpenGLMode(mode); + ((MacOSXPbufferCGLDrawable)drawable).setOpenGLMode(mode); openGLMode = mode; haveSetOpenGLMode = true; if (DEBUG) { diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java index 1da5b80c9..66953289b 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsPbufferWGLContext.java @@ -46,7 +46,6 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext { private static final boolean DEBUG = Debug.debug("WindowsPbufferWGLContext"); // State for render-to-texture and render-to-texture-rectangle support - private WindowsPbufferWGLDrawable drawable; private boolean rtt; // render-to-texture? private boolean hasRTT; // render-to-texture extension available? private boolean rect; // render-to-texture-rectangle? @@ -56,7 +55,6 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext { public WindowsPbufferWGLContext(WindowsPbufferWGLDrawable drawable, GLContext shareWith) { super(drawable, shareWith); - this.drawable = drawable; } public void bindPbufferToTexture() { @@ -68,7 +66,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext { WGLExt wglExt = getWGLExt(); gl.glBindTexture(textureTarget, texture); if (rtt && hasRTT) { - if (!wglExt.wglBindTexImageARB(drawable.getPbufferHandle(), WGLExt.WGL_FRONT_LEFT_ARB)) { + if (!wglExt.wglBindTexImageARB(((WindowsPbufferWGLDrawable)drawable).getPbufferHandle(), WGLExt.WGL_FRONT_LEFT_ARB)) { throw new GLException("Binding of pbuffer to texture failed: " + wglGetLastError()); } } @@ -84,7 +82,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext { } if (rtt && hasRTT) { WGLExt wglExt = getWGLExt(); - if (!wglExt.wglReleaseTexImageARB(drawable.getPbufferHandle(), WGLExt.WGL_FRONT_LEFT_ARB)) { + if (!wglExt.wglReleaseTexImageARB(((WindowsPbufferWGLDrawable)drawable).getPbufferHandle(), WGLExt.WGL_FRONT_LEFT_ARB)) { throw new GLException("Releasing of pbuffer from texture failed: " + wglGetLastError()); } } @@ -142,7 +140,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext { } public int getFloatingPointMode() { - return drawable.getFloatingPointMode(); + return ((WindowsPbufferWGLDrawable)drawable).getFloatingPointMode(); } private static String wglGetLastError() { diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java index 006a55e20..d930179df 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11ExternalGLXDrawable.java @@ -47,19 +47,8 @@ import com.jogamp.nativewindow.impl.NullWindow; public class X11ExternalGLXDrawable extends X11GLXDrawable { - //TODO? those are not used -// private int fbConfigID; -// private int renderType; - - private X11ExternalGLXDrawable(GLDrawableFactory factory, NativeWindow component, int renderType) { + private X11ExternalGLXDrawable(GLDrawableFactory factory, NativeWindow component) { super(factory, component, true); - -// this.renderType = renderType; - - // Need GLXFBConfig ID in order to properly create new contexts - // on this drawable -// X11GLXGraphicsConfiguration cfg = (X11GLXGraphicsConfiguration) component.getGraphicsConfiguration(); -// fbConfigID = cfg.getFBConfigID(); } protected static X11ExternalGLXDrawable create(GLDrawableFactory factory, GLProfile glp) { @@ -97,7 +86,7 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable { NullWindow nw = new NullWindow(cfg); nw.setSurfaceHandle(drawable); nw.setSize(w, h); - return new X11ExternalGLXDrawable(factory, nw, GLX.GLX_RGBA_TYPE); + return new X11ExternalGLXDrawable(factory, nw); } public GLContext createContext(GLContext shareWith) { diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java index 8fcc7994b..9884db288 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java @@ -132,7 +132,6 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac } GLCapabilities caps2 = (GLCapabilities) capabilities.clone(); - GLCapabilitiesChooser glChooser = chooser; boolean usePBuffer = caps2.isPBuffer(); @@ -141,12 +140,12 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac caps2.setDoubleBuffered(false); } - X11GLXGraphicsConfiguration res = chooseGraphicsConfigurationFBConfig(caps2, glChooser, x11Screen); + X11GLXGraphicsConfiguration res = chooseGraphicsConfigurationFBConfig(caps2, chooser, x11Screen); if(null==res) { if(usePBuffer) { throw new GLException("Error: Couldn't create X11GLXGraphicsConfiguration based on FBConfig for "+caps2); } - res = chooseGraphicsConfigurationXVisual(caps2, glChooser, x11Screen); + res = chooseGraphicsConfigurationXVisual(caps2, chooser, x11Screen); } if(null==res) { throw new GLException("Error: Couldn't create X11GLXGraphicsConfiguration based on FBConfig and XVisual for "+caps2); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXContext.java index f3674c108..6f24d5a60 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11OffscreenGLXContext.java @@ -42,12 +42,10 @@ package com.jogamp.opengl.impl.x11.glx; import javax.media.opengl.*; public class X11OffscreenGLXContext extends X11GLXContext { - private X11OffscreenGLXDrawable drawable; public X11OffscreenGLXContext(X11OffscreenGLXDrawable drawable, GLContext shareWith) { super(drawable, shareWith); - this.drawable = drawable; } public int getOffscreenContextPixelDataType() { diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXContext.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXContext.java index 8d118f2df..85bbade24 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXContext.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11PbufferGLXContext.java @@ -42,11 +42,9 @@ package com.jogamp.opengl.impl.x11.glx; import javax.media.opengl.*; public class X11PbufferGLXContext extends X11GLXContext { - private X11PbufferGLXDrawable drawable; public X11PbufferGLXContext(X11PbufferGLXDrawable drawable, GLContext shareWith) { super(drawable, shareWith); - this.drawable = drawable; } public void bindPbufferToTexture() { @@ -61,7 +59,7 @@ public class X11PbufferGLXContext extends X11GLXContext { public int getFloatingPointMode() { - return drawable.getFloatingPointMode(); + return ((X11PbufferGLXDrawable)drawable).getFloatingPointMode(); } protected boolean createImpl() { diff --git a/www/index.html b/www/index.html index 41aa15010..90cd159ff 100644 --- a/www/index.html +++ b/www/index.html @@ -4,7 +4,7 @@ JOGL - Java Binding for the OpenGL API - +
@@ -14,7 +14,7 @@