Removed GLWindow and some useless extensions

This commit is contained in:
Caspian Rychlik-Prince 2003-08-03 22:04:45 +00:00
parent cd85805588
commit e482a9e815
8 changed files with 2 additions and 370 deletions

View file

@ -1362,7 +1362,7 @@ public abstract class GL extends CoreGL14 implements GLConstants {
public static native int wglGetCurrentReadDCARB();
public static native String wglGetExtensionsStringARB(int hdc);
public static native String wglGetExtensionsStringARB();
public static native String wglGetExtensionsStringEXT();

View file

@ -33,8 +33,6 @@
package org.lwjgl.opengl;
import org.lwjgl.Sys;
import org.lwjgl.Window;
import java.lang.reflect.*;
import java.lang.reflect.Field;
import java.util.HashMap;
@ -249,7 +247,7 @@ public abstract class GLCaps {
final String exts;
if (WGL_ARB_extensions_string)
exts = GL.wglGetExtensionsStringARB(Window.getHandle());
exts = GL.wglGetExtensionsStringARB();
// Remember - this is an HWND not an HDC, which is what's required. The native
// code on the other side of wglGetExtensionsStringARB gets the HDC from the HWND
// behind the scenes.

View file

@ -41,13 +41,9 @@ import org.lwjgl.opengl.atix.ATIXTextureEnvRoute;
import org.lwjgl.opengl.ext.*;
import org.lwjgl.opengl.ext.EXTAbgr;
import org.lwjgl.opengl.ext.EXTCompiledVertexArray;
import org.lwjgl.opengl.hp.HPOcclusionTest;
import org.lwjgl.opengl.nv.*;
import org.lwjgl.opengl.nv.NVCopyDepthToColor;
import org.lwjgl.opengl.nv.NVDepthClamp;
import org.lwjgl.opengl.sgis.SGISGenerateMipmap;
import org.lwjgl.opengl.sgix.SGIXDepthTexture;
import org.lwjgl.opengl.sgix.SGIXShadow;
import org.lwjgl.opengl.wgl.*;
import org.lwjgl.opengl.wgl.WGLBufferRegion;
import org.lwjgl.opengl.wgl.WGLMakeCurrentRead;
@ -114,7 +110,6 @@ public interface GLConstants
EXTVertexArray,
EXTVertexShader,
EXTVertexWeighting,
HPOcclusionTest,
NVCopyDepthToColor,
NVDepthClamp,
NVEvaluators,
@ -135,9 +130,6 @@ public interface GLConstants
NVVertexArrayRange,
NVVertexArrayRange2,
NVVertexProgram,
SGISGenerateMipmap,
SGIXDepthTexture,
SGIXShadow,
WGLBufferRegion,
WGLMakeCurrentRead,
WGLMultisample,

View file

@ -1,170 +0,0 @@
/*
* Copyright (c) 2002 Lightweight Java Game Library Project
* 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 'Light Weight Java Game Library' 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 THE COPYRIGHT OWNER 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.
*/
package org.lwjgl.opengl;
import org.lwjgl.Window;
import org.lwjgl.Sys;
import org.lwjgl.Display;
/**
* $Id$
*
* A visible GL context. Can either be windowed or fullscreen.
*
* Each instance of GLWindow is only valid in the thread that creates it.
* In addition, only one instance may be created at any one time.
*
* @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$
*/
public class GLWindow extends Window {
/** Has the GL been created yet? */
private boolean created;
/** Handle to the native GL rendering context */
protected int handle;
/** Color bits */
protected final int color;
/** Alpha bits */
protected final int alpha;
/** Depth bits */
protected final int depth;
/** Stencil bits */
protected final int stencil;
private int x, y;
/** Fullscreen */
protected final boolean fullscreen;
static {
System.loadLibrary(Sys.getLibraryName());
}
/**
* Construct a windowed context. If the underlying OS does not
* support windowed mode, then the width and height must match the current
* display resolution, or an Exception will be thrown. Otherwise a fullscreen
* window will be created.
*
* @param title The title of the window
* @param x The position of the window on the x axis. May be ignored.
* @param y The position of the window on the y axis. May be ignored.
* @param width The width of the window's client area
* @param height The height of the window's client area
* @param bpp Require colour bits
* @param alpha Required alpha bits
* @param depth Required depth bits
* @param stencil Required stencil bits
*/
public GLWindow(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil) {
super(title, x, y, width, height);
this.x = x;
this.y = y;
this.color = bpp;
this.alpha = alpha;
this.depth = depth;
this.stencil = stencil;
this.fullscreen = false;
}
/**
* Construct a fullscreen context. If the underlying OS does not
* support fullscreen mode, then a window will be created instead. If this
* fails too then an Exception will be thrown.
*
* @param title The title of the window
* @param bpp Minimum bits per pixel
* @param alpha Minimum bits per pixel in alpha buffer
* @param depth Minimum bits per pixel in depth buffer
* @param stencil Minimum bits per pixel in stencil buffer
*/
public GLWindow(String title, int bpp, int alpha, int depth, int stencil) {
super(title, 0, 0, Display.getWidth(), Display.getHeight());
this.x = 0;
this.y = 0;
this.color = bpp;
this.alpha = alpha;
this.depth = depth;
this.stencil = stencil;
this.fullscreen = true;
}
protected void doCreate() throws Exception {
nCreate(getTitle(), x, y, getWidth(), getHeight(), color, alpha, depth, stencil, fullscreen);
}
protected void doPaint() {
swapBuffers();
}
/**
* Swap the buffers.
*/
private native void swapBuffers();
/**
* Native method to create a windowed GL
*/
private native void nCreate(
String title,
int x,
int y,
int width,
int height,
int bpp,
int alpha,
int depth,
int stencil,
boolean fullscreen) throws Exception;
/* (non-Javadoc)
* @see org.lwjgl.Window#doDestroy()
*/
protected void doDestroy() {
nDestroyGL();
}
/**
* Natively destroy the context
*/
private native void nDestroyGL();
}

View file

@ -1,46 +0,0 @@
/*
* Copyright (c) 2002 Lightweight Java Game Library Project
* 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 'Light Weight Java Game Library' 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 THE COPYRIGHT OWNER 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.
*/
/*
* Created by IntelliJ IDEA.
* User: nj
* Date: 12-08-2002
* Time: 15:36:28
* To change template for new interface use
* Code Style | Class Templates options (Tools | IDE Options).
*/
package org.lwjgl.opengl.hp;
public interface HPOcclusionTest
{
public static final int GL_OCCLUSION_TEST_HP = 0x8165;
public static final int GL_OCCLUSION_TEST_RESULT_HP = 0x8166;
}

View file

@ -1,46 +0,0 @@
/*
* Copyright (c) 2002 Lightweight Java Game Library Project
* 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 'Light Weight Java Game Library' 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 THE COPYRIGHT OWNER 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.
*/
/*
* Created by IntelliJ IDEA.
* User: nj
* Date: 12-08-2002
* Time: 15:24:52
* To change template for new interface use
* Code Style | Class Templates options (Tools | IDE Options).
*/
package org.lwjgl.opengl.sgis;
public interface SGISGenerateMipmap
{
public static final int GL_GENERATE_MIPMAP_SGIS = 0x8191;
public static final int GL_GENERATE_MIPMAP_HINT_SGIS = 0x8192;
}

View file

@ -1,48 +0,0 @@
/*
* Copyright (c) 2002 Lightweight Java Game Library Project
* 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 'Light Weight Java Game Library' 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 THE COPYRIGHT OWNER 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.
*/
/*
* Created by IntelliJ IDEA.
* User: nj
* Date: 12-08-2002
* Time: 15:13:09
* To change template for new interface use
* Code Style | Class Templates options (Tools | IDE Options).
*/
package org.lwjgl.opengl.sgix;
public interface SGIXDepthTexture
{
public static final int GL_DEPTH_COMPONENT16_SGIX = 0x81A5;
public static final int GL_DEPTH_COMPONENT24_SGIX = 0x81A6;
public static final int GL_DEPTH_COMPONENT32_SGIX = 0x81A7;
}

View file

@ -1,48 +0,0 @@
/*
* Copyright (c) 2002 Lightweight Java Game Library Project
* 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 'Light Weight Java Game Library' 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 THE COPYRIGHT OWNER 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.
*/
/*
* Created by IntelliJ IDEA.
* User: nj
* Date: 12-08-2002
* Time: 15:11:56
* To change template for new interface use
* Code Style | Class Templates options (Tools | IDE Options).
*/
package org.lwjgl.opengl.sgix;
public interface SGIXShadow
{
public static final int GL_TEXTURE_COMPARE_SGIX = 0x819A;
public static final int GL_TEXTURE_COMPARE_OPERATOR_SGIX = 0x819B;
public static final int GL_TEXTURE_LEQUAL_R_SGIX = 0x819C;
public static final int GL_TEXTURE_GEQUAL_R_SGIX = 0x819D;
}