Made the gl caps flags auto-generated and moved them to GLContext.getCapabilities()
This commit is contained in:
parent
0cf62ec943
commit
fdfa82a061
26
build.xml
26
build.xml
|
@ -3,11 +3,11 @@
|
|||
<!-- ================================================================== -->
|
||||
<!-- Global properties for build -->
|
||||
<!-- ================================================================== -->
|
||||
<property name="lwjgl.src" value="./SRC" />
|
||||
<property name="lwjgl.src" value="./src" />
|
||||
<property name="lwjgl.src.native" value="${lwjgl.src}/native" />
|
||||
<property name="lwjgl.src.headers" value="${lwjgl.src.native}/common" />
|
||||
<property name="lwjgl.src.templates" value="${lwjgl.src}/templates" />
|
||||
<property name="lwjgl.bin" value="./BIN" />
|
||||
<property name="lwjgl.bin" value="./bin" />
|
||||
<property name="lwjgl.lib" value="./libs" />
|
||||
<property name="lwjgl.dist" value="./dist" />
|
||||
<property name="lwjgl.docs" value="./doc" />
|
||||
|
@ -200,15 +200,15 @@
|
|||
</target>
|
||||
|
||||
<!-- Compiles the Java source code -->
|
||||
<target name="generator" description="Compiles the native method generator">
|
||||
<target name="generators" description="Compiles the native method generators">
|
||||
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/generator/**.java" source="1.5" target="1.5" taskname="generator">
|
||||
<compilerarg value="-Xlint:all"/>
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="generate-all" depends="generate-openal, generate-opengl" description="Generates java and native source"/>
|
||||
<target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities" description="Generates java and native source"/>
|
||||
|
||||
<target name="generate-openal" depends="generator" description="Generates java and native source for AL">
|
||||
<target name="generate-openal" depends="generators" description="Generates java and native source for AL">
|
||||
<!-- Generate OpenAL -->
|
||||
<apply executable="apt" parallel="true">
|
||||
<arg value="-nocompile"/>
|
||||
|
@ -226,7 +226,7 @@
|
|||
</apply>
|
||||
</target>
|
||||
|
||||
<target name="generate-opengl" depends="generator" description="Generates java and native source for GL">
|
||||
<target name="generate-opengl" depends="generators" description="Generates java and native source for GL">
|
||||
<!-- there's no apt task in ant yet, so we'll just invoke it manually for now -->
|
||||
<!-- Generate core GL -->
|
||||
<apply executable="apt" parallel="true">
|
||||
|
@ -341,6 +341,20 @@
|
|||
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/SUN*.java"/>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
<target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
|
||||
<!-- Generate context capabilities -->
|
||||
<apply executable="apt" parallel="true">
|
||||
<arg value="-nocompile"/>
|
||||
<arg value="-factory"/>
|
||||
<arg value="org.lwjgl.generator.ContextGeneratorProcessorFactory"/>
|
||||
<arg value="-cp"/>
|
||||
<arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
|
||||
<arg value="-s"/>
|
||||
<arg path="${lwjgl.src}/java"/>
|
||||
<fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/opengl/*.java"/>
|
||||
</apply>
|
||||
</target>
|
||||
|
||||
<!-- Compiles the Java source code -->
|
||||
<target name="compile" description="Compiles the java source code">
|
||||
|
|
|
@ -43,6 +43,10 @@ regular java interfaces containing zero or more constant fields and zero or
|
|||
more annotated methods. Each interface will generate a java source file in
|
||||
src/java and, if needed, a native source file in src/native/common.
|
||||
|
||||
There's an auxillary generator that creates the ContextCapabilities class. It
|
||||
is invoked as part of the 'generate-all' and target. It can also be invoked
|
||||
stand-alone with the target 'generate-opengl-capabilites'.
|
||||
|
||||
Template file format
|
||||
--------------------
|
||||
A template file is a regular java interface with annotations describing the
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL 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 'LWJGL' 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.generator;
|
||||
|
||||
import com.sun.mirror.apt.*;
|
||||
import com.sun.mirror.declaration.*;
|
||||
import com.sun.mirror.type.*;
|
||||
import com.sun.mirror.util.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.File;
|
||||
|
||||
import java.nio.*;
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
/**
|
||||
* $Id$
|
||||
*
|
||||
* Generator visitor for the context capabilities generator tool
|
||||
*
|
||||
* @author elias_naur <elias_naur@users.sourceforge.net>
|
||||
* @version $Revision$
|
||||
*/
|
||||
public class ContextCapabilitiesGenerator {
|
||||
public final static String CONTEXT_CAPS_CLASS_NAME = "ContextCapabilities";
|
||||
private final static String CACHED_EXTS_VAR_NAME = "supported_extensions";
|
||||
private final static String EXTENSION_PREFIX = "GL_";
|
||||
private final static String CORE_PREFIX = "Open";
|
||||
|
||||
public static void generateClassPrologue(PrintWriter writer) {
|
||||
writer.println("public class " + CONTEXT_CAPS_CLASS_NAME + " {");
|
||||
}
|
||||
|
||||
public static void generateInitializerPrologue(PrintWriter writer) {
|
||||
// writer.println("\t\t/*");
|
||||
// writer.println("\t\t * Special case: initialize GL11 unconditionally,");
|
||||
// writer.println("\t\t * and let exceptions abort the constructor");
|
||||
// writer.println("\t\t */");
|
||||
|
||||
// writer.println("\t\tGL11.initNativeStubs();");*/
|
||||
writer.println("\t" + CONTEXT_CAPS_CLASS_NAME + "(Set " + CACHED_EXTS_VAR_NAME + ") {");
|
||||
}
|
||||
|
||||
private static String translateFieldName(String interface_name) {
|
||||
if (interface_name.startsWith("GL"))
|
||||
return CORE_PREFIX + interface_name;
|
||||
else
|
||||
return EXTENSION_PREFIX + interface_name;
|
||||
}
|
||||
|
||||
public static void generateInitializer(PrintWriter writer, InterfaceDeclaration d) {
|
||||
String translated_field_name = translateFieldName(d.getSimpleName());
|
||||
writer.print("\t\tthis." + translated_field_name + " = ");
|
||||
writer.print(CACHED_EXTS_VAR_NAME + ".contains(\"");
|
||||
writer.print(translated_field_name + "\")");
|
||||
Collection<InterfaceType> super_interfaces = d.getSuperinterfaces();
|
||||
if (super_interfaces.size() > 1)
|
||||
throw new RuntimeException(d + " extends more than one other interface");
|
||||
if (super_interfaces.size() == 1) {
|
||||
InterfaceType super_interface = super_interfaces.iterator().next();
|
||||
writer.println();
|
||||
writer.print("\t\t\t&& " + CACHED_EXTS_VAR_NAME + ".contains(\"");
|
||||
writer.print(translateFieldName(super_interface.getDeclaration().getSimpleName()) + "\")");
|
||||
}
|
||||
writer.println(";");
|
||||
}
|
||||
|
||||
public static void generateInitStubsPrologue(PrintWriter writer) {
|
||||
writer.println("\tstatic Set initAllStubs() throws LWJGLException {");
|
||||
writer.println("\t\torg.lwjgl.opengl.GL11.initNativeStubs();");
|
||||
writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = GLContext.getSupportedExtensions();");
|
||||
}
|
||||
|
||||
public static void generateInitStubsEpilogue(PrintWriter writer) {
|
||||
writer.println("\t\treturn " + CACHED_EXTS_VAR_NAME + ";");
|
||||
writer.println("\t}");
|
||||
}
|
||||
|
||||
public static void generateUnloadStubs(PrintWriter writer, InterfaceDeclaration d) {
|
||||
if (d.getMethods().size() > 0) {
|
||||
writer.print("\t\tGLContext.resetNativeStubs(" + Utils.getSimpleClassName(d));
|
||||
writer.println(".class);");
|
||||
}
|
||||
}
|
||||
|
||||
public static void generateInitStubs(PrintWriter writer, InterfaceDeclaration d) {
|
||||
if (d.getMethods().size() > 0) {
|
||||
writer.print("\t\tGLContext.initNativeStubs(" + Utils.getSimpleClassName(d));
|
||||
writer.println(".class, supported_extensions, \"" + translateFieldName(d.getSimpleName()) + "\");");
|
||||
}
|
||||
}
|
||||
|
||||
public static void generateAddExtension(PrintWriter writer, InterfaceDeclaration d) {
|
||||
writer.print("\t\t" + CACHED_EXTS_VAR_NAME + ".add(\"");
|
||||
writer.println(translateFieldName(d.getSimpleName()) + "\");");
|
||||
}
|
||||
|
||||
/* public static void generateSymbolPointers(PrintWriter writer, InterfaceDeclaration d) {
|
||||
for (MethodDeclaration method : d.getMethods()) {
|
||||
writer.println("\tlong " + d.getSimpleName() + "_" + method.getSimpleName() + ";");
|
||||
}
|
||||
}
|
||||
*/
|
||||
public static void generateField(PrintWriter writer, InterfaceDeclaration d) {
|
||||
writer.println("\tpublic final boolean " + translateFieldName(d.getSimpleName()) + ";");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,162 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL 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 'LWJGL' 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.generator;
|
||||
|
||||
import com.sun.mirror.apt.*;
|
||||
import com.sun.mirror.declaration.*;
|
||||
import com.sun.mirror.type.*;
|
||||
import com.sun.mirror.util.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Arrays;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.File;
|
||||
|
||||
import static java.util.Collections.*;
|
||||
import static com.sun.mirror.util.DeclarationVisitors.*;
|
||||
|
||||
/**
|
||||
* $Id$
|
||||
*
|
||||
* Generator tool for creating the java classes and native code
|
||||
* from an annotated template java interface.
|
||||
*
|
||||
* @author elias_naur <elias_naur@users.sourceforge.net>
|
||||
* @version $Revision$
|
||||
*/
|
||||
public class ContextGeneratorProcessorFactory implements AnnotationProcessorFactory, RoundCompleteListener {
|
||||
private static boolean first_round = true;
|
||||
|
||||
// Process any set of annotations
|
||||
private static final Collection<String> supportedAnnotations =
|
||||
unmodifiableCollection(Arrays.asList("*"));
|
||||
|
||||
public Collection<String> supportedAnnotationTypes() {
|
||||
return supportedAnnotations;
|
||||
}
|
||||
|
||||
public Collection<String> supportedOptions() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
public void roundComplete(RoundCompleteEvent event) {
|
||||
first_round = false;
|
||||
}
|
||||
|
||||
public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> atds, AnnotationProcessorEnvironment env) {
|
||||
// Only process the initial types, not the generated ones
|
||||
if (first_round) {
|
||||
env.addListener(this);
|
||||
return new GeneratorProcessor(env);
|
||||
} else
|
||||
return AnnotationProcessors.NO_OP;
|
||||
}
|
||||
|
||||
private static class GeneratorProcessor implements AnnotationProcessor {
|
||||
private final AnnotationProcessorEnvironment env;
|
||||
|
||||
GeneratorProcessor(AnnotationProcessorEnvironment env) {
|
||||
this.env = env;
|
||||
}
|
||||
|
||||
public void process() {
|
||||
try {
|
||||
generateContextCapabilitiesSource();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateContextCapabilitiesSource() throws IOException {
|
||||
PrintWriter writer = env.getFiler().createSourceFile("org.lwjgl.opengl." + ContextCapabilitiesGenerator.CONTEXT_CAPS_CLASS_NAME);
|
||||
writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */");
|
||||
writer.println();
|
||||
writer.println("package org.lwjgl.opengl;");
|
||||
writer.println();
|
||||
writer.println("import org.lwjgl.LWJGLException;");
|
||||
writer.println("import java.util.Set;");
|
||||
writer.println();
|
||||
ContextCapabilitiesGenerator.generateClassPrologue(writer);
|
||||
DeclarationFilter filter = DeclarationFilter.getFilter(InterfaceDeclaration.class);
|
||||
Collection<TypeDeclaration> interface_decls = filter.filter(env.getSpecifiedTypeDeclarations());
|
||||
for (TypeDeclaration typedecl : interface_decls) {
|
||||
InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
|
||||
if (Utils.isFinal(interface_decl))
|
||||
ContextCapabilitiesGenerator.generateField(writer, interface_decl);
|
||||
}
|
||||
writer.println();
|
||||
ContextCapabilitiesGenerator.generateInitStubsPrologue(writer);
|
||||
for (TypeDeclaration typedecl : interface_decls) {
|
||||
InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
|
||||
if (!Utils.isFinal(interface_decl))
|
||||
ContextCapabilitiesGenerator.generateAddExtension(writer, interface_decl);
|
||||
}
|
||||
for (TypeDeclaration typedecl : interface_decls) {
|
||||
InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
|
||||
String simple_name = interface_decl.getSimpleName();
|
||||
if (simple_name.equals("GL11"))
|
||||
continue;
|
||||
ContextCapabilitiesGenerator.generateInitStubs(writer, interface_decl);
|
||||
}
|
||||
ContextCapabilitiesGenerator.generateInitStubsEpilogue(writer);
|
||||
writer.println();
|
||||
writer.println("\tstatic void unloadAllStubs() {");
|
||||
for (TypeDeclaration typedecl : interface_decls) {
|
||||
InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
|
||||
ContextCapabilitiesGenerator.generateUnloadStubs(writer, interface_decl);
|
||||
}
|
||||
writer.println("\t}");
|
||||
/* writer.println();
|
||||
for (TypeDeclaration typedecl : interface_decls) {
|
||||
InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
|
||||
ContextCapabilitiesGenerator.generateSymbolPointers(writer, interface_decl);
|
||||
}*/
|
||||
writer.println();
|
||||
ContextCapabilitiesGenerator.generateInitializerPrologue(writer);
|
||||
for (TypeDeclaration typedecl : interface_decls) {
|
||||
InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl;
|
||||
if (Utils.isFinal(interface_decl))
|
||||
ContextCapabilitiesGenerator.generateInitializer(writer, interface_decl);
|
||||
}
|
||||
writer.println("\t}");
|
||||
writer.println("}");
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -59,9 +59,8 @@ public class GeneratorProcessorFactory implements AnnotationProcessorFactory, Ro
|
|||
private static final Collection<String> supportedAnnotations =
|
||||
unmodifiableCollection(Arrays.asList("*"));
|
||||
|
||||
// No supported options
|
||||
private static final Collection<String> supportedOptions =
|
||||
unmodifiableCollection(Arrays.asList("-Anativeoutdir"));
|
||||
unmodifiableCollection(Arrays.asList("-Atypemap", "-Ageneratechecks"));
|
||||
|
||||
public Collection<String> supportedAnnotationTypes() {
|
||||
return supportedAnnotations;
|
||||
|
|
|
@ -54,8 +54,6 @@ import java.nio.*;
|
|||
* @version $Revision$
|
||||
*/
|
||||
public class GeneratorVisitor extends SimpleDeclarationVisitor {
|
||||
private static final String STUB_INITIALIZER_NAME = "initNativeStubs";
|
||||
|
||||
private final AnnotationProcessorEnvironment env;
|
||||
private final TypeMap type_map;
|
||||
private final boolean generate_error_checks;
|
||||
|
@ -170,8 +168,7 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
|
|||
java_writer.println("import java.nio.*;");
|
||||
java_writer.println();
|
||||
java_writer.print("public ");
|
||||
Extension extension_annotation = d.getAnnotation(Extension.class);
|
||||
boolean is_final = extension_annotation == null || extension_annotation.isFinal();
|
||||
boolean is_final = Utils.isFinal(d);
|
||||
if (is_final)
|
||||
java_writer.write("final ");
|
||||
java_writer.print("class " + Utils.getSimpleClassName(d));
|
||||
|
@ -192,7 +189,7 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
|
|||
java_writer.println();
|
||||
}
|
||||
if (d.getMethods().size() > 0)
|
||||
java_writer.println("\tstatic native void " + STUB_INITIALIZER_NAME + "() throws LWJGLException;");
|
||||
java_writer.println("\tstatic native void " + Utils.STUB_INITIALIZER_NAME + "() throws LWJGLException;");
|
||||
JavaMethodsGenerator.generateMethodsJava(env, type_map, java_writer, d, generate_error_checks);
|
||||
java_writer.println("}");
|
||||
java_writer.close();
|
||||
|
@ -214,7 +211,7 @@ public class GeneratorVisitor extends SimpleDeclarationVisitor {
|
|||
generateMethodsNativePointers(native_writer, d.getMethods());
|
||||
native_writer.println();
|
||||
NativeMethodStubsGenerator.generateNativeMethodStubs(env, type_map, native_writer, d, generate_error_checks);
|
||||
native_writer.print("JNIEXPORT void JNICALL " + Utils.getQualifiedNativeMethodName(qualified_interface_name, STUB_INITIALIZER_NAME));
|
||||
native_writer.print("JNIEXPORT void JNICALL " + Utils.getQualifiedNativeMethodName(qualified_interface_name, Utils.STUB_INITIALIZER_NAME));
|
||||
native_writer.println("(JNIEnv *env, jclass clazz) {");
|
||||
native_writer.println("\tJavaMethodAndExtFunction functions[] = {");
|
||||
RegisterStubsGenerator.generateMethodsNativeStubBind(native_writer, d, generate_error_checks);
|
||||
|
|
|
@ -48,6 +48,7 @@ import java.util.*;
|
|||
import com.sun.mirror.declaration.*;
|
||||
|
||||
public class Utils {
|
||||
public static final String STUB_INITIALIZER_NAME = "initNativeStubs";
|
||||
public static final String BUFFER_OBJECT_METHOD_POSTFIX = "BO";
|
||||
public static final String BUFFER_OBJECT_PARAMETER_POSTFIX = "_buffer_offset";
|
||||
public static final String RESULT_SIZE_NAME = "result_size";
|
||||
|
@ -55,6 +56,11 @@ public class Utils {
|
|||
public static final String CACHED_BUFFER_NAME = "old_buffer";
|
||||
private static final String OVERLOADED_METHOD_PREFIX = "n";
|
||||
|
||||
public static boolean isFinal(InterfaceDeclaration d) {
|
||||
Extension extension_annotation = d.getAnnotation(Extension.class);
|
||||
return extension_annotation == null || extension_annotation.isFinal();
|
||||
}
|
||||
|
||||
private static class AnnotationMirrorComparator implements Comparator<AnnotationMirror> {
|
||||
public int compare(AnnotationMirror a1, AnnotationMirror a2) {
|
||||
String n1 = a1.getAnnotationType().getDeclaration().getQualifiedName();
|
||||
|
|
|
@ -332,7 +332,6 @@ public final class AL10 {
|
|||
* of the medium (air, water) moving with respect to listener and source are ignored.
|
||||
* AL_DOPPLER_VELOCITY is the propagation speed relative to which the Source
|
||||
* velocities are interpreted.
|
||||
*
|
||||
* <p>
|
||||
* <pre>
|
||||
* VD: AL_DOPPLER_VELOCITY
|
||||
|
@ -341,9 +340,7 @@ public final class AL10 {
|
|||
* vs: Source verlocity (scalar, projected on source-listener vector)
|
||||
* f: Frequency in sample
|
||||
* f': effective Doppler shifted frequency
|
||||
*
|
||||
* f' = DF * f * (VD-vl)/(VD+vs)
|
||||
*
|
||||
* vl<0, vs>0 : source and listener approaching each other
|
||||
* vl>0, vs<0 : source and listener moving away from each other
|
||||
* </pre>
|
||||
|
@ -389,7 +386,6 @@ public final class AL10 {
|
|||
* of the medium (air, water) moving with respect to listener and source are ignored.
|
||||
* AL_DOPPLER_VELOCITY is the propagation speed relative to which the Source
|
||||
* velocities are interpreted.
|
||||
*
|
||||
* <p>
|
||||
* <pre>
|
||||
* VD: AL_DOPPLER_VELOCITY
|
||||
|
@ -398,9 +394,7 @@ public final class AL10 {
|
|||
* vs: Source verlocity (scalar, projected on source-listener vector)
|
||||
* f: Frequency in sample
|
||||
* f': effective Doppler shifted frequency
|
||||
*
|
||||
* f' = DF * f * (VD-vl)/(VD+vs)
|
||||
*
|
||||
* vl<0, vs>0 : source and listener approaching each other
|
||||
* vl>0, vs<0 : source and listener moving away from each other
|
||||
* </pre>
|
||||
|
@ -447,7 +441,7 @@ public final class AL10 {
|
|||
* distance and other attenuation might ultimately limit the overall AL_GAIN to a value
|
||||
* below 1.0.
|
||||
* </p>
|
||||
* <p>
|
||||
* <p>
|
||||
* AL currently supports three modes of operation with respect to distance
|
||||
* attenuation. It supports two distance-dependent attenuation models, one which is
|
||||
* similar to the IASIG I3DL2 (and DS3D) model. The application choses one of these
|
||||
|
@ -456,22 +450,22 @@ public final class AL10 {
|
|||
* </p>
|
||||
* <p>
|
||||
* Legal arguments are AL_NONE, AL_INVERSE_DISTANCE, and
|
||||
* AL_INVERSE_DISTANCE_CLAMPED.
|
||||
* AL_INVERSE_DISTANCE_CLAMPED.
|
||||
* <br>
|
||||
* <br>
|
||||
* AL_NONE bypasses all distance attenuation
|
||||
* calculation for all Sources. The implementation is expected to optimize this
|
||||
* situation.
|
||||
* situation.
|
||||
* <br>
|
||||
* <br>
|
||||
* AL_INVERSE_DISTANCE_CLAMPED is the DS3D model, with
|
||||
* AL_REFERENCE_DISTANCE indicating both the reference distance and the distance
|
||||
* below which gain will be clamped.
|
||||
* below which gain will be clamped.
|
||||
* <br>
|
||||
* <br>
|
||||
* AL_INVERSE_DISTANCE is equivalent to the DS3D
|
||||
* model with the exception that AL_REFERENCE_DISTANCE does not imply any
|
||||
* clamping.
|
||||
* clamping.
|
||||
* <br>
|
||||
* <br>
|
||||
* The AL implementation is still free to apply any range clamping as
|
||||
|
@ -584,38 +578,7 @@ public final class AL10 {
|
|||
* </p>
|
||||
* @param buffer Buffer to fill
|
||||
* @param format format sound data is in
|
||||
* @param data location of data
|
||||
* @param freq frequency of data
|
||||
*/
|
||||
public static void alBufferData(int buffer, int format, ShortBuffer data, int freq) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nalBufferData(buffer, format, data, data.position() << 1, (data.remaining() << 1), freq);
|
||||
Util.checkALError();
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
* A special case of Buffer state is the actual sound sample data stored in asociation
|
||||
* with the Buffer. Applications can specify sample data using BufferData.
|
||||
* </p>
|
||||
* <p>
|
||||
* The data specified is copied to an internal software, or if possible, hardware buffer.
|
||||
* The implementation is free to apply decompression, conversion, resampling, and
|
||||
* filtering as needed. The internal format of the Buffer is not exposed to the
|
||||
* application, and not accessible. Valid formats are AL_FORMAT_MONO8,
|
||||
* AL_FORMAT_MONO16, AL_FORMAT_STEREO8, and AL_FORMAT_STEREO16. An
|
||||
* implementation may expose other formats, see the chapter on Extensions for
|
||||
* information on determining if additional formats are supported.
|
||||
* </p>
|
||||
* <p>
|
||||
* Applications should always check for an error condition after attempting to specify
|
||||
* buffer data in case an implementation has to generate an AL_OUT_OF_MEMORY or
|
||||
* conversion related AL_INVALID_VALUE error. The application is free to reuse the
|
||||
* memory specified by the data pointer once the call to BufferData returns. The
|
||||
* implementation has to dereference, e.g. copy, the data during BufferData execution.
|
||||
* </p>
|
||||
* @param buffer Buffer to fill
|
||||
* @param format format sound data is in
|
||||
* @param data location of data
|
||||
* @param data location of data
|
||||
* @param freq frequency of data
|
||||
*/
|
||||
public static void alBufferData(int buffer, int format, IntBuffer data, int freq) {
|
||||
|
@ -646,7 +609,38 @@ public final class AL10 {
|
|||
* </p>
|
||||
* @param buffer Buffer to fill
|
||||
* @param format format sound data is in
|
||||
* @param data location of data
|
||||
* @param data location of data
|
||||
* @param freq frequency of data
|
||||
*/
|
||||
public static void alBufferData(int buffer, int format, ShortBuffer data, int freq) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nalBufferData(buffer, format, data, data.position() << 1, (data.remaining() << 1), freq);
|
||||
Util.checkALError();
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
* A special case of Buffer state is the actual sound sample data stored in asociation
|
||||
* with the Buffer. Applications can specify sample data using BufferData.
|
||||
* </p>
|
||||
* <p>
|
||||
* The data specified is copied to an internal software, or if possible, hardware buffer.
|
||||
* The implementation is free to apply decompression, conversion, resampling, and
|
||||
* filtering as needed. The internal format of the Buffer is not exposed to the
|
||||
* application, and not accessible. Valid formats are AL_FORMAT_MONO8,
|
||||
* AL_FORMAT_MONO16, AL_FORMAT_STEREO8, and AL_FORMAT_STEREO16. An
|
||||
* implementation may expose other formats, see the chapter on Extensions for
|
||||
* information on determining if additional formats are supported.
|
||||
* </p>
|
||||
* <p>
|
||||
* Applications should always check for an error condition after attempting to specify
|
||||
* buffer data in case an implementation has to generate an AL_OUT_OF_MEMORY or
|
||||
* conversion related AL_INVALID_VALUE error. The application is free to reuse the
|
||||
* memory specified by the data pointer once the call to BufferData returns. The
|
||||
* implementation has to dereference, e.g. copy, the data during BufferData execution.
|
||||
* </p>
|
||||
* @param buffer Buffer to fill
|
||||
* @param format format sound data is in
|
||||
* @param data location of data
|
||||
* @param freq frequency of data
|
||||
*/
|
||||
public static void alBufferData(int buffer, int format, ByteBuffer data, int freq) {
|
||||
|
@ -939,7 +933,7 @@ public final class AL10 {
|
|||
|
||||
/**
|
||||
* The application requests deletion of a number of Sources by DeleteSources.
|
||||
* @param source Source array to delete from
|
||||
* @param sources Source array to delete from
|
||||
*/
|
||||
public static void alDeleteSources(IntBuffer sources) {
|
||||
BufferChecks.checkDirect(sources);
|
||||
|
@ -1076,7 +1070,7 @@ public final class AL10 {
|
|||
* <p>
|
||||
* A <code>null</code> name argument returns AL_FALSE, as do invalid and unsupported string
|
||||
* tokens. A <code>null</code> deviceHandle will result in an INVALID_DEVICE error.
|
||||
* </p>
|
||||
* </p>
|
||||
* @param fname String describing the desired extension
|
||||
* @return true if extension is available, false if not
|
||||
*/
|
||||
|
@ -1178,8 +1172,7 @@ public final class AL10 {
|
|||
public static native java.lang.String alGetString(int pname);
|
||||
|
||||
/**
|
||||
* Like OpenGL, AL uses a simplified interface for querying global state.
|
||||
*
|
||||
* Like OpenGL, AL uses a simplified interface for querying global state.
|
||||
* Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY,
|
||||
* AL_DISTANCE_MODEL.
|
||||
* <p>
|
||||
|
@ -1198,8 +1191,7 @@ public final class AL10 {
|
|||
private static native void nalGetFloatv(int pname, FloatBuffer data, int data_position);
|
||||
|
||||
/**
|
||||
* Like OpenGL, AL uses a simplified interface for querying global state.
|
||||
*
|
||||
* Like OpenGL, AL uses a simplified interface for querying global state.
|
||||
* Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY,
|
||||
* AL_DISTANCE_MODEL.
|
||||
* <p>
|
||||
|
@ -1218,8 +1210,7 @@ public final class AL10 {
|
|||
private static native void nalGetIntegerv(int pname, IntBuffer data, int data_position);
|
||||
|
||||
/**
|
||||
* Like OpenGL, AL uses a simplified interface for querying global state.
|
||||
*
|
||||
* Like OpenGL, AL uses a simplified interface for querying global state.
|
||||
* Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY,
|
||||
* AL_DISTANCE_MODEL.
|
||||
* <p>
|
||||
|
@ -1237,8 +1228,7 @@ public final class AL10 {
|
|||
private static native float nalGetFloat(int pname);
|
||||
|
||||
/**
|
||||
* Like OpenGL, AL uses a simplified interface for querying global state.
|
||||
*
|
||||
* Like OpenGL, AL uses a simplified interface for querying global state.
|
||||
* Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY,
|
||||
* AL_DISTANCE_MODEL.
|
||||
* <p>
|
||||
|
@ -1256,8 +1246,7 @@ public final class AL10 {
|
|||
private static native int nalGetInteger(int pname);
|
||||
|
||||
/**
|
||||
* Like OpenGL, AL uses a simplified interface for querying global state.
|
||||
*
|
||||
* Like OpenGL, AL uses a simplified interface for querying global state.
|
||||
* Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY,
|
||||
* AL_DISTANCE_MODEL.
|
||||
* <p>
|
||||
|
|
|
@ -48,8 +48,8 @@ public class ARBBufferObject {
|
|||
* way, an application will normally use glMapBufferARB like this:
|
||||
* <p/>
|
||||
* ByteBuffer mapped_buffer; mapped_buffer = glMapBufferARB(..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferARB(..., ..., ..., mapped_buffer);
|
||||
* @param size The size of the buffer area.
|
||||
* @param oldBuffer A ByteBuffer. If this argument points to the same address as the new mapping, it will be returned and no new buffer will be created. In that case, size is ignored.
|
||||
* @param result_size The size of the buffer area.
|
||||
* @param old_buffer A ByteBuffer. If this argument points to the same address as the new mapping, it will be returned and no new buffer will be created. In that case, size is ignored.
|
||||
* @return A ByteBuffer representing the mapped buffer memory.
|
||||
*/
|
||||
public static java.nio.ByteBuffer glMapBufferARB(int target, int access, int result_size, java.nio.ByteBuffer old_buffer) {
|
||||
|
@ -60,61 +60,61 @@ public class ARBBufferObject {
|
|||
}
|
||||
private static native java.nio.ByteBuffer nglMapBufferARB(int target, int access, int result_size, java.nio.ByteBuffer old_buffer);
|
||||
|
||||
public static void glGetBufferSubDataARB(int target, int offset, ShortBuffer data) {
|
||||
public static void glGetBufferSubDataARB(int target, int offset, ByteBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglGetBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1);
|
||||
nglGetBufferSubDataARB(target, offset, (data.remaining()), data, data.position());
|
||||
}
|
||||
public static void glGetBufferSubDataARB(int target, int offset, IntBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglGetBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2);
|
||||
}
|
||||
public static void glGetBufferSubDataARB(int target, int offset, ShortBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglGetBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1);
|
||||
}
|
||||
public static void glGetBufferSubDataARB(int target, int offset, FloatBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglGetBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2);
|
||||
}
|
||||
public static void glGetBufferSubDataARB(int target, int offset, ByteBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglGetBufferSubDataARB(target, offset, (data.remaining()), data, data.position());
|
||||
}
|
||||
private static native void nglGetBufferSubDataARB(int target, int offset, int size, Buffer data, int data_position);
|
||||
|
||||
public static void glBufferSubDataARB(int target, int offset, ShortBuffer data) {
|
||||
public static void glBufferSubDataARB(int target, int offset, ByteBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1);
|
||||
nglBufferSubDataARB(target, offset, (data.remaining()), data, data.position());
|
||||
}
|
||||
public static void glBufferSubDataARB(int target, int offset, IntBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2);
|
||||
}
|
||||
public static void glBufferSubDataARB(int target, int offset, ShortBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglBufferSubDataARB(target, offset, (data.remaining() << 1), data, data.position() << 1);
|
||||
}
|
||||
public static void glBufferSubDataARB(int target, int offset, FloatBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglBufferSubDataARB(target, offset, (data.remaining() << 2), data, data.position() << 2);
|
||||
}
|
||||
public static void glBufferSubDataARB(int target, int offset, ByteBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglBufferSubDataARB(target, offset, (data.remaining()), data, data.position());
|
||||
}
|
||||
private static native void nglBufferSubDataARB(int target, int offset, int size, Buffer data, int data_position);
|
||||
|
||||
public static void glBufferDataARB(int target, int size, int usage) {
|
||||
nglBufferDataARB(target, size, null, 0, usage);
|
||||
}
|
||||
public static void glBufferDataARB(int target, ShortBuffer data, int usage) {
|
||||
public static void glBufferDataARB(int target, ByteBuffer data, int usage) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglBufferDataARB(target, (data.remaining() << 1), data, data.position() << 1, usage);
|
||||
nglBufferDataARB(target, (data.remaining()), data, data.position(), usage);
|
||||
}
|
||||
public static void glBufferDataARB(int target, IntBuffer data, int usage) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglBufferDataARB(target, (data.remaining() << 2), data, data.position() << 2, usage);
|
||||
}
|
||||
public static void glBufferDataARB(int target, ShortBuffer data, int usage) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglBufferDataARB(target, (data.remaining() << 1), data, data.position() << 1, usage);
|
||||
}
|
||||
public static void glBufferDataARB(int target, FloatBuffer data, int usage) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglBufferDataARB(target, (data.remaining() << 2), data, data.position() << 2, usage);
|
||||
}
|
||||
public static void glBufferDataARB(int target, ByteBuffer data, int usage) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglBufferDataARB(target, (data.remaining()), data, data.position(), usage);
|
||||
}
|
||||
private static native void nglBufferDataARB(int target, int size, Buffer data, int data_position, int usage);
|
||||
|
||||
public static native boolean glIsBufferARB(int buffer);
|
||||
|
|
|
@ -7,14 +7,11 @@ import org.lwjgl.BufferChecks;
|
|||
import java.nio.*;
|
||||
|
||||
public final class ARBColorBufferFloat {
|
||||
public static final int GLX_RGBA_FLOAT_BIT = 0x4;
|
||||
public static final int GLX_RGBA_FLOAT_TYPE = 0x20b9;
|
||||
public static final int WGL_TYPE_RGBA_FLOAT_ARB = 0x21a0;
|
||||
public static final int FIXED_ONLY_ARB = 0x891d;
|
||||
public static final int CLAMP_READ_COLOR_ARB = 0x891c;
|
||||
public static final int CLAMP_FRAGMENT_COLOR_ARB = 0x891b;
|
||||
public static final int CLAMP_VERTEX_COLOR_ARB = 0x891a;
|
||||
public static final int RGBA_FLOAT_MODE_ARB = 0x8820;
|
||||
public static final int GL_FIXED_ONLY_ARB = 0x891d;
|
||||
public static final int GL_CLAMP_READ_COLOR_ARB = 0x891c;
|
||||
public static final int GL_CLAMP_FRAGMENT_COLOR_ARB = 0x891b;
|
||||
public static final int GL_CLAMP_VERTEX_COLOR_ARB = 0x891a;
|
||||
public static final int GL_RGBA_FLOAT_MODE_ARB = 0x8820;
|
||||
|
||||
private ARBColorBufferFloat() {
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -41,16 +41,16 @@ public final class ARBMatrixPalette {
|
|||
}
|
||||
private static native void nglMatrixIndexubvARB(int size, ByteBuffer pIndices, int pIndices_position);
|
||||
|
||||
public static void glMatrixIndexPointerARB(int size, int stride, IntBuffer pPointer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_INT, stride, pPointer, pPointer.position() << 2);
|
||||
}
|
||||
public static void glMatrixIndexPointerARB(int size, int stride, ByteBuffer pPointer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_BYTE, stride, pPointer, pPointer.position());
|
||||
}
|
||||
public static void glMatrixIndexPointerARB(int size, int stride, IntBuffer pPointer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_INT, stride, pPointer, pPointer.position() << 2);
|
||||
}
|
||||
public static void glMatrixIndexPointerARB(int size, int stride, ShortBuffer pPointer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
|
|
|
@ -24,26 +24,26 @@ public final class ARBTextureCompression {
|
|||
|
||||
static native void initNativeStubs() throws LWJGLException;
|
||||
|
||||
public static void glGetCompressedTexImageARB(int target, int lod, ShortBuffer pImg) {
|
||||
public static void glGetCompressedTexImageARB(int target, int lod, ByteBuffer pImg) {
|
||||
GLBufferChecks.ensurePackPBOdisabled();
|
||||
BufferChecks.checkDirect(pImg);
|
||||
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 1);
|
||||
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position());
|
||||
}
|
||||
public static void glGetCompressedTexImageARB(int target, int lod, IntBuffer pImg) {
|
||||
GLBufferChecks.ensurePackPBOdisabled();
|
||||
BufferChecks.checkDirect(pImg);
|
||||
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 2);
|
||||
}
|
||||
public static void glGetCompressedTexImageARB(int target, int lod, ShortBuffer pImg) {
|
||||
GLBufferChecks.ensurePackPBOdisabled();
|
||||
BufferChecks.checkDirect(pImg);
|
||||
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 1);
|
||||
}
|
||||
public static void glGetCompressedTexImageARB(int target, int lod, FloatBuffer pImg) {
|
||||
GLBufferChecks.ensurePackPBOdisabled();
|
||||
BufferChecks.checkDirect(pImg);
|
||||
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position() << 2);
|
||||
}
|
||||
public static void glGetCompressedTexImageARB(int target, int lod, ByteBuffer pImg) {
|
||||
GLBufferChecks.ensurePackPBOdisabled();
|
||||
BufferChecks.checkDirect(pImg);
|
||||
nglGetCompressedTexImageARB(target, lod, pImg, pImg.position());
|
||||
}
|
||||
private static native void nglGetCompressedTexImageARB(int target, int lod, Buffer pImg, int pImg_position);
|
||||
public static void glGetCompressedTexImageARB(int target, int lod, int pImg_buffer_offset) {
|
||||
GLBufferChecks.ensurePackPBOenabled();
|
||||
|
@ -51,26 +51,26 @@ public final class ARBTextureCompression {
|
|||
}
|
||||
private static native void nglGetCompressedTexImageARBBO(int target, int lod, int pImg_buffer_offset);
|
||||
|
||||
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ShortBuffer pData) {
|
||||
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position() << 1);
|
||||
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, IntBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ShortBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position() << 1);
|
||||
}
|
||||
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, FloatBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData, pData.position());
|
||||
}
|
||||
private static native void nglCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, Buffer pData, int pData_position);
|
||||
public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, int pData_buffer_offset) {
|
||||
GLBufferChecks.ensureUnpackPBOenabled();
|
||||
|
@ -78,26 +78,26 @@ public final class ARBTextureCompression {
|
|||
}
|
||||
private static native void nglCompressedTexSubImage3DARBBO(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, int pData_buffer_offset);
|
||||
|
||||
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ShortBuffer pData) {
|
||||
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position() << 1);
|
||||
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, IntBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ShortBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position() << 1);
|
||||
}
|
||||
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, FloatBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData, pData.position());
|
||||
}
|
||||
private static native void nglCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, Buffer pData, int pData_position);
|
||||
public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, int pData_buffer_offset) {
|
||||
GLBufferChecks.ensureUnpackPBOenabled();
|
||||
|
@ -105,26 +105,26 @@ public final class ARBTextureCompression {
|
|||
}
|
||||
private static native void nglCompressedTexSubImage2DARBBO(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, int pData_buffer_offset);
|
||||
|
||||
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, ShortBuffer pData) {
|
||||
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position() << 1);
|
||||
nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, IntBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, ShortBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position() << 1);
|
||||
}
|
||||
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, FloatBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData, pData.position());
|
||||
}
|
||||
private static native void nglCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, Buffer pData, int pData_position);
|
||||
public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int imageSize, int pData_buffer_offset) {
|
||||
GLBufferChecks.ensureUnpackPBOenabled();
|
||||
|
@ -132,26 +132,26 @@ public final class ARBTextureCompression {
|
|||
}
|
||||
private static native void nglCompressedTexSubImage1DARBBO(int target, int level, int xoffset, int width, int format, int imageSize, int pData_buffer_offset);
|
||||
|
||||
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ShortBuffer pData) {
|
||||
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 1);
|
||||
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, IntBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ShortBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 1);
|
||||
}
|
||||
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, FloatBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData, pData.position());
|
||||
}
|
||||
private static native void nglCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, Buffer pData, int pData_position);
|
||||
public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, int pData_buffer_offset) {
|
||||
GLBufferChecks.ensureUnpackPBOenabled();
|
||||
|
@ -159,26 +159,26 @@ public final class ARBTextureCompression {
|
|||
}
|
||||
private static native void nglCompressedTexImage3DARBBO(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, int pData_buffer_offset);
|
||||
|
||||
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, ShortBuffer pData) {
|
||||
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 1);
|
||||
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, IntBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, ShortBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 1);
|
||||
}
|
||||
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, FloatBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData, pData.position());
|
||||
}
|
||||
private static native void nglCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer pData, int pData_position);
|
||||
public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int imageSize, int pData_buffer_offset) {
|
||||
GLBufferChecks.ensureUnpackPBOenabled();
|
||||
|
@ -186,26 +186,26 @@ public final class ARBTextureCompression {
|
|||
}
|
||||
private static native void nglCompressedTexImage2DARBBO(int target, int level, int internalformat, int width, int height, int border, int imageSize, int pData_buffer_offset);
|
||||
|
||||
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ShortBuffer pData) {
|
||||
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 1);
|
||||
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position());
|
||||
}
|
||||
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, IntBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ShortBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 1);
|
||||
}
|
||||
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, FloatBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position() << 2);
|
||||
}
|
||||
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ByteBuffer pData) {
|
||||
GLBufferChecks.ensureUnpackPBOdisabled();
|
||||
BufferChecks.checkDirect(pData);
|
||||
nglCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData, pData.position());
|
||||
}
|
||||
private static native void nglCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, Buffer pData, int pData_position);
|
||||
public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, int pData_buffer_offset) {
|
||||
GLBufferChecks.ensureUnpackPBOenabled();
|
||||
|
|
|
@ -57,6 +57,11 @@ public final class ARBVertexBlend {
|
|||
|
||||
public static native void glVertexBlendARB(int count);
|
||||
|
||||
public static void glWeightPointerARB(int size, boolean unsigned, int stride, ByteBuffer pPointer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pPointer, pPointer.position());
|
||||
}
|
||||
public static void glWeightPointerARB(int size, boolean unsigned, int stride, IntBuffer pPointer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
|
@ -67,11 +72,6 @@ public final class ARBVertexBlend {
|
|||
BufferChecks.checkDirect(pPointer);
|
||||
nglWeightPointerARB(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position() << 2);
|
||||
}
|
||||
public static void glWeightPointerARB(int size, boolean unsigned, int stride, ByteBuffer pPointer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pPointer, pPointer.position());
|
||||
}
|
||||
public static void glWeightPointerARB(int size, boolean unsigned, int stride, ShortBuffer pPointer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
|
|
|
@ -51,6 +51,11 @@ public final class ARBVertexProgram extends ARBProgram {
|
|||
|
||||
public static native void glEnableVertexAttribArrayARB(int index);
|
||||
|
||||
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(buffer);
|
||||
nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, buffer, buffer.position());
|
||||
}
|
||||
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(buffer);
|
||||
|
@ -61,11 +66,6 @@ public final class ARBVertexProgram extends ARBProgram {
|
|||
BufferChecks.checkDirect(buffer);
|
||||
nglVertexAttribPointerARB(index, size, GL11.GL_FLOAT, normalized, stride, buffer, buffer.position() << 2);
|
||||
}
|
||||
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(buffer);
|
||||
nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, buffer, buffer.position());
|
||||
}
|
||||
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(buffer);
|
||||
|
|
|
@ -0,0 +1,402 @@
|
|||
/* MACHINE GENERATED FILE, DO NOT EDIT */
|
||||
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
import org.lwjgl.LWJGLException;
|
||||
import java.util.Set;
|
||||
|
||||
public class ContextCapabilities {
|
||||
public final boolean GL_ARB_color_buffer_float;
|
||||
public final boolean GL_ARB_depth_texture;
|
||||
public final boolean GL_ARB_draw_buffers;
|
||||
public final boolean GL_ARB_fragment_program;
|
||||
public final boolean GL_ARB_fragment_program_shadow;
|
||||
public final boolean GL_ARB_fragment_shader;
|
||||
public final boolean GL_ARB_half_float_pixel;
|
||||
public final boolean GL_ARB_imaging;
|
||||
public final boolean GL_ARB_matrix_palette;
|
||||
public final boolean GL_ARB_multisample;
|
||||
public final boolean GL_ARB_multitexture;
|
||||
public final boolean GL_ARB_occlusion_query;
|
||||
public final boolean GL_ARB_pixel_buffer_object;
|
||||
public final boolean GL_ARB_point_parameters;
|
||||
public final boolean GL_ARB_point_sprite;
|
||||
public final boolean GL_ARB_shader_objects;
|
||||
public final boolean GL_ARB_shading_language_100;
|
||||
public final boolean GL_ARB_shadow;
|
||||
public final boolean GL_ARB_shadow_ambient;
|
||||
public final boolean GL_ARB_texture_border_clamp;
|
||||
public final boolean GL_ARB_texture_compression;
|
||||
public final boolean GL_ARB_texture_cube_map;
|
||||
public final boolean GL_ARB_texture_env_add;
|
||||
public final boolean GL_ARB_texture_env_combine;
|
||||
public final boolean GL_ARB_texture_env_crossbar;
|
||||
public final boolean GL_ARB_texture_env_dot3;
|
||||
public final boolean GL_ARB_texture_float;
|
||||
public final boolean GL_ARB_texture_mirrored_repeat;
|
||||
public final boolean GL_ARB_texture_non_power_of_two;
|
||||
public final boolean GL_ARB_texture_rectangle;
|
||||
public final boolean GL_ARB_transpose_matrix;
|
||||
public final boolean GL_ARB_vertex_blend;
|
||||
public final boolean GL_ARB_vertex_buffer_object;
|
||||
public final boolean GL_ARB_vertex_program;
|
||||
public final boolean GL_ARB_vertex_shader;
|
||||
public final boolean GL_ARB_window_pos;
|
||||
public final boolean GL_ATI_draw_buffers;
|
||||
public final boolean GL_ATI_element_array;
|
||||
public final boolean GL_ATI_envmap_bumpmap;
|
||||
public final boolean GL_ATI_fragment_shader;
|
||||
public final boolean GL_ATI_map_object_buffer;
|
||||
public final boolean GL_ATI_pn_triangles;
|
||||
public final boolean GL_ATI_separate_stencil;
|
||||
public final boolean GL_ATI_texture_compression_3dc;
|
||||
public final boolean GL_ATI_texture_float;
|
||||
public final boolean GL_ATI_texture_mirror_once;
|
||||
public final boolean GL_ATI_vertex_array_object;
|
||||
public final boolean GL_ATI_vertex_attrib_array_object;
|
||||
public final boolean GL_ATI_vertex_streams;
|
||||
public final boolean GL_EXT_abgr;
|
||||
public final boolean GL_EXT_bgra;
|
||||
public final boolean GL_EXT_blend_equation_separate;
|
||||
public final boolean GL_EXT_blend_func_separate;
|
||||
public final boolean GL_EXT_blend_subtract;
|
||||
public final boolean GL_EXT_cg_shader;
|
||||
public final boolean GL_EXT_compiled_vertex_array;
|
||||
public final boolean GL_EXT_depth_bounds_test;
|
||||
public final boolean GL_EXT_draw_range_elements;
|
||||
public final boolean GL_EXT_fog_coord;
|
||||
public final boolean GL_EXT_framebuffer_object;
|
||||
public final boolean GL_EXT_multi_draw_arrays;
|
||||
public final boolean GL_EXT_packed_pixels;
|
||||
public final boolean GL_EXT_paletted_texture;
|
||||
public final boolean GL_EXT_pixel_buffer_object;
|
||||
public final boolean GL_EXT_point_parameters;
|
||||
public final boolean GL_EXT_rescale_normal;
|
||||
public final boolean GL_EXT_secondary_color;
|
||||
public final boolean GL_EXT_separate_specular_color;
|
||||
public final boolean GL_EXT_shadow_funcs;
|
||||
public final boolean GL_EXT_shared_texture_palette;
|
||||
public final boolean GL_EXT_stencil_two_side;
|
||||
public final boolean GL_EXT_stencil_wrap;
|
||||
public final boolean GL_EXT_texture_3d;
|
||||
public final boolean GL_EXT_texture_compression_s3tc;
|
||||
public final boolean GL_EXT_texture_env_combine;
|
||||
public final boolean GL_EXT_texture_env_dot3;
|
||||
public final boolean GL_EXT_texture_filter_anisotropic;
|
||||
public final boolean GL_EXT_texture_lod_bias;
|
||||
public final boolean GL_EXT_texture_mirror_clamp;
|
||||
public final boolean GL_EXT_texture_rectangle;
|
||||
public final boolean GL_EXT_vertex_shader;
|
||||
public final boolean GL_EXT_vertex_weighting;
|
||||
public final boolean OpenGL11;
|
||||
public final boolean OpenGL12;
|
||||
public final boolean OpenGL13;
|
||||
public final boolean OpenGL14;
|
||||
public final boolean OpenGL15;
|
||||
public final boolean OpenGL20;
|
||||
public final boolean GL_HP_occlusion_test;
|
||||
public final boolean GL_IBM_rasterpos_clip;
|
||||
public final boolean GL_NV_blend_square;
|
||||
public final boolean GL_NV_copy_depth_to_color;
|
||||
public final boolean GL_NV_depth_clamp;
|
||||
public final boolean GL_NV_evaluators;
|
||||
public final boolean GL_NV_fence;
|
||||
public final boolean GL_NV_float_buffer;
|
||||
public final boolean GL_NV_fog_distance;
|
||||
public final boolean GL_NV_fragment_program;
|
||||
public final boolean GL_NV_fragment_program2;
|
||||
public final boolean GL_NV_fragment_program_option;
|
||||
public final boolean GL_NV_half_float;
|
||||
public final boolean GL_NV_light_max_exponent;
|
||||
public final boolean GL_NV_multisample_filter_hint;
|
||||
public final boolean GL_NV_occlusion_query;
|
||||
public final boolean GL_NV_packed_depth_stencil;
|
||||
public final boolean GL_NV_pixel_data_range;
|
||||
public final boolean GL_NV_point_sprite;
|
||||
public final boolean GL_NV_primitive_restart;
|
||||
public final boolean GL_NV_register_combiners;
|
||||
public final boolean GL_NV_register_combiners2;
|
||||
public final boolean GL_NV_texgen_reflection;
|
||||
public final boolean GL_NV_texture_compression_vtc;
|
||||
public final boolean GL_NV_texture_env_combine4;
|
||||
public final boolean GL_NV_texture_expand_normal;
|
||||
public final boolean GL_NV_texture_rectangle;
|
||||
public final boolean GL_NV_texture_shader;
|
||||
public final boolean GL_NV_texture_shader2;
|
||||
public final boolean GL_NV_texture_shader3;
|
||||
public final boolean GL_NV_vertex_array_range;
|
||||
public final boolean GL_NV_vertex_array_range2;
|
||||
public final boolean GL_NV_vertex_program;
|
||||
public final boolean GL_NV_vertex_program1_1;
|
||||
public final boolean GL_NV_vertex_program2;
|
||||
public final boolean GL_NV_vertex_program2_option;
|
||||
public final boolean GL_NV_vertex_program3;
|
||||
public final boolean GL_SUN_slice_accum;
|
||||
|
||||
static Set initAllStubs() throws LWJGLException {
|
||||
org.lwjgl.opengl.GL11.initNativeStubs();
|
||||
Set supported_extensions = GLContext.getSupportedExtensions();
|
||||
supported_extensions.add("GL_ARB_buffer_object");
|
||||
supported_extensions.add("GL_ARB_program");
|
||||
supported_extensions.add("GL_NV_program");
|
||||
GLContext.initNativeStubs(ARBBufferObject.class, supported_extensions, "GL_ARB_buffer_object");
|
||||
GLContext.initNativeStubs(ARBColorBufferFloat.class, supported_extensions, "GL_ARB_color_buffer_float");
|
||||
GLContext.initNativeStubs(ARBDrawBuffers.class, supported_extensions, "GL_ARB_draw_buffers");
|
||||
GLContext.initNativeStubs(ARBImaging.class, supported_extensions, "GL_ARB_imaging");
|
||||
GLContext.initNativeStubs(ARBMatrixPalette.class, supported_extensions, "GL_ARB_matrix_palette");
|
||||
GLContext.initNativeStubs(ARBMultisample.class, supported_extensions, "GL_ARB_multisample");
|
||||
GLContext.initNativeStubs(ARBMultitexture.class, supported_extensions, "GL_ARB_multitexture");
|
||||
GLContext.initNativeStubs(ARBOcclusionQuery.class, supported_extensions, "GL_ARB_occlusion_query");
|
||||
GLContext.initNativeStubs(ARBPointParameters.class, supported_extensions, "GL_ARB_point_parameters");
|
||||
GLContext.initNativeStubs(ARBProgram.class, supported_extensions, "GL_ARB_program");
|
||||
GLContext.initNativeStubs(ARBShaderObjects.class, supported_extensions, "GL_ARB_shader_objects");
|
||||
GLContext.initNativeStubs(ARBTextureCompression.class, supported_extensions, "GL_ARB_texture_compression");
|
||||
GLContext.initNativeStubs(ARBTransposeMatrix.class, supported_extensions, "GL_ARB_transpose_matrix");
|
||||
GLContext.initNativeStubs(ARBVertexBlend.class, supported_extensions, "GL_ARB_vertex_blend");
|
||||
GLContext.initNativeStubs(ARBVertexProgram.class, supported_extensions, "GL_ARB_vertex_program");
|
||||
GLContext.initNativeStubs(ARBVertexShader.class, supported_extensions, "GL_ARB_vertex_shader");
|
||||
GLContext.initNativeStubs(ARBWindowPos.class, supported_extensions, "GL_ARB_window_pos");
|
||||
GLContext.initNativeStubs(ATIDrawBuffers.class, supported_extensions, "GL_ATI_draw_buffers");
|
||||
GLContext.initNativeStubs(ATIElementArray.class, supported_extensions, "GL_ATI_element_array");
|
||||
GLContext.initNativeStubs(ATIEnvmapBumpmap.class, supported_extensions, "GL_ATI_envmap_bumpmap");
|
||||
GLContext.initNativeStubs(ATIFragmentShader.class, supported_extensions, "GL_ATI_fragment_shader");
|
||||
GLContext.initNativeStubs(ATIMapObjectBuffer.class, supported_extensions, "GL_ATI_map_object_buffer");
|
||||
GLContext.initNativeStubs(ATIPnTriangles.class, supported_extensions, "GL_ATI_pn_triangles");
|
||||
GLContext.initNativeStubs(ATISeparateStencil.class, supported_extensions, "GL_ATI_separate_stencil");
|
||||
GLContext.initNativeStubs(ATIVertexArrayObject.class, supported_extensions, "GL_ATI_vertex_array_object");
|
||||
GLContext.initNativeStubs(ATIVertexAttribArrayObject.class, supported_extensions, "GL_ATI_vertex_attrib_array_object");
|
||||
GLContext.initNativeStubs(ATIVertexStreams.class, supported_extensions, "GL_ATI_vertex_streams");
|
||||
GLContext.initNativeStubs(EXTBlendEquationSeparate.class, supported_extensions, "GL_EXT_blend_equation_separate");
|
||||
GLContext.initNativeStubs(EXTBlendFuncSeparate.class, supported_extensions, "GL_EXT_blend_func_separate");
|
||||
GLContext.initNativeStubs(EXTCompiledVertexArray.class, supported_extensions, "GL_EXT_compiled_vertex_array");
|
||||
GLContext.initNativeStubs(EXTDepthBoundsTest.class, supported_extensions, "GL_EXT_depth_bounds_test");
|
||||
GLContext.initNativeStubs(EXTDrawRangeElements.class, supported_extensions, "GL_EXT_draw_range_elements");
|
||||
GLContext.initNativeStubs(EXTFogCoord.class, supported_extensions, "GL_EXT_fog_coord");
|
||||
GLContext.initNativeStubs(EXTFramebufferObject.class, supported_extensions, "GL_EXT_framebuffer_object");
|
||||
GLContext.initNativeStubs(EXTMultiDrawArrays.class, supported_extensions, "GL_EXT_multi_draw_arrays");
|
||||
GLContext.initNativeStubs(EXTPalettedTexture.class, supported_extensions, "GL_EXT_paletted_texture");
|
||||
GLContext.initNativeStubs(EXTPointParameters.class, supported_extensions, "GL_EXT_point_parameters");
|
||||
GLContext.initNativeStubs(EXTSecondaryColor.class, supported_extensions, "GL_EXT_secondary_color");
|
||||
GLContext.initNativeStubs(EXTStencilTwoSide.class, supported_extensions, "GL_EXT_stencil_two_side");
|
||||
GLContext.initNativeStubs(EXTVertexShader.class, supported_extensions, "GL_EXT_vertex_shader");
|
||||
GLContext.initNativeStubs(EXTVertexWeighting.class, supported_extensions, "GL_EXT_vertex_weighting");
|
||||
GLContext.initNativeStubs(GL12.class, supported_extensions, "OpenGL12");
|
||||
GLContext.initNativeStubs(GL13.class, supported_extensions, "OpenGL13");
|
||||
GLContext.initNativeStubs(GL14.class, supported_extensions, "OpenGL14");
|
||||
GLContext.initNativeStubs(GL15.class, supported_extensions, "OpenGL15");
|
||||
GLContext.initNativeStubs(GL20.class, supported_extensions, "OpenGL20");
|
||||
GLContext.initNativeStubs(NVEvaluators.class, supported_extensions, "GL_NV_evaluators");
|
||||
GLContext.initNativeStubs(NVFence.class, supported_extensions, "GL_NV_fence");
|
||||
GLContext.initNativeStubs(NVFragmentProgram.class, supported_extensions, "GL_NV_fragment_program");
|
||||
GLContext.initNativeStubs(NVHalfFloat.class, supported_extensions, "GL_NV_half_float");
|
||||
GLContext.initNativeStubs(NVOcclusionQuery.class, supported_extensions, "GL_NV_occlusion_query");
|
||||
GLContext.initNativeStubs(NVPixelDataRange.class, supported_extensions, "GL_NV_pixel_data_range");
|
||||
GLContext.initNativeStubs(NVPointSprite.class, supported_extensions, "GL_NV_point_sprite");
|
||||
GLContext.initNativeStubs(NVPrimitiveRestart.class, supported_extensions, "GL_NV_primitive_restart");
|
||||
GLContext.initNativeStubs(NVProgram.class, supported_extensions, "GL_NV_program");
|
||||
GLContext.initNativeStubs(NVRegisterCombiners.class, supported_extensions, "GL_NV_register_combiners");
|
||||
GLContext.initNativeStubs(NVRegisterCombiners2.class, supported_extensions, "GL_NV_register_combiners2");
|
||||
GLContext.initNativeStubs(NVVertexArrayRange.class, supported_extensions, "GL_NV_vertex_array_range");
|
||||
GLContext.initNativeStubs(NVVertexProgram.class, supported_extensions, "GL_NV_vertex_program");
|
||||
return supported_extensions;
|
||||
}
|
||||
|
||||
static void unloadAllStubs() {
|
||||
GLContext.resetNativeStubs(ARBBufferObject.class);
|
||||
GLContext.resetNativeStubs(ARBColorBufferFloat.class);
|
||||
GLContext.resetNativeStubs(ARBDrawBuffers.class);
|
||||
GLContext.resetNativeStubs(ARBImaging.class);
|
||||
GLContext.resetNativeStubs(ARBMatrixPalette.class);
|
||||
GLContext.resetNativeStubs(ARBMultisample.class);
|
||||
GLContext.resetNativeStubs(ARBMultitexture.class);
|
||||
GLContext.resetNativeStubs(ARBOcclusionQuery.class);
|
||||
GLContext.resetNativeStubs(ARBPointParameters.class);
|
||||
GLContext.resetNativeStubs(ARBProgram.class);
|
||||
GLContext.resetNativeStubs(ARBShaderObjects.class);
|
||||
GLContext.resetNativeStubs(ARBTextureCompression.class);
|
||||
GLContext.resetNativeStubs(ARBTransposeMatrix.class);
|
||||
GLContext.resetNativeStubs(ARBVertexBlend.class);
|
||||
GLContext.resetNativeStubs(ARBVertexProgram.class);
|
||||
GLContext.resetNativeStubs(ARBVertexShader.class);
|
||||
GLContext.resetNativeStubs(ARBWindowPos.class);
|
||||
GLContext.resetNativeStubs(ATIDrawBuffers.class);
|
||||
GLContext.resetNativeStubs(ATIElementArray.class);
|
||||
GLContext.resetNativeStubs(ATIEnvmapBumpmap.class);
|
||||
GLContext.resetNativeStubs(ATIFragmentShader.class);
|
||||
GLContext.resetNativeStubs(ATIMapObjectBuffer.class);
|
||||
GLContext.resetNativeStubs(ATIPnTriangles.class);
|
||||
GLContext.resetNativeStubs(ATISeparateStencil.class);
|
||||
GLContext.resetNativeStubs(ATIVertexArrayObject.class);
|
||||
GLContext.resetNativeStubs(ATIVertexAttribArrayObject.class);
|
||||
GLContext.resetNativeStubs(ATIVertexStreams.class);
|
||||
GLContext.resetNativeStubs(EXTBlendEquationSeparate.class);
|
||||
GLContext.resetNativeStubs(EXTBlendFuncSeparate.class);
|
||||
GLContext.resetNativeStubs(EXTCompiledVertexArray.class);
|
||||
GLContext.resetNativeStubs(EXTDepthBoundsTest.class);
|
||||
GLContext.resetNativeStubs(EXTDrawRangeElements.class);
|
||||
GLContext.resetNativeStubs(EXTFogCoord.class);
|
||||
GLContext.resetNativeStubs(EXTFramebufferObject.class);
|
||||
GLContext.resetNativeStubs(EXTMultiDrawArrays.class);
|
||||
GLContext.resetNativeStubs(EXTPalettedTexture.class);
|
||||
GLContext.resetNativeStubs(EXTPointParameters.class);
|
||||
GLContext.resetNativeStubs(EXTSecondaryColor.class);
|
||||
GLContext.resetNativeStubs(EXTStencilTwoSide.class);
|
||||
GLContext.resetNativeStubs(EXTVertexShader.class);
|
||||
GLContext.resetNativeStubs(EXTVertexWeighting.class);
|
||||
GLContext.resetNativeStubs(GL11.class);
|
||||
GLContext.resetNativeStubs(GL12.class);
|
||||
GLContext.resetNativeStubs(GL13.class);
|
||||
GLContext.resetNativeStubs(GL14.class);
|
||||
GLContext.resetNativeStubs(GL15.class);
|
||||
GLContext.resetNativeStubs(GL20.class);
|
||||
GLContext.resetNativeStubs(NVEvaluators.class);
|
||||
GLContext.resetNativeStubs(NVFence.class);
|
||||
GLContext.resetNativeStubs(NVFragmentProgram.class);
|
||||
GLContext.resetNativeStubs(NVHalfFloat.class);
|
||||
GLContext.resetNativeStubs(NVOcclusionQuery.class);
|
||||
GLContext.resetNativeStubs(NVPixelDataRange.class);
|
||||
GLContext.resetNativeStubs(NVPointSprite.class);
|
||||
GLContext.resetNativeStubs(NVPrimitiveRestart.class);
|
||||
GLContext.resetNativeStubs(NVProgram.class);
|
||||
GLContext.resetNativeStubs(NVRegisterCombiners.class);
|
||||
GLContext.resetNativeStubs(NVRegisterCombiners2.class);
|
||||
GLContext.resetNativeStubs(NVVertexArrayRange.class);
|
||||
GLContext.resetNativeStubs(NVVertexProgram.class);
|
||||
}
|
||||
|
||||
ContextCapabilities(Set supported_extensions) {
|
||||
this.GL_ARB_color_buffer_float = supported_extensions.contains("GL_ARB_color_buffer_float");
|
||||
this.GL_ARB_depth_texture = supported_extensions.contains("GL_ARB_depth_texture");
|
||||
this.GL_ARB_draw_buffers = supported_extensions.contains("GL_ARB_draw_buffers");
|
||||
this.GL_ARB_fragment_program = supported_extensions.contains("GL_ARB_fragment_program")
|
||||
&& supported_extensions.contains("GL_ARB_program");
|
||||
this.GL_ARB_fragment_program_shadow = supported_extensions.contains("GL_ARB_fragment_program_shadow");
|
||||
this.GL_ARB_fragment_shader = supported_extensions.contains("GL_ARB_fragment_shader");
|
||||
this.GL_ARB_half_float_pixel = supported_extensions.contains("GL_ARB_half_float_pixel");
|
||||
this.GL_ARB_imaging = supported_extensions.contains("GL_ARB_imaging");
|
||||
this.GL_ARB_matrix_palette = supported_extensions.contains("GL_ARB_matrix_palette");
|
||||
this.GL_ARB_multisample = supported_extensions.contains("GL_ARB_multisample");
|
||||
this.GL_ARB_multitexture = supported_extensions.contains("GL_ARB_multitexture");
|
||||
this.GL_ARB_occlusion_query = supported_extensions.contains("GL_ARB_occlusion_query");
|
||||
this.GL_ARB_pixel_buffer_object = supported_extensions.contains("GL_ARB_pixel_buffer_object")
|
||||
&& supported_extensions.contains("GL_ARB_buffer_object");
|
||||
this.GL_ARB_point_parameters = supported_extensions.contains("GL_ARB_point_parameters");
|
||||
this.GL_ARB_point_sprite = supported_extensions.contains("GL_ARB_point_sprite");
|
||||
this.GL_ARB_shader_objects = supported_extensions.contains("GL_ARB_shader_objects");
|
||||
this.GL_ARB_shading_language_100 = supported_extensions.contains("GL_ARB_shading_language_100");
|
||||
this.GL_ARB_shadow = supported_extensions.contains("GL_ARB_shadow");
|
||||
this.GL_ARB_shadow_ambient = supported_extensions.contains("GL_ARB_shadow_ambient");
|
||||
this.GL_ARB_texture_border_clamp = supported_extensions.contains("GL_ARB_texture_border_clamp");
|
||||
this.GL_ARB_texture_compression = supported_extensions.contains("GL_ARB_texture_compression");
|
||||
this.GL_ARB_texture_cube_map = supported_extensions.contains("GL_ARB_texture_cube_map");
|
||||
this.GL_ARB_texture_env_add = supported_extensions.contains("GL_ARB_texture_env_add");
|
||||
this.GL_ARB_texture_env_combine = supported_extensions.contains("GL_ARB_texture_env_combine");
|
||||
this.GL_ARB_texture_env_crossbar = supported_extensions.contains("GL_ARB_texture_env_crossbar");
|
||||
this.GL_ARB_texture_env_dot3 = supported_extensions.contains("GL_ARB_texture_env_dot3");
|
||||
this.GL_ARB_texture_float = supported_extensions.contains("GL_ARB_texture_float");
|
||||
this.GL_ARB_texture_mirrored_repeat = supported_extensions.contains("GL_ARB_texture_mirrored_repeat");
|
||||
this.GL_ARB_texture_non_power_of_two = supported_extensions.contains("GL_ARB_texture_non_power_of_two");
|
||||
this.GL_ARB_texture_rectangle = supported_extensions.contains("GL_ARB_texture_rectangle");
|
||||
this.GL_ARB_transpose_matrix = supported_extensions.contains("GL_ARB_transpose_matrix");
|
||||
this.GL_ARB_vertex_blend = supported_extensions.contains("GL_ARB_vertex_blend");
|
||||
this.GL_ARB_vertex_buffer_object = supported_extensions.contains("GL_ARB_vertex_buffer_object")
|
||||
&& supported_extensions.contains("GL_ARB_buffer_object");
|
||||
this.GL_ARB_vertex_program = supported_extensions.contains("GL_ARB_vertex_program")
|
||||
&& supported_extensions.contains("GL_ARB_program");
|
||||
this.GL_ARB_vertex_shader = supported_extensions.contains("GL_ARB_vertex_shader");
|
||||
this.GL_ARB_window_pos = supported_extensions.contains("GL_ARB_window_pos");
|
||||
this.GL_ATI_draw_buffers = supported_extensions.contains("GL_ATI_draw_buffers");
|
||||
this.GL_ATI_element_array = supported_extensions.contains("GL_ATI_element_array");
|
||||
this.GL_ATI_envmap_bumpmap = supported_extensions.contains("GL_ATI_envmap_bumpmap");
|
||||
this.GL_ATI_fragment_shader = supported_extensions.contains("GL_ATI_fragment_shader");
|
||||
this.GL_ATI_map_object_buffer = supported_extensions.contains("GL_ATI_map_object_buffer");
|
||||
this.GL_ATI_pn_triangles = supported_extensions.contains("GL_ATI_pn_triangles");
|
||||
this.GL_ATI_separate_stencil = supported_extensions.contains("GL_ATI_separate_stencil");
|
||||
this.GL_ATI_texture_compression_3dc = supported_extensions.contains("GL_ATI_texture_compression_3dc");
|
||||
this.GL_ATI_texture_float = supported_extensions.contains("GL_ATI_texture_float");
|
||||
this.GL_ATI_texture_mirror_once = supported_extensions.contains("GL_ATI_texture_mirror_once");
|
||||
this.GL_ATI_vertex_array_object = supported_extensions.contains("GL_ATI_vertex_array_object");
|
||||
this.GL_ATI_vertex_attrib_array_object = supported_extensions.contains("GL_ATI_vertex_attrib_array_object");
|
||||
this.GL_ATI_vertex_streams = supported_extensions.contains("GL_ATI_vertex_streams");
|
||||
this.GL_EXT_abgr = supported_extensions.contains("GL_EXT_abgr");
|
||||
this.GL_EXT_bgra = supported_extensions.contains("GL_EXT_bgra");
|
||||
this.GL_EXT_blend_equation_separate = supported_extensions.contains("GL_EXT_blend_equation_separate");
|
||||
this.GL_EXT_blend_func_separate = supported_extensions.contains("GL_EXT_blend_func_separate");
|
||||
this.GL_EXT_blend_subtract = supported_extensions.contains("GL_EXT_blend_subtract");
|
||||
this.GL_EXT_cg_shader = supported_extensions.contains("GL_EXT_cg_shader");
|
||||
this.GL_EXT_compiled_vertex_array = supported_extensions.contains("GL_EXT_compiled_vertex_array");
|
||||
this.GL_EXT_depth_bounds_test = supported_extensions.contains("GL_EXT_depth_bounds_test");
|
||||
this.GL_EXT_draw_range_elements = supported_extensions.contains("GL_EXT_draw_range_elements");
|
||||
this.GL_EXT_fog_coord = supported_extensions.contains("GL_EXT_fog_coord");
|
||||
this.GL_EXT_framebuffer_object = supported_extensions.contains("GL_EXT_framebuffer_object");
|
||||
this.GL_EXT_multi_draw_arrays = supported_extensions.contains("GL_EXT_multi_draw_arrays");
|
||||
this.GL_EXT_packed_pixels = supported_extensions.contains("GL_EXT_packed_pixels");
|
||||
this.GL_EXT_paletted_texture = supported_extensions.contains("GL_EXT_paletted_texture");
|
||||
this.GL_EXT_pixel_buffer_object = supported_extensions.contains("GL_EXT_pixel_buffer_object")
|
||||
&& supported_extensions.contains("GL_ARB_buffer_object");
|
||||
this.GL_EXT_point_parameters = supported_extensions.contains("GL_EXT_point_parameters");
|
||||
this.GL_EXT_rescale_normal = supported_extensions.contains("GL_EXT_rescale_normal");
|
||||
this.GL_EXT_secondary_color = supported_extensions.contains("GL_EXT_secondary_color");
|
||||
this.GL_EXT_separate_specular_color = supported_extensions.contains("GL_EXT_separate_specular_color");
|
||||
this.GL_EXT_shadow_funcs = supported_extensions.contains("GL_EXT_shadow_funcs");
|
||||
this.GL_EXT_shared_texture_palette = supported_extensions.contains("GL_EXT_shared_texture_palette");
|
||||
this.GL_EXT_stencil_two_side = supported_extensions.contains("GL_EXT_stencil_two_side");
|
||||
this.GL_EXT_stencil_wrap = supported_extensions.contains("GL_EXT_stencil_wrap");
|
||||
this.GL_EXT_texture_3d = supported_extensions.contains("GL_EXT_texture_3d");
|
||||
this.GL_EXT_texture_compression_s3tc = supported_extensions.contains("GL_EXT_texture_compression_s3tc");
|
||||
this.GL_EXT_texture_env_combine = supported_extensions.contains("GL_EXT_texture_env_combine");
|
||||
this.GL_EXT_texture_env_dot3 = supported_extensions.contains("GL_EXT_texture_env_dot3");
|
||||
this.GL_EXT_texture_filter_anisotropic = supported_extensions.contains("GL_EXT_texture_filter_anisotropic");
|
||||
this.GL_EXT_texture_lod_bias = supported_extensions.contains("GL_EXT_texture_lod_bias");
|
||||
this.GL_EXT_texture_mirror_clamp = supported_extensions.contains("GL_EXT_texture_mirror_clamp");
|
||||
this.GL_EXT_texture_rectangle = supported_extensions.contains("GL_EXT_texture_rectangle");
|
||||
this.GL_EXT_vertex_shader = supported_extensions.contains("GL_EXT_vertex_shader");
|
||||
this.GL_EXT_vertex_weighting = supported_extensions.contains("GL_EXT_vertex_weighting");
|
||||
this.OpenGL11 = supported_extensions.contains("OpenGL11");
|
||||
this.OpenGL12 = supported_extensions.contains("OpenGL12");
|
||||
this.OpenGL13 = supported_extensions.contains("OpenGL13");
|
||||
this.OpenGL14 = supported_extensions.contains("OpenGL14");
|
||||
this.OpenGL15 = supported_extensions.contains("OpenGL15");
|
||||
this.OpenGL20 = supported_extensions.contains("OpenGL20");
|
||||
this.GL_HP_occlusion_test = supported_extensions.contains("GL_HP_occlusion_test");
|
||||
this.GL_IBM_rasterpos_clip = supported_extensions.contains("GL_IBM_rasterpos_clip");
|
||||
this.GL_NV_blend_square = supported_extensions.contains("GL_NV_blend_square");
|
||||
this.GL_NV_copy_depth_to_color = supported_extensions.contains("GL_NV_copy_depth_to_color");
|
||||
this.GL_NV_depth_clamp = supported_extensions.contains("GL_NV_depth_clamp");
|
||||
this.GL_NV_evaluators = supported_extensions.contains("GL_NV_evaluators");
|
||||
this.GL_NV_fence = supported_extensions.contains("GL_NV_fence");
|
||||
this.GL_NV_float_buffer = supported_extensions.contains("GL_NV_float_buffer");
|
||||
this.GL_NV_fog_distance = supported_extensions.contains("GL_NV_fog_distance");
|
||||
this.GL_NV_fragment_program = supported_extensions.contains("GL_NV_fragment_program")
|
||||
&& supported_extensions.contains("GL_NV_program");
|
||||
this.GL_NV_fragment_program2 = supported_extensions.contains("GL_NV_fragment_program2");
|
||||
this.GL_NV_fragment_program_option = supported_extensions.contains("GL_NV_fragment_program_option");
|
||||
this.GL_NV_half_float = supported_extensions.contains("GL_NV_half_float");
|
||||
this.GL_NV_light_max_exponent = supported_extensions.contains("GL_NV_light_max_exponent");
|
||||
this.GL_NV_multisample_filter_hint = supported_extensions.contains("GL_NV_multisample_filter_hint");
|
||||
this.GL_NV_occlusion_query = supported_extensions.contains("GL_NV_occlusion_query");
|
||||
this.GL_NV_packed_depth_stencil = supported_extensions.contains("GL_NV_packed_depth_stencil");
|
||||
this.GL_NV_pixel_data_range = supported_extensions.contains("GL_NV_pixel_data_range");
|
||||
this.GL_NV_point_sprite = supported_extensions.contains("GL_NV_point_sprite");
|
||||
this.GL_NV_primitive_restart = supported_extensions.contains("GL_NV_primitive_restart");
|
||||
this.GL_NV_register_combiners = supported_extensions.contains("GL_NV_register_combiners");
|
||||
this.GL_NV_register_combiners2 = supported_extensions.contains("GL_NV_register_combiners2");
|
||||
this.GL_NV_texgen_reflection = supported_extensions.contains("GL_NV_texgen_reflection");
|
||||
this.GL_NV_texture_compression_vtc = supported_extensions.contains("GL_NV_texture_compression_vtc");
|
||||
this.GL_NV_texture_env_combine4 = supported_extensions.contains("GL_NV_texture_env_combine4");
|
||||
this.GL_NV_texture_expand_normal = supported_extensions.contains("GL_NV_texture_expand_normal");
|
||||
this.GL_NV_texture_rectangle = supported_extensions.contains("GL_NV_texture_rectangle");
|
||||
this.GL_NV_texture_shader = supported_extensions.contains("GL_NV_texture_shader");
|
||||
this.GL_NV_texture_shader2 = supported_extensions.contains("GL_NV_texture_shader2");
|
||||
this.GL_NV_texture_shader3 = supported_extensions.contains("GL_NV_texture_shader3");
|
||||
this.GL_NV_vertex_array_range = supported_extensions.contains("GL_NV_vertex_array_range");
|
||||
this.GL_NV_vertex_array_range2 = supported_extensions.contains("GL_NV_vertex_array_range2");
|
||||
this.GL_NV_vertex_program = supported_extensions.contains("GL_NV_vertex_program")
|
||||
&& supported_extensions.contains("GL_NV_program");
|
||||
this.GL_NV_vertex_program1_1 = supported_extensions.contains("GL_NV_vertex_program1_1");
|
||||
this.GL_NV_vertex_program2 = supported_extensions.contains("GL_NV_vertex_program2");
|
||||
this.GL_NV_vertex_program2_option = supported_extensions.contains("GL_NV_vertex_program2_option");
|
||||
this.GL_NV_vertex_program3 = supported_extensions.contains("GL_NV_vertex_program3");
|
||||
this.GL_SUN_slice_accum = supported_extensions.contains("GL_SUN_slice_accum");
|
||||
}
|
||||
}
|
|
@ -7,8 +7,8 @@ import org.lwjgl.BufferChecks;
|
|||
import java.nio.*;
|
||||
|
||||
public final class EXTDepthBoundsTest {
|
||||
public static final int DEPTH_BOUNDS_EXT = 0x8891;
|
||||
public static final int DEPTH_BOUNDS_TEST_EXT = 0x8890;
|
||||
public static final int GL_DEPTH_BOUNDS_EXT = 0x8891;
|
||||
public static final int GL_DEPTH_BOUNDS_TEST_EXT = 0x8890;
|
||||
|
||||
private EXTDepthBoundsTest() {
|
||||
}
|
||||
|
|
|
@ -15,16 +15,16 @@ public final class EXTDrawRangeElements {
|
|||
|
||||
static native void initNativeStubs() throws LWJGLException;
|
||||
|
||||
public static void glDrawRangeElementsEXT(int mode, int start, int end, IntBuffer pIndices) {
|
||||
GLBufferChecks.ensureElementVBOdisabled();
|
||||
BufferChecks.checkDirect(pIndices);
|
||||
nglDrawRangeElementsEXT(mode, start, end, (pIndices.remaining()), GL11.GL_UNSIGNED_INT, pIndices, pIndices.position() << 2);
|
||||
}
|
||||
public static void glDrawRangeElementsEXT(int mode, int start, int end, ShortBuffer pIndices) {
|
||||
GLBufferChecks.ensureElementVBOdisabled();
|
||||
BufferChecks.checkDirect(pIndices);
|
||||
nglDrawRangeElementsEXT(mode, start, end, (pIndices.remaining()), GL11.GL_UNSIGNED_SHORT, pIndices, pIndices.position() << 1);
|
||||
}
|
||||
public static void glDrawRangeElementsEXT(int mode, int start, int end, IntBuffer pIndices) {
|
||||
GLBufferChecks.ensureElementVBOdisabled();
|
||||
BufferChecks.checkDirect(pIndices);
|
||||
nglDrawRangeElementsEXT(mode, start, end, (pIndices.remaining()), GL11.GL_UNSIGNED_INT, pIndices, pIndices.position() << 2);
|
||||
}
|
||||
public static void glDrawRangeElementsEXT(int mode, int start, int end, ByteBuffer pIndices) {
|
||||
GLBufferChecks.ensureElementVBOdisabled();
|
||||
BufferChecks.checkDirect(pIndices);
|
||||
|
|
|
@ -40,14 +40,6 @@ public final class EXTPalettedTexture {
|
|||
}
|
||||
private static native void nglGetColorTableParameterivEXT(int target, int pname, IntBuffer params, int params_position);
|
||||
|
||||
public static void glGetColorTableEXT(int target, int format, int type, ShortBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglGetColorTableEXT(target, format, type, data, data.position() << 1);
|
||||
}
|
||||
public static void glGetColorTableEXT(int target, int format, int type, FloatBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglGetColorTableEXT(target, format, type, data, data.position() << 2);
|
||||
}
|
||||
public static void glGetColorTableEXT(int target, int format, int type, ByteBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglGetColorTableEXT(target, format, type, data, data.position());
|
||||
|
@ -56,16 +48,16 @@ public final class EXTPalettedTexture {
|
|||
BufferChecks.checkDirect(data);
|
||||
nglGetColorTableEXT(target, format, type, data, data.position() << 2);
|
||||
}
|
||||
public static void glGetColorTableEXT(int target, int format, int type, ShortBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglGetColorTableEXT(target, format, type, data, data.position() << 1);
|
||||
}
|
||||
public static void glGetColorTableEXT(int target, int format, int type, FloatBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglGetColorTableEXT(target, format, type, data, data.position() << 2);
|
||||
}
|
||||
private static native void nglGetColorTableEXT(int target, int format, int type, Buffer data, int data_position);
|
||||
|
||||
public static void glColorSubTableEXT(int target, int start, int count, int format, int type, ShortBuffer data) {
|
||||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1));
|
||||
nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 1);
|
||||
}
|
||||
public static void glColorSubTableEXT(int target, int start, int count, int format, int type, FloatBuffer data) {
|
||||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1));
|
||||
nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 2);
|
||||
}
|
||||
public static void glColorSubTableEXT(int target, int start, int count, int format, int type, ByteBuffer data) {
|
||||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1));
|
||||
nglColorSubTableEXT(target, start, count, format, type, data, data.position());
|
||||
|
@ -74,16 +66,16 @@ public final class EXTPalettedTexture {
|
|||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1));
|
||||
nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 2);
|
||||
}
|
||||
public static void glColorSubTableEXT(int target, int start, int count, int format, int type, ShortBuffer data) {
|
||||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1));
|
||||
nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 1);
|
||||
}
|
||||
public static void glColorSubTableEXT(int target, int start, int count, int format, int type, FloatBuffer data) {
|
||||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, count, 1, 1));
|
||||
nglColorSubTableEXT(target, start, count, format, type, data, data.position() << 2);
|
||||
}
|
||||
private static native void nglColorSubTableEXT(int target, int start, int count, int format, int type, Buffer data, int data_position);
|
||||
|
||||
public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, ShortBuffer data) {
|
||||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1));
|
||||
nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 1);
|
||||
}
|
||||
public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, FloatBuffer data) {
|
||||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1));
|
||||
nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 2);
|
||||
}
|
||||
public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, ByteBuffer data) {
|
||||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1));
|
||||
nglColorTableEXT(target, internalFormat, width, format, type, data, data.position());
|
||||
|
@ -92,5 +84,13 @@ public final class EXTPalettedTexture {
|
|||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1));
|
||||
nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 2);
|
||||
}
|
||||
public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, ShortBuffer data) {
|
||||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1));
|
||||
nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 1);
|
||||
}
|
||||
public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, FloatBuffer data) {
|
||||
BufferChecks.checkBuffer(data, GLBufferChecks.calculateImageStorage(data, format, type, width, 1, 1));
|
||||
nglColorTableEXT(target, internalFormat, width, format, type, data, data.position() << 2);
|
||||
}
|
||||
private static native void nglColorTableEXT(int target, int internalFormat, int width, int format, int type, Buffer data, int data_position);
|
||||
}
|
||||
|
|
|
@ -199,20 +199,20 @@ public final class EXTVertexShader {
|
|||
|
||||
public static native void glEnableVariantClientStateEXT(int id);
|
||||
|
||||
public static void glVariantPointerEXT(int id, int stride, FloatBuffer pAddr) {
|
||||
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ShortBuffer pAddr) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(pAddr);
|
||||
nglVariantPointerEXT(id, GL11.GL_FLOAT, stride, pAddr, pAddr.position() << 2);
|
||||
nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pAddr, pAddr.position() << 1);
|
||||
}
|
||||
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, IntBuffer pAddr) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(pAddr);
|
||||
nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, pAddr, pAddr.position() << 2);
|
||||
}
|
||||
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ShortBuffer pAddr) {
|
||||
public static void glVariantPointerEXT(int id, int stride, FloatBuffer pAddr) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(pAddr);
|
||||
nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pAddr, pAddr.position() << 1);
|
||||
nglVariantPointerEXT(id, GL11.GL_FLOAT, stride, pAddr, pAddr.position() << 2);
|
||||
}
|
||||
public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ByteBuffer pAddr) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
|
@ -268,17 +268,17 @@ public final class EXTVertexShader {
|
|||
}
|
||||
private static native void nglVariantbvEXT(int id, ByteBuffer pAddr, int pAddr_position);
|
||||
|
||||
public static void glSetLocalConstantEXT(int id, FloatBuffer pAddr) {
|
||||
public static void glSetLocalConstantEXT(int id, boolean unsigned, ShortBuffer pAddr) {
|
||||
BufferChecks.checkBuffer(pAddr, 4);
|
||||
nglSetLocalConstantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2);
|
||||
nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1);
|
||||
}
|
||||
public static void glSetLocalConstantEXT(int id, boolean unsigned, IntBuffer pAddr) {
|
||||
BufferChecks.checkBuffer(pAddr, 4);
|
||||
nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position() << 2);
|
||||
}
|
||||
public static void glSetLocalConstantEXT(int id, boolean unsigned, ShortBuffer pAddr) {
|
||||
public static void glSetLocalConstantEXT(int id, FloatBuffer pAddr) {
|
||||
BufferChecks.checkBuffer(pAddr, 4);
|
||||
nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1);
|
||||
nglSetLocalConstantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2);
|
||||
}
|
||||
public static void glSetLocalConstantEXT(int id, boolean unsigned, ByteBuffer pAddr) {
|
||||
BufferChecks.checkBuffer(pAddr, 4);
|
||||
|
@ -286,17 +286,17 @@ public final class EXTVertexShader {
|
|||
}
|
||||
private static native void nglSetLocalConstantEXT(int id, int type, Buffer pAddr, int pAddr_position);
|
||||
|
||||
public static void glSetInvariantEXT(int id, FloatBuffer pAddr) {
|
||||
public static void glSetInvariantEXT(int id, boolean unsigned, ShortBuffer pAddr) {
|
||||
BufferChecks.checkBuffer(pAddr, 4);
|
||||
nglSetInvariantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2);
|
||||
nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1);
|
||||
}
|
||||
public static void glSetInvariantEXT(int id, boolean unsigned, IntBuffer pAddr) {
|
||||
BufferChecks.checkBuffer(pAddr, 4);
|
||||
nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position() << 2);
|
||||
}
|
||||
public static void glSetInvariantEXT(int id, boolean unsigned, ShortBuffer pAddr) {
|
||||
public static void glSetInvariantEXT(int id, FloatBuffer pAddr) {
|
||||
BufferChecks.checkBuffer(pAddr, 4);
|
||||
nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1);
|
||||
nglSetInvariantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2);
|
||||
}
|
||||
public static void glSetInvariantEXT(int id, boolean unsigned, ByteBuffer pAddr) {
|
||||
BufferChecks.checkBuffer(pAddr, 4);
|
||||
|
|
|
@ -51,149 +51,9 @@ import java.util.*;
|
|||
* @version $Revision$
|
||||
*/
|
||||
public final class GLContext {
|
||||
|
||||
/** The currently initialised context */
|
||||
private static WeakReference currentContext;
|
||||
|
||||
/*
|
||||
* Available extensions
|
||||
*/
|
||||
public static boolean GL_ARB_color_buffer_float;
|
||||
public static boolean GL_ARB_depth_texture;
|
||||
public static boolean GL_ARB_draw_buffers;
|
||||
public static boolean GL_ARB_fragment_program;
|
||||
public static boolean GL_ARB_fragment_program_shadow;
|
||||
public static boolean GL_ARB_fragment_shader;
|
||||
public static boolean GL_ARB_half_float_pixel;
|
||||
public static boolean GL_ARB_imaging;
|
||||
public static boolean GL_ARB_matrix_palette;
|
||||
public static boolean GL_ARB_multisample;
|
||||
public static boolean GL_ARB_multitexture;
|
||||
public static boolean GL_ARB_occlusion_query;
|
||||
public static boolean GL_ARB_pixel_buffer_object;
|
||||
public static boolean GL_ARB_point_parameters;
|
||||
public static boolean GL_ARB_point_sprite;
|
||||
public static boolean GL_ARB_shading_language_100;
|
||||
public static boolean GL_ARB_shader_objects;
|
||||
public static boolean GL_ARB_shadow;
|
||||
public static boolean GL_ARB_shadow_ambient;
|
||||
public static boolean GL_ARB_texture_border_clamp;
|
||||
public static boolean GL_ARB_texture_compression;
|
||||
public static boolean GL_ARB_texture_cube_map;
|
||||
public static boolean GL_ARB_texture_env_add;
|
||||
public static boolean GL_ARB_texture_env_combine;
|
||||
public static boolean GL_ARB_texture_env_crossbar;
|
||||
public static boolean GL_ARB_texture_env_dot3;
|
||||
public static boolean GL_ARB_texture_float;
|
||||
public static boolean GL_ARB_texture_mirrored_repeat;
|
||||
public static boolean GL_ARB_texture_non_power_of_two;
|
||||
public static boolean GL_ARB_texture_rectangle;
|
||||
public static boolean GL_ARB_transpose_matrix;
|
||||
public static boolean GL_ARB_vertex_blend;
|
||||
public static boolean GL_ARB_vertex_buffer_object;
|
||||
public static boolean GL_ARB_vertex_program;
|
||||
public static boolean GL_ARB_vertex_shader;
|
||||
public static boolean GL_ARB_window_pos;
|
||||
|
||||
public static boolean GL_EXT_abgr;
|
||||
public static boolean GL_EXT_bgra;
|
||||
public static boolean GL_EXT_blend_equation_separate;
|
||||
public static boolean GL_EXT_blend_func_separate;
|
||||
public static boolean GL_EXT_blend_subtract;
|
||||
public static boolean GL_EXT_Cg_shader;
|
||||
public static boolean GL_EXT_compiled_vertex_array;
|
||||
public static boolean GL_EXT_depth_bounds_test;
|
||||
public static boolean GL_EXT_draw_range_elements;
|
||||
public static boolean GL_EXT_fog_coord;
|
||||
public static boolean GL_EXT_framebuffer_object;
|
||||
public static boolean GL_EXT_multi_draw_arrays;
|
||||
public static boolean GL_EXT_packed_pixels;
|
||||
public static boolean GL_EXT_paletted_texture;
|
||||
public static boolean GL_EXT_pixel_buffer_object;
|
||||
public static boolean GL_EXT_point_parameters;
|
||||
public static boolean GL_EXT_rescale_normal;
|
||||
public static boolean GL_EXT_secondary_color;
|
||||
public static boolean GL_EXT_separate_specular_color;
|
||||
public static boolean GL_EXT_shadow_funcs;
|
||||
public static boolean GL_EXT_shared_texture_palette;
|
||||
public static boolean GL_EXT_stencil_two_side;
|
||||
public static boolean GL_EXT_stencil_wrap;
|
||||
public static boolean GL_EXT_texture_3D;
|
||||
public static boolean GL_EXT_texture_compression_s3tc;
|
||||
public static boolean GL_EXT_texture_env_combine;
|
||||
public static boolean GL_EXT_texture_env_dot3;
|
||||
public static boolean GL_EXT_texture_filter_anisotropic;
|
||||
public static boolean GL_EXT_texture_lod_bias;
|
||||
public static boolean GL_EXT_texture_mirror_clamp;
|
||||
public static boolean GL_EXT_texture_rectangle;
|
||||
public static boolean GL_EXT_vertex_shader;
|
||||
public static boolean GL_EXT_vertex_weighting;
|
||||
|
||||
public static boolean GL_ATI_draw_buffers;
|
||||
public static boolean GL_ATI_element_array;
|
||||
public static boolean GL_ATI_envmap_bumpmap;
|
||||
public static boolean GL_ATI_fragment_shader;
|
||||
public static boolean GL_ATI_map_object_buffer;
|
||||
public static boolean GL_ATI_pn_triangles;
|
||||
public static boolean GL_ATI_separate_stencil;
|
||||
public static boolean GL_ATI_texture_compression_3dc;
|
||||
public static boolean GL_ATI_texture_float;
|
||||
public static boolean GL_ATI_texture_mirror_once;
|
||||
public static boolean GL_ATI_vertex_array_object;
|
||||
public static boolean GL_ATI_vertex_streams;
|
||||
public static boolean GL_ATI_vertex_attrib_array_object;
|
||||
|
||||
public static boolean GL_HP_occlusion_test;
|
||||
|
||||
public static boolean GL_IBM_rasterpos_clip;
|
||||
|
||||
public static boolean GL_NV_blend_square;
|
||||
public static boolean GL_NV_copy_depth_to_color;
|
||||
public static boolean GL_NV_depth_clamp;
|
||||
public static boolean GL_NV_evaluators;
|
||||
public static boolean GL_NV_fence;
|
||||
public static boolean GL_NV_float_buffer;
|
||||
public static boolean GL_NV_fog_distance;
|
||||
public static boolean GL_NV_fragment_program;
|
||||
public static boolean GL_NV_fragment_program2;
|
||||
public static boolean GL_NV_fragment_program_option;
|
||||
public static boolean GL_NV_half_float;
|
||||
public static boolean GL_NV_light_max_exponent;
|
||||
public static boolean GL_NV_multisample_filter_hint;
|
||||
public static boolean GL_NV_occlusion_query;
|
||||
public static boolean GL_NV_packed_depth_stencil;
|
||||
public static boolean GL_NV_pixel_data_range;
|
||||
public static boolean GL_NV_point_sprite;
|
||||
public static boolean GL_NV_primitive_restart;
|
||||
public static boolean GL_NV_register_combiners;
|
||||
public static boolean GL_NV_register_combiners2;
|
||||
public static boolean GL_NV_texgen_reflection;
|
||||
public static boolean GL_NV_texture_compression_vtc;
|
||||
public static boolean GL_NV_texture_env_combine4;
|
||||
public static boolean GL_NV_texture_expand_normal;
|
||||
public static boolean GL_NV_texture_rectangle;
|
||||
public static boolean GL_NV_texture_shader;
|
||||
public static boolean GL_NV_texture_shader2;
|
||||
public static boolean GL_NV_texture_shader3;
|
||||
public static boolean GL_NV_vertex_array_range;
|
||||
public static boolean GL_NV_vertex_array_range2;
|
||||
public static boolean GL_NV_vertex_program;
|
||||
public static boolean GL_NV_vertex_program1_1;
|
||||
public static boolean GL_NV_vertex_program2;
|
||||
public static boolean GL_NV_vertex_program2_option;
|
||||
public static boolean GL_NV_vertex_program3;
|
||||
|
||||
public static boolean GL_SUN_slice_accum;
|
||||
|
||||
public static boolean OpenGL11;
|
||||
public static boolean OpenGL12;
|
||||
public static boolean OpenGL13;
|
||||
public static boolean OpenGL14;
|
||||
public static boolean OpenGL15;
|
||||
public static boolean OpenGL20;
|
||||
private static ThreadLocal current_capabilities = new ThreadLocal();
|
||||
|
||||
/** Map of classes that have native stubs loaded */
|
||||
private static Map exts;
|
||||
private static int gl_ref_count;
|
||||
private static boolean did_auto_load;
|
||||
private static boolean loaded_stubs;
|
||||
|
@ -203,25 +63,91 @@ public final class GLContext {
|
|||
}
|
||||
|
||||
/**
|
||||
* Determine which extensions are available. Use this to initialize capability fields. Can only be called _after_ the Display
|
||||
* context or a Pbuffer has been created (or a context from some other GL library). Using LWJGL, this method is called
|
||||
* automatically for you when the LWJGL Window is created and there is no need to call it yourself.
|
||||
* Get the current capabilities instance. It contains the flags used
|
||||
* to test for support of a particular extension.
|
||||
*
|
||||
* @param exts A Set of OpenGL extension string names
|
||||
* @return The current capabilities instance.
|
||||
*/
|
||||
private static void determineAvailableExtensions(Set exts) {
|
||||
// Grab all the public static booleans out of this class
|
||||
Field[] fields = GLContext.class.getDeclaredFields();
|
||||
for ( int i = 0; i < fields.length; i++ ) {
|
||||
if ( Modifier.isStatic(fields[i].getModifiers()) && fields[i].getType().equals(boolean.class) ) {
|
||||
// reset fields
|
||||
try {
|
||||
fields[i].setBoolean(GLContext.class, exts.contains(fields[i].getName()));
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace(System.err);
|
||||
}
|
||||
public static ContextCapabilities getCapabilities() {
|
||||
return ((ContextCapabilities)current_capabilities.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine which extensions are available. Helper method to ContextCapabilities.
|
||||
*
|
||||
* @return A Set containing all available extension strings.
|
||||
*/
|
||||
static Set getSupportedExtensions() {
|
||||
Set supported_extensions = new HashSet();
|
||||
String extensions_string = GL11.glGetString(GL11.GL_EXTENSIONS);
|
||||
StringTokenizer tokenizer = new StringTokenizer(extensions_string);
|
||||
while ( tokenizer.hasMoreTokens() ) {
|
||||
String extension_string = tokenizer.nextToken();
|
||||
supported_extensions.add(extension_string);
|
||||
}
|
||||
String version = GL11.glGetString(GL11.GL_VERSION);
|
||||
if (version == null)
|
||||
throw new IllegalStateException("glGetString(GL_VERSION) returned null - possibly caused by missing current context.");
|
||||
StringTokenizer version_tokenizer = new StringTokenizer(version, ". ");
|
||||
String major_string = version_tokenizer.nextToken();
|
||||
String minor_string = version_tokenizer.nextToken();
|
||||
|
||||
int majorVersion = Integer.parseInt(major_string);
|
||||
int minorVersion = Integer.parseInt(minor_string);
|
||||
|
||||
if (majorVersion == 2) {
|
||||
// ----------------------[ 2.X ]----------------------
|
||||
supported_extensions.add("OpenGL20");
|
||||
// ----------------------[ 1.X ]----------------------
|
||||
supported_extensions.add("OpenGL11");
|
||||
supported_extensions.add("OpenGL12");
|
||||
supported_extensions.add("OpenGL13");
|
||||
supported_extensions.add("OpenGL14");
|
||||
supported_extensions.add("OpenGL15");
|
||||
} else {
|
||||
switch (minorVersion) {
|
||||
case 5:
|
||||
supported_extensions.add("OpenGL15");
|
||||
// Intentional fall through
|
||||
case 4:
|
||||
supported_extensions.add("OpenGL14");
|
||||
// Intentional fall through
|
||||
case 3:
|
||||
supported_extensions.add("OpenGL13");
|
||||
// Intentional fall through
|
||||
case 2:
|
||||
supported_extensions.add("OpenGL12");
|
||||
// Intentional fall through
|
||||
case 1:
|
||||
supported_extensions.add("OpenGL11");
|
||||
}
|
||||
}
|
||||
return supported_extensions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to ContextCapabilities. It will try to initialize the native stubs,
|
||||
* and remove the given extension name from the extension set if the initialization fails.
|
||||
*/
|
||||
static void initNativeStubs(Class extension_class, Set supported_extensions, String ext_name) {
|
||||
resetNativeStubs(extension_class);
|
||||
if (supported_extensions.contains(ext_name)) {
|
||||
try {
|
||||
Method init_stubs_method = extension_class.getDeclaredMethod("initNativeStubs", null);
|
||||
init_stubs_method.invoke(null, null);
|
||||
} catch (Exception e) {
|
||||
Sys.log("Failed to initialize extension " + extension_class + " - exception: " + e);
|
||||
supported_extensions.remove(ext_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadStubs() throws LWJGLException {
|
||||
if (loaded_stubs)
|
||||
return;
|
||||
Set supported_extensions = ContextCapabilities.initAllStubs();
|
||||
current_capabilities.set(new ContextCapabilities(supported_extensions));
|
||||
loaded_stubs = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -240,20 +166,13 @@ public final class GLContext {
|
|||
*/
|
||||
public static void useContext(Object context) throws LWJGLException {
|
||||
if ( context == null ) {
|
||||
unloadStubs();
|
||||
ContextCapabilities.unloadAllStubs();
|
||||
if ( did_auto_load )
|
||||
unloadOpenGLLibrary();
|
||||
currentContext = null;
|
||||
current_capabilities = null;
|
||||
BufferObjectTracker.setCurrent(null);
|
||||
return;
|
||||
}
|
||||
// Is this the same as last time?
|
||||
Object current = currentContext == null ? null : currentContext.get();
|
||||
if ( current == context ) {
|
||||
// Yes, so we don't need to do anything. Our caps and function pointers are still valid.
|
||||
return;
|
||||
}
|
||||
|
||||
// Ok, now it's the current context.
|
||||
if ( gl_ref_count == 0 ) {
|
||||
loadOpenGLLibrary();
|
||||
|
@ -261,7 +180,6 @@ public final class GLContext {
|
|||
}
|
||||
try {
|
||||
loadStubs();
|
||||
currentContext = new WeakReference(context);
|
||||
BufferObjectTracker.setCurrent(context);
|
||||
} catch (LWJGLException e) {
|
||||
if ( did_auto_load )
|
||||
|
@ -270,139 +188,6 @@ public final class GLContext {
|
|||
}
|
||||
}
|
||||
|
||||
private static void getExtensionClassesAndNames(Map exts, Set exts_names) {
|
||||
/*
|
||||
The version number is either of the form
|
||||
<major number>.<minor number>
|
||||
or
|
||||
<major number>.<minor number>.<release number>
|
||||
where the numbers all have one or more digits.
|
||||
*/
|
||||
String version = GL11.glGetString(GL11.GL_VERSION);
|
||||
if (version == null)
|
||||
throw new IllegalStateException("glGetString(GL_VERSION) returned null - possibly caused by missing current context.");
|
||||
StringTokenizer version_tokenizer = new StringTokenizer(version, ". ");
|
||||
String major_string = version_tokenizer.nextToken();
|
||||
String minor_string = version_tokenizer.nextToken();
|
||||
|
||||
int majorVersion = Integer.parseInt(major_string);
|
||||
int minorVersion = Integer.parseInt(minor_string);
|
||||
|
||||
if (majorVersion == 2) {
|
||||
// ----------------------[ 2.X ]----------------------
|
||||
addExtensionClass(exts, exts_names, "GL20", "OpenGL20");
|
||||
// ----------------------[ 1.X ]----------------------
|
||||
addExtensionClass(exts, exts_names, "GL15", "OpenGL15");
|
||||
addExtensionClass(exts, exts_names, "GL14", "OpenGL14");
|
||||
addExtensionClass(exts, exts_names, "GL13", "OpenGL13");
|
||||
addExtensionClass(exts, exts_names, "GL12", "OpenGL12");
|
||||
} else {
|
||||
switch (minorVersion) {
|
||||
case 5:
|
||||
addExtensionClass(exts, exts_names, "GL15", "OpenGL15");
|
||||
// Intentional fall through
|
||||
case 4:
|
||||
addExtensionClass(exts, exts_names, "GL14", "OpenGL14");
|
||||
// Intentional fall through
|
||||
case 3:
|
||||
addExtensionClass(exts, exts_names, "GL13", "OpenGL13");
|
||||
// Intentional fall through
|
||||
case 2:
|
||||
addExtensionClass(exts, exts_names, "GL12", "OpenGL12");
|
||||
}
|
||||
}
|
||||
|
||||
addExtensionClass(exts, exts_names, "EXTTextureCompressionS3TC", "");
|
||||
String extensions_string = GL11.glGetString(GL11.GL_EXTENSIONS);
|
||||
StringTokenizer tokenizer = new StringTokenizer(extensions_string);
|
||||
while ( tokenizer.hasMoreTokens() ) {
|
||||
String extension_string = tokenizer.nextToken();
|
||||
StringBuffer converted_name = new StringBuffer();
|
||||
int gl_prefix_index = extension_string.indexOf("GL_");
|
||||
if ( gl_prefix_index == -1 )
|
||||
continue;
|
||||
if ( "GL_EXT_texture_compression_s3tc".equals(extension_string) ) {
|
||||
// Special workaround
|
||||
addExtensionClass(exts, exts_names, "EXTTextureCompressionS3TC", "GL_EXT_texture_compression_s3tc");
|
||||
} else if ( "GL_EXT_texture_lod_bias".equals(extension_string) ) {
|
||||
// Special workaround
|
||||
addExtensionClass(exts, exts_names, "EXTTextureLODBias", "GL_EXT_texture_lod_bias");
|
||||
} else if ( "GL_NV_texture_compression_vtc".equals(extension_string) ) {
|
||||
// Special workaround
|
||||
addExtensionClass(exts, exts_names, "NVTextureCompressionVTC", "GL_NV_texture_compression_vtc");
|
||||
} else {
|
||||
for ( int i = gl_prefix_index + 3; i < extension_string.length(); i++ ) {
|
||||
char c;
|
||||
if ( extension_string.charAt(i) == '_' ) {
|
||||
i++;
|
||||
c = Character.toUpperCase(extension_string.charAt(i));
|
||||
} else
|
||||
c = extension_string.charAt(i);
|
||||
converted_name.append(c);
|
||||
}
|
||||
addExtensionClass(exts, exts_names, converted_name.toString(), extension_string);
|
||||
}
|
||||
}
|
||||
addExtensionClass(exts, exts_names, "ARBBufferObject", null);
|
||||
addExtensionClass(exts, exts_names, "ARBProgram", null);
|
||||
addExtensionClass(exts, exts_names, "NVProgram", null);
|
||||
}
|
||||
|
||||
private static void addExtensionClass(Map exts, Set exts_names, String ext_class_name, String ext_name) {
|
||||
if ( ext_name != null ) {
|
||||
if ( exts_names.contains(ext_name) ) {
|
||||
// Already added; ignore
|
||||
return;
|
||||
}
|
||||
exts_names.add(ext_name);
|
||||
}
|
||||
try {
|
||||
Class extension_class = Class.forName("org.lwjgl.opengl." + ext_class_name);
|
||||
extension_class.getDeclaredMethod("initNativeStubs", null); // check for existance of initNativeStubs method
|
||||
exts.put(extension_class, ext_name);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// ignore
|
||||
} catch (NoSuchMethodException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
private static void loadStubs() throws LWJGLException {
|
||||
if ( loaded_stubs )
|
||||
return;
|
||||
GL11.initNativeStubs();
|
||||
exts = new HashMap();
|
||||
Set exts_names = new HashSet();
|
||||
getExtensionClassesAndNames(exts, exts_names);
|
||||
Iterator exts_it = exts.keySet().iterator();
|
||||
while ( exts_it.hasNext() ) {
|
||||
Class extension_class = (Class)exts_it.next();
|
||||
resetNativeStubs(extension_class);
|
||||
try {
|
||||
Method init_stubs_method = extension_class.getDeclaredMethod("initNativeStubs", null);
|
||||
init_stubs_method.invoke(null, null);
|
||||
} catch (Exception e) {
|
||||
Sys.log("Failed to initialize extension " + extension_class + " - exception: " + e);
|
||||
exts_it.remove();
|
||||
exts_names.remove(exts.get(extension_class));
|
||||
}
|
||||
}
|
||||
determineAvailableExtensions(exts_names);
|
||||
loaded_stubs = true;
|
||||
}
|
||||
|
||||
private static void unloadStubs() {
|
||||
if ( !loaded_stubs )
|
||||
return;
|
||||
loaded_stubs = false;
|
||||
Iterator exts_it = exts.keySet().iterator();
|
||||
while ( exts_it.hasNext() ) {
|
||||
Class ext_class = (Class)exts_it.next();
|
||||
resetNativeStubs(ext_class);
|
||||
}
|
||||
resetNativeStubs(org.lwjgl.opengl.GL11.class);
|
||||
}
|
||||
|
||||
/** If the OpenGL reference count is 0, the library is loaded. The reference count is then incremented. */
|
||||
public static void loadOpenGLLibrary() throws LWJGLException {
|
||||
if ( gl_ref_count == 0 )
|
||||
|
@ -422,5 +207,5 @@ public final class GLContext {
|
|||
private static native void nUnloadOpenGLLibrary();
|
||||
|
||||
/** Native method to clear native stub bindings */
|
||||
private static native void resetNativeStubs(Class clazz);
|
||||
static native void resetNativeStubs(Class clazz);
|
||||
}
|
||||
|
|
|
@ -1,51 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL 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 'LWJGL' 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.
|
||||
*/
|
||||
/* MACHINE GENERATED FILE, DO NOT EDIT */
|
||||
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.BufferChecks;
|
||||
import java.nio.*;
|
||||
|
||||
public final class HPOcclusionTest {
|
||||
|
||||
/*
|
||||
* Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by
|
||||
* the <pname> of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev :
|
||||
*/
|
||||
public static final int GL_OCCLUSION_TEST_HP = 0x8165;
|
||||
|
||||
/*
|
||||
/**
|
||||
* Accepted by the <pname> of GetBooleanv, GetIntegerv, GetFloatv, and
|
||||
* GetDoublev :
|
||||
*/
|
||||
*/
|
||||
public static final int GL_OCCLUSION_TEST_RESULT_HP = 0x8166;
|
||||
/**
|
||||
* Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by
|
||||
* the <pname> of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev :
|
||||
*/
|
||||
public static final int GL_OCCLUSION_TEST_HP = 0x8165;
|
||||
|
||||
private HPOcclusionTest() {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,45 +1,19 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL 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 'LWJGL' 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.
|
||||
*/
|
||||
/* MACHINE GENERATED FILE, DO NOT EDIT */
|
||||
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
public final class IBMRasterposClip {
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.BufferChecks;
|
||||
import java.nio.*;
|
||||
|
||||
/*
|
||||
public final class IBMRasterposClip {
|
||||
/**
|
||||
* Accepted by the <target> parameter of Enable and Disable and the <value>
|
||||
* parameter of IsEnabled, GetBooleanv, GetIntegerv, GetFloatv, GetDoublev:
|
||||
*/
|
||||
public static final int GL_RASTER_POSITION_UNCLIPPED_IBM = 103010;
|
||||
*/
|
||||
public static final int GL_RASTER_POSITION_UNCLIPPED_IBM = 0x19262;
|
||||
|
||||
private IBMRasterposClip() {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,15 +7,6 @@ import org.lwjgl.BufferChecks;
|
|||
import java.nio.*;
|
||||
|
||||
public final class NVFloatBuffer {
|
||||
public static final int GL_WGL_TEXTURE_FLOAT_RGBA_NV = 0x20b8;
|
||||
public static final int GL_WGL_TEXTURE_FLOAT_RGB_NV = 0x20b7;
|
||||
public static final int GL_WGL_TEXTURE_FLOAT_RG_NV = 0x20b6;
|
||||
public static final int GL_WGL_TEXTURE_FLOAT_R_NV = 0x20b5;
|
||||
public static final int GL_WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV = 0x20b4;
|
||||
public static final int GL_WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV = 0x20b3;
|
||||
public static final int GL_WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV = 0x20b2;
|
||||
public static final int GL_WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV = 0x20b1;
|
||||
public static final int GL_WGL_FLOAT_COMPONENTS_NV = 0x20b0;
|
||||
public static final int GL_FLOAT_RGBA_MODE_NV = 0x888e;
|
||||
public static final int GL_FLOAT_CLEAR_COLOR_VALUE_NV = 0x888d;
|
||||
public static final int GL_TEXTURE_FLOAT_COMPONENTS_NV = 0x888c;
|
||||
|
|
|
@ -21,21 +21,21 @@ public final class NVPixelDataRange {
|
|||
|
||||
public static native void glFlushPixelDataRangeNV(int target);
|
||||
|
||||
public static void glPixelDataRangeNV(int target, ShortBuffer data) {
|
||||
public static void glPixelDataRangeNV(int target, ByteBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglPixelDataRangeNV(target, (data.remaining() << 1), data, data.position() << 1);
|
||||
nglPixelDataRangeNV(target, (data.remaining()), data, data.position());
|
||||
}
|
||||
public static void glPixelDataRangeNV(int target, IntBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglPixelDataRangeNV(target, (data.remaining() << 2), data, data.position() << 2);
|
||||
}
|
||||
public static void glPixelDataRangeNV(int target, ByteBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglPixelDataRangeNV(target, (data.remaining()), data, data.position());
|
||||
}
|
||||
public static void glPixelDataRangeNV(int target, FloatBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglPixelDataRangeNV(target, (data.remaining() << 2), data, data.position() << 2);
|
||||
}
|
||||
public static void glPixelDataRangeNV(int target, ShortBuffer data) {
|
||||
BufferChecks.checkDirect(data);
|
||||
nglPixelDataRangeNV(target, (data.remaining() << 1), data, data.position() << 1);
|
||||
}
|
||||
private static native void nglPixelDataRangeNV(int target, int length, Buffer data, int data_position);
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ import org.lwjgl.BufferChecks;
|
|||
import java.nio.*;
|
||||
|
||||
public final class NVTextureCompressionVTC {
|
||||
public static final int COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83f3;
|
||||
public static final int COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83f2;
|
||||
public static final int COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83f1;
|
||||
public static final int COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83f0;
|
||||
public static final int GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83f3;
|
||||
public static final int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83f2;
|
||||
public static final int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83f1;
|
||||
public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83f0;
|
||||
|
||||
private NVTextureCompressionVTC() {
|
||||
}
|
||||
|
|
|
@ -28,21 +28,21 @@ public final class NVVertexArrayRange {
|
|||
|
||||
public static native void glFlushVertexArrayRangeNV();
|
||||
|
||||
public static void glVertexArrayRangeNV(ShortBuffer pPointer) {
|
||||
public static void glVertexArrayRangeNV(ByteBuffer pPointer) {
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
nglVertexArrayRangeNV((pPointer.remaining() << 1), pPointer, pPointer.position() << 1);
|
||||
nglVertexArrayRangeNV((pPointer.remaining()), pPointer, pPointer.position());
|
||||
}
|
||||
public static void glVertexArrayRangeNV(IntBuffer pPointer) {
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
nglVertexArrayRangeNV((pPointer.remaining() << 2), pPointer, pPointer.position() << 2);
|
||||
}
|
||||
public static void glVertexArrayRangeNV(ByteBuffer pPointer) {
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
nglVertexArrayRangeNV((pPointer.remaining()), pPointer, pPointer.position());
|
||||
}
|
||||
public static void glVertexArrayRangeNV(FloatBuffer pPointer) {
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
nglVertexArrayRangeNV((pPointer.remaining() << 2), pPointer, pPointer.position() << 2);
|
||||
}
|
||||
public static void glVertexArrayRangeNV(ShortBuffer pPointer) {
|
||||
BufferChecks.checkDirect(pPointer);
|
||||
nglVertexArrayRangeNV((pPointer.remaining() << 1), pPointer, pPointer.position() << 1);
|
||||
}
|
||||
private static native void nglVertexArrayRangeNV(int size, Buffer pPointer, int pPointer_position);
|
||||
}
|
||||
|
|
|
@ -157,26 +157,26 @@ public final class NVVertexProgram extends NVProgram {
|
|||
|
||||
public static native void glVertexAttrib1sNV(int index, short x);
|
||||
|
||||
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, ShortBuffer buffer) {
|
||||
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, FloatBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(buffer);
|
||||
nglVertexAttribPointerNV(index, size, type, stride, buffer, buffer.position() << 1);
|
||||
nglVertexAttribPointerNV(index, size, type, stride, buffer, buffer.position() << 2);
|
||||
}
|
||||
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, IntBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(buffer);
|
||||
nglVertexAttribPointerNV(index, size, type, stride, buffer, buffer.position() << 2);
|
||||
}
|
||||
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, ShortBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(buffer);
|
||||
nglVertexAttribPointerNV(index, size, type, stride, buffer, buffer.position() << 1);
|
||||
}
|
||||
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, ByteBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(buffer);
|
||||
nglVertexAttribPointerNV(index, size, type, stride, buffer, buffer.position());
|
||||
}
|
||||
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, FloatBuffer buffer) {
|
||||
GLBufferChecks.ensureArrayVBOdisabled();
|
||||
BufferChecks.checkDirect(buffer);
|
||||
nglVertexAttribPointerNV(index, size, type, stride, buffer, buffer.position() << 2);
|
||||
}
|
||||
private static native void nglVertexAttribPointerNV(int index, int size, int type, int stride, Buffer buffer, int buffer_position);
|
||||
public static void glVertexAttribPointerNV(int index, int size, int type, int stride, int buffer_buffer_offset) {
|
||||
GLBufferChecks.ensureArrayVBOenabled();
|
||||
|
|
|
@ -1,44 +1,15 @@
|
|||
/*
|
||||
* Copyright (c) 2002-2004 LWJGL 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 'LWJGL' 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.
|
||||
*/
|
||||
/* MACHINE GENERATED FILE, DO NOT EDIT */
|
||||
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
public final class SUNSliceAccum {
|
||||
import org.lwjgl.LWJGLException;
|
||||
import org.lwjgl.BufferChecks;
|
||||
import java.nio.*;
|
||||
|
||||
/*
|
||||
* Accepted by the <op> parameter of Accum,
|
||||
*/
|
||||
public static final int GL_SLICE_ACCUM_SUN = 0x85CC;
|
||||
public final class SUNSliceAccum {
|
||||
public static final int GL_SLICE_ACCUM_SUN = 0x85cc;
|
||||
|
||||
private SUNSliceAccum() {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -170,8 +170,8 @@ public class Gears {
|
|||
System.err.println("GL_RENDERER: " + GL11.glGetString(GL11.GL_RENDERER));
|
||||
System.err.println("GL_VERSION: " + GL11.glGetString(GL11.GL_VERSION));
|
||||
System.err.println();
|
||||
System.err.println("glLoadTransposeMatrixfARB() supported: " + GLContext.GL_ARB_transpose_matrix);
|
||||
if (!GLContext.GL_ARB_transpose_matrix) {
|
||||
System.err.println("glLoadTransposeMatrixfARB() supported: " + GLContext.getCapabilities().GL_ARB_transpose_matrix);
|
||||
if (!GLContext.getCapabilities().GL_ARB_transpose_matrix) {
|
||||
// --- not using extensions
|
||||
GL11.glLoadIdentity();
|
||||
} else {
|
||||
|
@ -303,4 +303,4 @@ public class Gears {
|
|||
}
|
||||
GL11.glEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ public final class VBOIndexTest {
|
|||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight());
|
||||
if ( !GLContext.GL_ARB_vertex_buffer_object ) {
|
||||
if ( !GLContext.getCapabilities().GL_ARB_vertex_buffer_object ) {
|
||||
System.out.println("ARB VBO not supported!");
|
||||
System.exit(1);
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ public final class VBOTest {
|
|||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight());
|
||||
if ( !GLContext.GL_ARB_vertex_buffer_object ) {
|
||||
if ( !GLContext.getCapabilities().GL_ARB_vertex_buffer_object ) {
|
||||
System.out.println("ARB VBO not supported!");
|
||||
System.exit(1);
|
||||
}
|
||||
|
|
|
@ -147,26 +147,26 @@ public final class ShadersTest {
|
|||
if ( "NONE".equalsIgnoreCase(args[0]) ) {
|
||||
shader = null;
|
||||
} else if ( "VP".equalsIgnoreCase(args[0]) ) {
|
||||
if ( !GLContext.GL_ARB_vertex_program )
|
||||
if ( !GLContext.getCapabilities().GL_ARB_vertex_program )
|
||||
kill("The ARB_vertex_program extension is not supported.");
|
||||
|
||||
shader = new ShaderVP("shaderVP.vp");
|
||||
} else if ( "FP".equalsIgnoreCase(args[0]) ) {
|
||||
if ( !GLContext.GL_ARB_vertex_program )
|
||||
if ( !GLContext.getCapabilities().GL_ARB_vertex_program )
|
||||
kill("The ARB_vertex_program extension is not supported.");
|
||||
if ( !GLContext.GL_ARB_fragment_program )
|
||||
if ( !GLContext.getCapabilities().GL_ARB_fragment_program )
|
||||
kill("The ARB_fragment_program extension is not supported.");
|
||||
|
||||
shader = new ShaderFP("shaderFP.vp", "shaderFP.fp");
|
||||
} else if ( "VSH".equalsIgnoreCase(args[0]) ) {
|
||||
if ( !GLContext.GL_ARB_vertex_shader )
|
||||
if ( !GLContext.getCapabilities().GL_ARB_vertex_shader )
|
||||
kill("The ARB_vertex_shader extension is not supported.");
|
||||
|
||||
shader = new ShaderVSH("shaderVSH.vsh");
|
||||
} else if ( "FSH".equalsIgnoreCase(args[0]) ) {
|
||||
if ( !GLContext.GL_ARB_vertex_shader )
|
||||
if ( !GLContext.getCapabilities().GL_ARB_vertex_shader )
|
||||
kill("The ARB_vertex_shader extension is not supported.");
|
||||
if ( !GLContext.GL_ARB_fragment_shader )
|
||||
if ( !GLContext.getCapabilities().GL_ARB_fragment_shader )
|
||||
kill("The ARB_fragment_shader extension is not supported.");
|
||||
|
||||
shader = new ShaderFSH("shaderFSH.vsh", "shaderFSH.fsh");
|
||||
|
|
Loading…
Reference in New Issue