diff --git a/src/forgePatches/java/cpw/mods/fml/common/TracingPrintStream.java b/src/forgePatches/java/cpw/mods/fml/common/TracingPrintStream.java index b838914..bb93819 100644 --- a/src/forgePatches/java/cpw/mods/fml/common/TracingPrintStream.java +++ b/src/forgePatches/java/cpw/mods/fml/common/TracingPrintStream.java @@ -1,15 +1,13 @@ /* - * Forge Mod Loader - * Copyright (c) 2012-2013 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser Public License v2.1 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * Forge Mod Loader Copyright (c) 2012-2013 cpw. All rights reserved. This program and the accompanying materials are + * made available under the terms of the GNU Lesser Public License v2.1 which accompanies this distribution, and is + * available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ package cpw.mods.fml.common; import java.io.PrintStream; + import org.apache.logging.log4j.Logger; /** diff --git a/src/forgePatches/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java b/src/forgePatches/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java index 8b72c78..1220caf 100644 --- a/src/forgePatches/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java +++ b/src/forgePatches/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java @@ -21,9 +21,10 @@ import static org.objectweb.asm.Type.BOOLEAN_TYPE; import static org.objectweb.asm.Type.VOID_TYPE; import static org.objectweb.asm.Type.getMethodDescriptor; -import cpw.mods.fml.common.eventhandler.Event; import java.util.List; + import net.minecraft.launchwrapper.IClassTransformer; + import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.Type; @@ -40,13 +41,15 @@ import org.objectweb.asm.tree.MethodNode; import org.objectweb.asm.tree.TypeInsnNode; import org.objectweb.asm.tree.VarInsnNode; +import cpw.mods.fml.common.eventhandler.Event; + public class EventSubscriptionTransformer implements IClassTransformer { + public EventSubscriptionTransformer() {} @Override public byte[] transform(String name, String transformedName, byte[] bytes) { - if (bytes == null - || name.equals("cpw.mods.fml.common.eventhandler.Event") + if (bytes == null || name.equals("cpw.mods.fml.common.eventhandler.Event") || name.startsWith("net.minecraft.") || name.indexOf('.') == -1) { return bytes; @@ -96,9 +99,9 @@ public class EventSubscriptionTransformer implements IClassTransformer { String listDescM = Type.getMethodDescriptor(tList); for (MethodNode method : (List) classNode.methods) { - if (method.name.equals("setup") - && method.desc.equals(voidDesc) - && (method.access & ACC_PROTECTED) == ACC_PROTECTED) hasSetup = true; + if (method.name.equals("setup") && method.desc.equals(voidDesc) + && (method.access & ACC_PROTECTED) == ACC_PROTECTED) + hasSetup = true; if ((method.access & ACC_PUBLIC) == ACC_PUBLIC) { if (method.name.equals("getListenerList") && method.desc.equals(listDescM)) hasGetListenerList = true; if (method.name.equals("isCancelable") && method.desc.equals(boolDesc)) hasCancelable = true; @@ -111,11 +114,8 @@ public class EventSubscriptionTransformer implements IClassTransformer { for (AnnotationNode node : classNode.visibleAnnotations) { if (!hasResult && node.desc.replace('$', '/').equals("Lcpw/mods/fml/common/eventhandler/Event/HasResult;")) { - /* Add: - * public boolean hasResult() - * { - * return true; - * } + /* + * Add: public boolean hasResult() { return true; } */ MethodNode method = new MethodNode(ACC_PUBLIC, "hasResult", boolDesc, null, null); method.instructions.add(new InsnNode(ICONST_1)); @@ -123,11 +123,8 @@ public class EventSubscriptionTransformer implements IClassTransformer { classNode.methods.add(method); edited = true; } else if (!hasCancelable && node.desc.equals("Lcpw/mods/fml/common/eventhandler/Cancelable;")) { - /* Add: - * public boolean isCancelable() - * { - * return true; - * } + /* + * Add: public boolean isCancelable() { return true; } */ MethodNode method = new MethodNode(ACC_PUBLIC, "isCancelable", boolDesc, null, null); method.instructions.add(new InsnNode(ICONST_1)); @@ -139,9 +136,8 @@ public class EventSubscriptionTransformer implements IClassTransformer { } if (hasSetup) { - if (!hasGetListenerList) - throw new RuntimeException( - "Event class defines setup() but does not define getListenerList! " + classNode.name); + if (!hasGetListenerList) throw new RuntimeException( + "Event class defines setup() but does not define getListenerList! " + classNode.name); else return edited; } @@ -150,31 +146,21 @@ public class EventSubscriptionTransformer implements IClassTransformer { // Add private static ListenerList LISTENER_LIST classNode.fields.add(new FieldNode(ACC_PRIVATE | ACC_STATIC, "LISTENER_LIST", listDesc, null, null)); - /*Add: - * public () - * { - * super(); - * } + /* + * Add: public () { super(); } */ if (!hasDefaultCtr) { MethodNode method = new MethodNode(ACC_PUBLIC, "", voidDesc, null, null); method.instructions.add(new VarInsnNode(ALOAD, 0)); - method.instructions.add( - new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "", voidDesc, false)); + method.instructions + .add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "", voidDesc, false)); method.instructions.add(new InsnNode(RETURN)); classNode.methods.add(method); } - /*Add: - * protected void setup() - * { - * super.setup(); - * if (LISTENER_LIST != NULL) - * { - * return; - * } - * LISTENER_LIST = new ListenerList(super.getListenerList()); - * } + /* + * Add: protected void setup() { super.setup(); if (LISTENER_LIST != NULL) { return; } LISTENER_LIST = new + * ListenerList(super.getListenerList()); } */ MethodNode method = new MethodNode(ACC_PROTECTED, "setup", voidDesc, null, null); method.instructions.add(new VarInsnNode(ALOAD, 0)); @@ -188,19 +174,21 @@ public class EventSubscriptionTransformer implements IClassTransformer { method.instructions.add(new TypeInsnNode(NEW, tList.getInternalName())); method.instructions.add(new InsnNode(DUP)); method.instructions.add(new VarInsnNode(ALOAD, 0)); + method.instructions + .add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "getListenerList", listDescM, false)); method.instructions.add( - new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "getListenerList", listDescM, false)); - method.instructions.add(new MethodInsnNode( - INVOKESPECIAL, tList.getInternalName(), "", getMethodDescriptor(VOID_TYPE, tList), false)); + new MethodInsnNode( + INVOKESPECIAL, + tList.getInternalName(), + "", + getMethodDescriptor(VOID_TYPE, tList), + false)); method.instructions.add(new FieldInsnNode(PUTSTATIC, classNode.name, "LISTENER_LIST", listDesc)); method.instructions.add(new InsnNode(RETURN)); classNode.methods.add(method); - /*Add: - * public ListenerList getListenerList() - * { - * return this.LISTENER_LIST; - * } + /* + * Add: public ListenerList getListenerList() { return this.LISTENER_LIST; } */ method = new MethodNode(ACC_PUBLIC, "getListenerList", listDescM, null, null); method.instructions.add(new FieldInsnNode(GETSTATIC, classNode.name, "LISTENER_LIST", listDesc)); diff --git a/src/forgePatches/java/cpw/mods/fml/common/patcher/ClassPatchManager.java b/src/forgePatches/java/cpw/mods/fml/common/patcher/ClassPatchManager.java index 58fe6ed..835c46b 100644 --- a/src/forgePatches/java/cpw/mods/fml/common/patcher/ClassPatchManager.java +++ b/src/forgePatches/java/cpw/mods/fml/common/patcher/ClassPatchManager.java @@ -1,18 +1,5 @@ package cpw.mods.fml.common.patcher; -import LZMA.LzmaInputStream; -import com.google.common.base.Joiner; -import com.google.common.base.Throwables; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.ListMultimap; -import com.google.common.collect.Maps; -import com.google.common.hash.Hashing; -import com.google.common.io.ByteArrayDataInput; -import com.google.common.io.ByteStreams; -import com.google.common.io.Files; -import cpw.mods.fml.relauncher.FMLRelaunchLog; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.repackage.com.nothome.delta.GDiffPatcher; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; @@ -25,15 +12,34 @@ import java.util.jar.JarEntry; import java.util.jar.JarInputStream; import java.util.jar.JarOutputStream; import java.util.regex.Pattern; + import net.minecraft.launchwrapper.LaunchClassLoader; + import org.apache.commons.compress.harmony.unpack200.Pack200UnpackerAdapter; import org.apache.logging.log4j.Level; +import LZMA.LzmaInputStream; + +import com.google.common.base.Joiner; +import com.google.common.base.Throwables; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ListMultimap; +import com.google.common.collect.Maps; +import com.google.common.hash.Hashing; +import com.google.common.io.ByteArrayDataInput; +import com.google.common.io.ByteStreams; +import com.google.common.io.Files; + +import cpw.mods.fml.relauncher.FMLRelaunchLog; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.repackage.com.nothome.delta.GDiffPatcher; + public class ClassPatchManager { + public static final ClassPatchManager INSTANCE = new ClassPatchManager(); - public static final boolean dumpPatched = - Boolean.parseBoolean(System.getProperty("fml.dumpPatchedClasses", "false")); + public static final boolean dumpPatched = Boolean + .parseBoolean(System.getProperty("fml.dumpPatchedClasses", "false")); public static final boolean DEBUG = Boolean.parseBoolean(System.getProperty("fml.debugClassPatchManager", "false")); private GDiffPatcher patcher = new GDiffPatcher(); @@ -66,10 +72,12 @@ public class ClassPatchManager { return inputData; } boolean ignoredError = false; - if (DEBUG) - FMLRelaunchLog.fine( - "Runtime patching class %s (input size %d), found %d patch%s", - mappedName, (inputData == null ? 0 : inputData.length), list.size(), list.size() != 1 ? "es" : ""); + if (DEBUG) FMLRelaunchLog.fine( + "Runtime patching class %s (input size %d), found %d patch%s", + mappedName, + (inputData == null ? 0 : inputData.length), + list.size(), + list.size() != 1 ? "es" : ""); for (ClassPatch patch : list) { if (!patch.targetClassName.equals(mappedName) && !patch.sourceClassName.equals(name)) { FMLRelaunchLog.warning("Binary patch found %s for wrong class %s", patch.targetClassName, mappedName); @@ -85,7 +93,10 @@ public class ClassPatchManager { if (patch.inputChecksum != inputChecksum) { FMLRelaunchLog.severe( "There is a binary discrepency between the expected input class %s (%s) and the actual class. Checksum on disk is %x, in patch %x. Things are probably about to go very wrong. Did you put something into the jar file?", - mappedName, name, inputChecksum, patch.inputChecksum); + mappedName, + name, + inputChecksum, + patch.inputChecksum); if (!Boolean.parseBoolean(System.getProperty("fml.ignorePatchDiscrepancies", "false"))) { FMLRelaunchLog.severe( "The game is going to exit, because this is a critical error, and it is very improbable that the modded game will work, please obtain clean jar files."); @@ -108,8 +119,8 @@ public class ClassPatchManager { } } if (!ignoredError && DEBUG) { - FMLRelaunchLog.fine( - "Successfully applied runtime patches for %s (new size %d)", mappedName, inputData.length); + FMLRelaunchLog + .fine("Successfully applied runtime patches for %s (new size %d)", mappedName, inputData.length); } if (dumpPatched) { try { @@ -123,8 +134,8 @@ public class ClassPatchManager { } public void setup(Side side) { - Pattern binpatchMatcher = Pattern.compile( - String.format("binpatch/%s/.*.binpatch", side.toString().toLowerCase(Locale.ENGLISH))); + Pattern binpatchMatcher = Pattern + .compile(String.format("binpatch/%s/.*.binpatch", side.toString().toLowerCase(Locale.ENGLISH))); JarInputStream jis; try { InputStream binpatchesCompressed = getClass().getResourceAsStream("/binpatches.pack.lzma"); @@ -164,13 +175,10 @@ public class ClassPatchManager { } else { jis.closeEntry(); } - } catch (IOException e) { - } + } catch (IOException e) {} } while (true); FMLRelaunchLog.fine("Read %d binary patches", patches.size()); - if (DEBUG) - FMLRelaunchLog.fine( - "Patch list :\n\t%s", Joiner.on("\t\n").join(patches.asMap().entrySet())); + if (DEBUG) FMLRelaunchLog.fine("Patch list :\n\t%s", Joiner.on("\t\n").join(patches.asMap().entrySet())); patchedClasses.clear(); } diff --git a/src/forgePatches/java/cpw/mods/fml/relauncher/CoreModManager.java b/src/forgePatches/java/cpw/mods/fml/relauncher/CoreModManager.java index 94140ea..674b9e2 100644 --- a/src/forgePatches/java/cpw/mods/fml/relauncher/CoreModManager.java +++ b/src/forgePatches/java/cpw/mods/fml/relauncher/CoreModManager.java @@ -1,35 +1,12 @@ /* - * Forge Mod Loader - * Copyright (c) 2012-2013 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser Public License v2.1 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * - * Contributors: - * cpw - implementation - * eigenraven - java 9 compatibility + * Forge Mod Loader Copyright (c) 2012-2013 cpw. All rights reserved. This program and the accompanying materials are + * made available under the terms of the GNU Lesser Public License v2.1 which accompanies this distribution, and is + * available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html Contributors: cpw - implementation eigenraven - + * java 9 compatibility */ package cpw.mods.fml.relauncher; -import com.google.common.base.Strings; -import com.google.common.base.Throwables; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.common.collect.ObjectArrays; -import com.google.common.primitives.Ints; -import cpw.mods.fml.common.FMLLog; -import cpw.mods.fml.common.asm.transformers.ModAccessTransformer; -import cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker; -import cpw.mods.fml.common.launcher.FMLTweaker; -import cpw.mods.fml.common.toposort.TopologicalSort; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin.DependsOn; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin.Name; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin.SortingIndex; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions; import java.io.File; import java.io.FileFilter; import java.io.FilenameFilter; @@ -48,18 +25,39 @@ import java.util.List; import java.util.Map; import java.util.jar.Attributes; import java.util.jar.JarFile; + import net.minecraft.launchwrapper.ITweaker; import net.minecraft.launchwrapper.Launch; import net.minecraft.launchwrapper.LaunchClassLoader; + import org.apache.logging.log4j.Level; +import com.google.common.base.Strings; +import com.google.common.base.Throwables; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.ObjectArrays; +import com.google.common.primitives.Ints; + +import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.common.asm.transformers.ModAccessTransformer; +import cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker; +import cpw.mods.fml.common.launcher.FMLTweaker; +import cpw.mods.fml.common.toposort.TopologicalSort; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.DependsOn; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.Name; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.SortingIndex; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions; + public class CoreModManager { + private static final Attributes.Name COREMODCONTAINSFMLMOD = new Attributes.Name("FMLCorePluginContainsFMLMod"); private static final Attributes.Name MODTYPE = new Attributes.Name("ModType"); private static final Attributes.Name MODSIDE = new Attributes.Name("ModSide"); - private static String[] rootPlugins = { - "cpw.mods.fml.relauncher.FMLCorePlugin", "net.minecraftforge.classloading.FMLForgePlugin" - }; + private static String[] rootPlugins = { "cpw.mods.fml.relauncher.FMLCorePlugin", + "net.minecraftforge.classloading.FMLForgePlugin" }; private static List loadedCoremods = Lists.newArrayList(); private static List loadPlugins; private static boolean deobfuscatedEnvironment; @@ -69,14 +67,15 @@ public class CoreModManager { private static List accessTransformers = Lists.newArrayList(); private static class FMLPluginWrapper implements ITweaker { + public final String name; public final IFMLLoadingPlugin coreModInstance; public final List predepends; public final File location; public final int sortIndex; - public FMLPluginWrapper( - String name, IFMLLoadingPlugin coreModInstance, File location, int sortIndex, String... predepends) { + public FMLPluginWrapper(String name, IFMLLoadingPlugin coreModInstance, File location, int sortIndex, + String... predepends) { super(); this.name = name; this.coreModInstance = coreModInstance; @@ -97,9 +96,8 @@ public class CoreModManager { @Override public void injectIntoClassLoader(LaunchClassLoader classLoader) { - FMLRelaunchLog.info( - "Injecting coremod %s {%s} class transformers", - name, coreModInstance.getClass().getName()); + FMLRelaunchLog + .info("Injecting coremod %s {%s} class transformers", name, coreModInstance.getClass().getName()); if (coreModInstance.getASMTransformerClass() != null) for (String transformer : coreModInstance.getASMTransformerClass()) { FMLRelaunchLog.finer("Registering transformer %s", transformer); @@ -107,9 +105,7 @@ public class CoreModManager { } FMLRelaunchLog.fine("Injection complete"); - FMLRelaunchLog.fine( - "Running coremod plugin for %s {%s}", - name, coreModInstance.getClass().getName()); + FMLRelaunchLog.fine("Running coremod plugin for %s {%s}", name, coreModInstance.getClass().getName()); Map data = new HashMap(); data.put("mcLocation", mcDir); data.put("coremodList", loadPlugins); @@ -120,8 +116,7 @@ public class CoreModManager { String setupClass = coreModInstance.getSetupClass(); if (setupClass != null) { try { - IFMLCallHook call = (IFMLCallHook) - Class.forName(setupClass, true, classLoader).newInstance(); + IFMLCallHook call = (IFMLCallHook) Class.forName(setupClass, true, classLoader).newInstance(); Map callData = new HashMap(); callData.put("runtimeDeobfuscationEnabled", !deobfuscatedEnvironment); callData.put("mcLocation", mcDir); @@ -134,9 +129,7 @@ public class CoreModManager { throw new RuntimeException(e); } } - FMLRelaunchLog.fine( - "Coremod plugin class %s run successfully", - coreModInstance.getClass().getSimpleName()); + FMLRelaunchLog.fine("Coremod plugin class %s run successfully", coreModInstance.getClass().getSimpleName()); String modContainer = coreModInstance.getModContainerClass(); if (modContainer != null) { @@ -166,8 +159,7 @@ public class CoreModManager { "Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation"); deobfuscatedEnvironment = true; } - } catch (IOException e1) { - } + } catch (IOException e1) {} if (!deobfuscatedEnvironment) { FMLRelaunchLog.fine("Enabling runtime deobfuscation"); @@ -178,7 +170,9 @@ public class CoreModManager { classLoader.registerTransformer("cpw.mods.fml.common.asm.transformers.PatchingTransformer"); } catch (Exception e) { FMLRelaunchLog.log( - Level.ERROR, e, "The patch transformer failed to load! This is critical, loading cannot continue!"); + Level.ERROR, + e, + "The patch transformer failed to load! This is critical, loading cannot continue!"); throw Throwables.propagate(e); } @@ -211,12 +205,14 @@ public class CoreModManager { FMLRelaunchLog.fine("Discovering coremods"); File coreMods = setupCoreModDir(mcDir); FilenameFilter ff = new FilenameFilter() { + @Override public boolean accept(File dir, String name) { return name.endsWith(".jar"); } }; FilenameFilter derpfilter = new FilenameFilter() { + @Override public boolean accept(File dir, String name) { return name.endsWith(".jar.zip"); @@ -231,6 +227,7 @@ public class CoreModManager { } } FileFilter derpdirfilter = new FileFilter() { + @Override public boolean accept(File pathname) { return pathname.isDirectory() && new File(pathname, "META-INF").isDirectory(); @@ -238,48 +235,39 @@ public class CoreModManager { }; File[] derpdirlist = coreMods.listFiles(derpdirfilter); if (derpdirlist != null && derpdirlist.length > 0) { - FMLRelaunchLog.log - .getLogger() - .log( - Level.FATAL, - "There appear to be jars extracted into the mods directory. This is VERY BAD and will almost NEVER WORK WELL"); - FMLRelaunchLog.log - .getLogger() - .log( - Level.FATAL, - "You should place original jars only in the mods directory. NEVER extract them to the mods directory."); - FMLRelaunchLog.log - .getLogger() - .log( - Level.FATAL, - "The directories below appear to be extracted jar files. Fix this before you continue."); + FMLRelaunchLog.log.getLogger().log( + Level.FATAL, + "There appear to be jars extracted into the mods directory. This is VERY BAD and will almost NEVER WORK WELL"); + FMLRelaunchLog.log.getLogger().log( + Level.FATAL, + "You should place original jars only in the mods directory. NEVER extract them to the mods directory."); + FMLRelaunchLog.log.getLogger().log( + Level.FATAL, + "The directories below appear to be extracted jar files. Fix this before you continue."); for (File f : derpdirlist) { - FMLRelaunchLog.log - .getLogger() - .log( - Level.FATAL, - "Directory {} contains {}", - f.getName(), - Arrays.asList(new File(f, "META-INF").list())); + FMLRelaunchLog.log.getLogger().log( + Level.FATAL, + "Directory {} contains {}", + f.getName(), + Arrays.asList(new File(f, "META-INF").list())); } RuntimeException re = new RuntimeException("Extracted mod jars found, loading will NOT continue"); // We're generating a crash report for the launcher to show to the user here try { Class crashreportclass = classLoader.loadClass("b"); - Object crashreport = crashreportclass - .getMethod("a", Throwable.class, String.class) - .invoke( - null, - re, - "FML has discovered extracted jar files in the mods directory.\nThis breaks mod loading functionality completely.\nRemove the directories and replace with the jar files originally provided."); + Object crashreport = crashreportclass.getMethod("a", Throwable.class, String.class).invoke( + null, + re, + "FML has discovered extracted jar files in the mods directory.\nThis breaks mod loading functionality completely.\nRemove the directories and replace with the jar files originally provided."); File crashreportfile = new File( new File(coreMods.getParentFile(), "crash-reports"), String.format("fml-crash-%1$tY-%1$tm-%1$td_%1$tT.txt", Calendar.getInstance())); crashreportclass.getMethod("a", File.class).invoke(crashreport, crashreportfile); - System.out.println("#@!@# FML has crashed the game deliberately. Crash report saved to: #@!@# " - + crashreportfile.getAbsolutePath()); + System.out.println( + "#@!@# FML has crashed the game deliberately. Crash report saved to: #@!@# " + + crashreportfile.getAbsolutePath()); } catch (Exception e) { e.printStackTrace(); // NOOP - hopefully @@ -293,8 +281,8 @@ public class CoreModManager { coreModList = ObjectArrays.concat(coreModList, versionedCoreMods, File.class); } - coreModList = ObjectArrays.concat( - coreModList, ModListHelper.additionalMods.values().toArray(new File[0]), File.class); + coreModList = ObjectArrays + .concat(coreModList, ModListHelper.additionalMods.values().toArray(new File[0]), File.class); coreModList = FileListHelper.sortFileList(coreModList); @@ -338,7 +326,8 @@ public class CoreModManager { if (!modTypes.contains("FML")) { FMLRelaunchLog.fine( "Adding %s to the list of things to skip. It is not an FML mod, it has types %s", - coreMod.getName(), modTypes); + coreMod.getName(), + modTypes); loadedCoremods.add(coreMod.getName()); continue; } @@ -346,7 +335,9 @@ public class CoreModManager { if (!("BOTH".equals(modSide) || FMLLaunchHandler.side.name().equals(modSide))) { FMLRelaunchLog.fine( "Mod %s has ModSide meta-inf value %s, and we're %s. It will be ignored", - coreMod.getName(), modSide, FMLLaunchHandler.side.name()); + coreMod.getName(), + modSide, + FMLLaunchHandler.side.name()); loadedCoremods.add(coreMod.getName()); continue; } @@ -407,8 +398,8 @@ public class CoreModManager { } } - private static void handleCascadingTweak( - File coreMod, JarFile jar, String cascadedTweaker, LaunchClassLoader classLoader, Integer sortingOrder) { + private static void handleCascadingTweak(File coreMod, JarFile jar, String cascadedTweaker, + LaunchClassLoader classLoader, Integer sortingOrder) { try { // Have to manually stuff the tweaker into the parent classloader // PATCHED BEGIN @@ -429,8 +420,7 @@ public class CoreModManager { } /** - * @param mcDir - * the minecraft home directory + * @param mcDir the minecraft home directory * @return the coremod directory */ private static File setupCoreModDir(File mcDir) { @@ -439,7 +429,8 @@ public class CoreModManager { coreModDir = coreModDir.getCanonicalFile(); } catch (IOException e) { throw new RuntimeException( - String.format("Unable to canonicalize the coremod dir at %s", mcDir.getName()), e); + String.format("Unable to canonicalize the coremod dir at %s", mcDir.getName()), + e); } if (!coreModDir.exists()) { coreModDir.mkdir(); @@ -492,8 +483,8 @@ public class CoreModManager { requiredMCVersion.value(), FMLInjectionData.mccversion); } - TransformerExclusions trExclusions = - coreModClazz.getAnnotation(IFMLLoadingPlugin.TransformerExclusions.class); + TransformerExclusions trExclusions = coreModClazz + .getAnnotation(IFMLLoadingPlugin.TransformerExclusions.class); if (trExclusions != null) { for (String st : trExclusions.value()) { classLoader.addTransformerExclusion(st); @@ -521,9 +512,12 @@ public class CoreModManager { FMLRelaunchLog.fine("Enqueued coremod %s", coreModName); return wrap; } catch (ClassNotFoundException cnfe) { - if (!Lists.newArrayList(rootPlugins).contains(coreModClass)) - FMLRelaunchLog.log( - Level.ERROR, cnfe, "Coremod %s: Unable to class load the plugin %s", coreModName, coreModClass); + if (!Lists.newArrayList(rootPlugins).contains(coreModClass)) FMLRelaunchLog.log( + Level.ERROR, + cnfe, + "Coremod %s: Unable to class load the plugin %s", + coreModName, + coreModClass); else FMLRelaunchLog.fine("Skipping root plugin %s", coreModClass); } catch (ClassCastException cce) { FMLRelaunchLog.log( @@ -534,18 +528,25 @@ public class CoreModManager { coreModClass); } catch (InstantiationException ie) { FMLRelaunchLog.log( - Level.ERROR, ie, "Coremod %s: The plugin class %s was not instantiable", coreModName, coreModClass); + Level.ERROR, + ie, + "Coremod %s: The plugin class %s was not instantiable", + coreModName, + coreModClass); } catch (IllegalAccessException iae) { FMLRelaunchLog.log( - Level.ERROR, iae, "Coremod %s: The plugin class %s was not accessible", coreModName, coreModClass); + Level.ERROR, + iae, + "Coremod %s: The plugin class %s was not accessible", + coreModName, + coreModClass); } return null; } @SuppressWarnings("unused") private static void sortCoreMods() { - TopologicalSort.DirectedGraph sortGraph = - new TopologicalSort.DirectedGraph(); + TopologicalSort.DirectedGraph sortGraph = new TopologicalSort.DirectedGraph(); Map pluginMap = Maps.newHashMap(); for (FMLPluginWrapper plug : loadPlugins) { sortGraph.addNode(plug); @@ -600,6 +601,7 @@ public class CoreModManager { // Thanks unhelpful fixer of http://bugs.java.com/view_bug.do?bug_id=8032636 ITweaker[] toSort = tweakers.toArray(new ITweaker[tweakers.size()]); Arrays.sort(toSort, new Comparator() { + @Override public int compare(ITweaker o1, ITweaker o2) { Integer first = null; diff --git a/src/forgePatches/java/cpw/mods/fml/relauncher/FMLSecurityManager.java b/src/forgePatches/java/cpw/mods/fml/relauncher/FMLSecurityManager.java index ed72e8b..856fea1 100644 --- a/src/forgePatches/java/cpw/mods/fml/relauncher/FMLSecurityManager.java +++ b/src/forgePatches/java/cpw/mods/fml/relauncher/FMLSecurityManager.java @@ -3,8 +3,7 @@ package cpw.mods.fml.relauncher; import java.security.Permission; /** - * A custom security manager stopping certain events from happening - * unexpectedly. + * A custom security manager stopping certain events from happening unexpectedly. * * @author cpw * @@ -12,6 +11,7 @@ import java.security.Permission; * */ public class FMLSecurityManager extends SecurityManager { + @Override public void checkPermission(Permission perm) { String permName = perm.getName() != null ? perm.getName() : "missing"; @@ -34,6 +34,7 @@ public class FMLSecurityManager extends SecurityManager { } public static class ExitTrappedException extends SecurityException { + private static final long serialVersionUID = 1L; } } diff --git a/src/forgePatches/java/net/minecraftforge/common/util/EnumHelper.java b/src/forgePatches/java/net/minecraftforge/common/util/EnumHelper.java index 89813d7..2d408ce 100644 --- a/src/forgePatches/java/net/minecraftforge/common/util/EnumHelper.java +++ b/src/forgePatches/java/net/minecraftforge/common/util/EnumHelper.java @@ -1,9 +1,9 @@ package net.minecraftforge.common.util; -import com.google.common.base.Throwables; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.reflect.*; + import net.minecraft.block.BlockPressurePlate.Sensitivity; import net.minecraft.block.material.Material; import net.minecraft.enchantment.EnumEnchantmentType; @@ -20,34 +20,31 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MovingObjectPosition.MovingObjectType; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.gen.structure.StructureStrongholdPieces.Stronghold.Door; + import org.apache.commons.lang3.ArrayUtils; +import com.google.common.base.Throwables; + public class EnumHelper { + // Some enums are decompiled with extra arguments, so lets check for that @SuppressWarnings("rawtypes") - private static Class[][] commonTypes = { - {EnumAction.class}, - {ArmorMaterial.class, int.class, int[].class, int.class}, - {EnumArt.class, String.class, int.class, int.class, int.class, int.class}, - {EnumCreatureAttribute.class}, - {EnumCreatureType.class, Class.class, int.class, Material.class, boolean.class, boolean.class}, - {Door.class}, - {EnumEnchantmentType.class}, - {EnumEntitySize.class}, - {Sensitivity.class}, - {MovingObjectType.class}, - {EnumSkyBlock.class, int.class}, - {EnumStatus.class}, - {ToolMaterial.class, int.class, int.class, float.class, float.class, int.class}, - {EnumRarity.class, EnumChatFormatting.class, String.class} - }; + private static Class[][] commonTypes = { { EnumAction.class }, + { ArmorMaterial.class, int.class, int[].class, int.class }, + { EnumArt.class, String.class, int.class, int.class, int.class, int.class }, + { EnumCreatureAttribute.class }, + { EnumCreatureType.class, Class.class, int.class, Material.class, boolean.class, boolean.class }, + { Door.class }, { EnumEnchantmentType.class }, { EnumEntitySize.class }, { Sensitivity.class }, + { MovingObjectType.class }, { EnumSkyBlock.class, int.class }, { EnumStatus.class }, + { ToolMaterial.class, int.class, int.class, float.class, float.class, int.class }, + { EnumRarity.class, EnumChatFormatting.class, String.class } }; public static EnumAction addAction(String name) { return addEnum(EnumAction.class, name); } - public static ArmorMaterial addArmorMaterial( - String name, int durability, int[] reductionAmounts, int enchantability) { + public static ArmorMaterial addArmorMaterial(String name, int durability, int[] reductionAmounts, + int enchantability) { return addEnum(ArmorMaterial.class, name, durability, reductionAmounts, enchantability); } @@ -60,8 +57,8 @@ public class EnumHelper { } @SuppressWarnings("rawtypes") - public static EnumCreatureType addCreatureType( - String name, Class typeClass, int maxNumber, Material material, boolean peaceful, boolean animal) { + public static EnumCreatureType addCreatureType(String name, Class typeClass, int maxNumber, Material material, + boolean peaceful, boolean animal) { return addEnum(EnumCreatureType.class, name, typeClass, maxNumber, material, peaceful, animal); } @@ -93,8 +90,8 @@ public class EnumHelper { return addEnum(EnumStatus.class, name); } - public static ToolMaterial addToolMaterial( - String name, int harvestLevel, int maxUses, float efficiency, float damage, int enchantability) { + public static ToolMaterial addToolMaterial(String name, int harvestLevel, int maxUses, float efficiency, + float damage, int enchantability) { return addEnum(ToolMaterial.class, name, harvestLevel, maxUses, efficiency, damage, enchantability); } @@ -115,8 +112,8 @@ public class EnumHelper { } @SuppressWarnings("rawtypes") - public static > T addEnum( - Class[][] map, Class enumType, String enumName, Object... paramValues) { + public static > T addEnum(Class[][] map, Class enumType, String enumName, + Object... paramValues) { for (Class[] lookup : map) { if (lookup[0] == enumType) { Class[] paramTypes = new Class[lookup.length - 1]; @@ -130,8 +127,8 @@ public class EnumHelper { } @SuppressWarnings("unchecked") - public static > T addEnum( - Class enumType, String enumName, Class[] paramTypes, Object[] paramValues) { + public static > T addEnum(Class enumType, String enumName, Class[] paramTypes, + Object[] paramValues) { if (!extensibleEnumIface.isAssignableFrom(enumType)) { throw new RuntimeException( "Enum " + enumType.getName() + " was not made extensible, add it to lwjgl3ify configs."); diff --git a/src/generated/java/org/lwjgl/BufferChecks.java b/src/generated/java/org/lwjgl/BufferChecks.java index 059bdcd..21e2732 100644 --- a/src/generated/java/org/lwjgl/BufferChecks.java +++ b/src/generated/java/org/lwjgl/BufferChecks.java @@ -1,6 +1,7 @@ package org.lwjgl; public class BufferChecks { + public static void checkArray(long[] arg0, int arg1) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/LWJGLException.java b/src/generated/java/org/lwjgl/LWJGLException.java index a5ca362..9d6be62 100644 --- a/src/generated/java/org/lwjgl/LWJGLException.java +++ b/src/generated/java/org/lwjgl/LWJGLException.java @@ -1,3 +1,4 @@ package org.lwjgl; -public class LWJGLException extends java.lang.Exception {} +public class LWJGLException extends java.lang.Exception { +} diff --git a/src/generated/java/org/lwjgl/LWJGLUtil$TokenFilter.java b/src/generated/java/org/lwjgl/LWJGLUtil$TokenFilter.java index a2118e4..62ce3fb 100644 --- a/src/generated/java/org/lwjgl/LWJGLUtil$TokenFilter.java +++ b/src/generated/java/org/lwjgl/LWJGLUtil$TokenFilter.java @@ -1,5 +1,6 @@ package org.lwjgl; public interface LWJGLUtil$TokenFilter { + public abstract boolean accept(java.lang.reflect.Field arg0, int arg1); } diff --git a/src/generated/java/org/lwjgl/LWJGLUtil.java b/src/generated/java/org/lwjgl/LWJGLUtil.java index 9ca3973..1303c11 100644 --- a/src/generated/java/org/lwjgl/LWJGLUtil.java +++ b/src/generated/java/org/lwjgl/LWJGLUtil.java @@ -1,6 +1,7 @@ package org.lwjgl; public class LWJGLUtil { + public static final boolean CHECKS = false; public static final boolean DEBUG = false; public static final java.nio.ByteBuffer LWJGLIcon16x16 = null; @@ -12,23 +13,23 @@ public class LWJGLUtil { public static final int PLATFORM_WINDOWS = (int) 3; public static final java.lang.String PLATFORM_WINDOWS_NAME = "windows"; - public static java.util.Map getClassTokens( - org.lwjgl.LWJGLUtil$TokenFilter arg0, java.util.Map arg1, java.lang.Iterable arg2) { + public static java.util.Map getClassTokens(org.lwjgl.LWJGLUtil$TokenFilter arg0, java.util.Map arg1, + java.lang.Iterable arg2) { throw new UnsupportedOperationException(); } - public static java.util.Map getClassTokens( - org.lwjgl.LWJGLUtil$TokenFilter arg0, java.util.Map arg1, java.lang.Class[] arg2) { + public static java.util.Map getClassTokens(org.lwjgl.LWJGLUtil$TokenFilter arg0, java.util.Map arg1, + java.lang.Class[] arg2) { throw new UnsupportedOperationException(); } - public static java.lang.String[] getLibraryPaths( - java.lang.String arg0, java.lang.String arg1, java.lang.ClassLoader arg2) { + public static java.lang.String[] getLibraryPaths(java.lang.String arg0, java.lang.String arg1, + java.lang.ClassLoader arg2) { throw new UnsupportedOperationException(); } - public static java.lang.String[] getLibraryPaths( - java.lang.String arg0, java.lang.String[] arg1, java.lang.ClassLoader arg2) { + public static java.lang.String[] getLibraryPaths(java.lang.String arg0, java.lang.String[] arg1, + java.lang.ClassLoader arg2) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/MemoryUtil.java b/src/generated/java/org/lwjgl/MemoryUtil.java index 135c3f0..d35390b 100644 --- a/src/generated/java/org/lwjgl/MemoryUtil.java +++ b/src/generated/java/org/lwjgl/MemoryUtil.java @@ -1,6 +1,7 @@ package org.lwjgl; public class MemoryUtil { + public static java.lang.String decodeASCII(java.nio.ByteBuffer arg0) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/PointerWrapper.java b/src/generated/java/org/lwjgl/PointerWrapper.java index 71dc464..e7e7db0 100644 --- a/src/generated/java/org/lwjgl/PointerWrapper.java +++ b/src/generated/java/org/lwjgl/PointerWrapper.java @@ -1,5 +1,6 @@ package org.lwjgl; public interface PointerWrapper { + public abstract long getPointer(); } diff --git a/src/generated/java/org/lwjgl/PointerWrapperAbstract.java b/src/generated/java/org/lwjgl/PointerWrapperAbstract.java index b97651a..28ce292 100644 --- a/src/generated/java/org/lwjgl/PointerWrapperAbstract.java +++ b/src/generated/java/org/lwjgl/PointerWrapperAbstract.java @@ -1,6 +1,7 @@ package org.lwjgl; public abstract class PointerWrapperAbstract { + public final void checkValid() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/Sys.java b/src/generated/java/org/lwjgl/Sys.java index 757dd4f..a2445c8 100644 --- a/src/generated/java/org/lwjgl/Sys.java +++ b/src/generated/java/org/lwjgl/Sys.java @@ -1,6 +1,7 @@ package org.lwjgl; public class Sys { + public static void alert(java.lang.String arg0, java.lang.String arg1) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/input/Controller.java b/src/generated/java/org/lwjgl/input/Controller.java index 3d89a23..6cda7f5 100644 --- a/src/generated/java/org/lwjgl/input/Controller.java +++ b/src/generated/java/org/lwjgl/input/Controller.java @@ -1,6 +1,7 @@ package org.lwjgl.input; public interface Controller { + public abstract int getAxisCount(); public abstract java.lang.String getAxisName(int arg0); diff --git a/src/generated/java/org/lwjgl/input/Controllers.java b/src/generated/java/org/lwjgl/input/Controllers.java index c54f171..3d5cb67 100644 --- a/src/generated/java/org/lwjgl/input/Controllers.java +++ b/src/generated/java/org/lwjgl/input/Controllers.java @@ -1,6 +1,7 @@ package org.lwjgl.input; public class Controllers { + public static void clearEvents() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/input/Cursor.java b/src/generated/java/org/lwjgl/input/Cursor.java index b1bd34e..2fe41fa 100644 --- a/src/generated/java/org/lwjgl/input/Cursor.java +++ b/src/generated/java/org/lwjgl/input/Cursor.java @@ -1,6 +1,7 @@ package org.lwjgl.input; public class Cursor { + public static final int CURSOR_8_BIT_ALPHA = (int) 2; public static final int CURSOR_ANIMATION = (int) 4; public static final int CURSOR_ONE_BIT_TRANSPARENCY = (int) 1; diff --git a/src/generated/java/org/lwjgl/input/Keyboard.java b/src/generated/java/org/lwjgl/input/Keyboard.java index 9a159a1..f4bff78 100644 --- a/src/generated/java/org/lwjgl/input/Keyboard.java +++ b/src/generated/java/org/lwjgl/input/Keyboard.java @@ -1,6 +1,7 @@ package org.lwjgl.input; public class Keyboard { + public static final int CHAR_NONE = (int) 0; public static final int EVENT_SIZE = (int) 18; public static final int KEYBOARD_SIZE = (int) 256; diff --git a/src/generated/java/org/lwjgl/input/Mouse.java b/src/generated/java/org/lwjgl/input/Mouse.java index a3bc5bd..8600d99 100644 --- a/src/generated/java/org/lwjgl/input/Mouse.java +++ b/src/generated/java/org/lwjgl/input/Mouse.java @@ -1,6 +1,7 @@ package org.lwjgl.input; public class Mouse { + public static final int EVENT_SIZE = (int) 22; public static void create() { diff --git a/src/generated/java/org/lwjgl/openal/ALCcontext.java b/src/generated/java/org/lwjgl/openal/ALCcontext.java index 06a20ec..a4b663e 100644 --- a/src/generated/java/org/lwjgl/openal/ALCcontext.java +++ b/src/generated/java/org/lwjgl/openal/ALCcontext.java @@ -1,6 +1,7 @@ package org.lwjgl.openal; public class ALCcontext { + public boolean equals(java.lang.Object arg0) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/openal/ALCdevice.java b/src/generated/java/org/lwjgl/openal/ALCdevice.java index 5c7004e..92ad99c 100644 --- a/src/generated/java/org/lwjgl/openal/ALCdevice.java +++ b/src/generated/java/org/lwjgl/openal/ALCdevice.java @@ -1,6 +1,7 @@ package org.lwjgl.openal; public class ALCdevice { + public boolean equals(java.lang.Object arg0) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/openal/EFX10.java b/src/generated/java/org/lwjgl/openal/EFX10.java index 4a2a134..a707d94 100644 --- a/src/generated/java/org/lwjgl/openal/EFX10.java +++ b/src/generated/java/org/lwjgl/openal/EFX10.java @@ -1,6 +1,7 @@ package org.lwjgl.openal; public class EFX10 { + public static final int ALC_EFX_MAJOR_VERSION = (int) 131073; public static final int ALC_EFX_MINOR_VERSION = (int) 131074; public static final java.lang.String ALC_EXT_EFX_NAME = "ALC_EXT_EFX"; diff --git a/src/generated/java/org/lwjgl/openal/EFXUtil.java b/src/generated/java/org/lwjgl/openal/EFXUtil.java index 4b1162e..9066589 100644 --- a/src/generated/java/org/lwjgl/openal/EFXUtil.java +++ b/src/generated/java/org/lwjgl/openal/EFXUtil.java @@ -1,6 +1,7 @@ package org.lwjgl.openal; public class EFXUtil { + public static boolean isEffectSupported(int arg0) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/openal/OpenALException.java b/src/generated/java/org/lwjgl/openal/OpenALException.java index c705bda..2de3283 100644 --- a/src/generated/java/org/lwjgl/openal/OpenALException.java +++ b/src/generated/java/org/lwjgl/openal/OpenALException.java @@ -1,6 +1,7 @@ package org.lwjgl.openal; public class OpenALException extends org.lwjglx.openal.OpenALException { + private static final long serialVersionUID = 1L; /** @@ -19,6 +20,7 @@ public class OpenALException extends org.lwjglx.openal.OpenALException { /** * Constructor for OpenALException. + * * @param message */ public OpenALException(String message) { @@ -27,6 +29,7 @@ public class OpenALException extends org.lwjglx.openal.OpenALException { /** * Constructor for OpenALException. + * * @param message * @param cause */ @@ -36,6 +39,7 @@ public class OpenALException extends org.lwjglx.openal.OpenALException { /** * Constructor for OpenALException. + * * @param cause */ public OpenALException(Throwable cause) { diff --git a/src/generated/java/org/lwjgl/openal/Util.java b/src/generated/java/org/lwjgl/openal/Util.java index a9d7ec8..95a63b1 100644 --- a/src/generated/java/org/lwjgl/openal/Util.java +++ b/src/generated/java/org/lwjgl/openal/Util.java @@ -1,6 +1,7 @@ package org.lwjgl.openal; public class Util { + public static void checkALCError(org.lwjgl.openal.ALCdevice arg0) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/AMDDebugOutputCallback$Handler.java b/src/generated/java/org/lwjgl/opengl/AMDDebugOutputCallback$Handler.java index d1d0a3a..891199c 100644 --- a/src/generated/java/org/lwjgl/opengl/AMDDebugOutputCallback$Handler.java +++ b/src/generated/java/org/lwjgl/opengl/AMDDebugOutputCallback$Handler.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public interface AMDDebugOutputCallback$Handler { + public abstract void handleMessage(int arg0, int arg1, int arg2, java.lang.String arg3); } diff --git a/src/generated/java/org/lwjgl/opengl/AMDDebugOutputCallback.java b/src/generated/java/org/lwjgl/opengl/AMDDebugOutputCallback.java index 3c15dbd..3dd7d62 100644 --- a/src/generated/java/org/lwjgl/opengl/AMDDebugOutputCallback.java +++ b/src/generated/java/org/lwjgl/opengl/AMDDebugOutputCallback.java @@ -1,3 +1,4 @@ package org.lwjgl.opengl; -public class AMDDebugOutputCallback extends org.lwjgl.PointerWrapperAbstract {} +public class AMDDebugOutputCallback extends org.lwjgl.PointerWrapperAbstract { +} diff --git a/src/generated/java/org/lwjgl/opengl/AMDMultiDrawIndirect.java b/src/generated/java/org/lwjgl/opengl/AMDMultiDrawIndirect.java index 0411f0b..fffcd11 100644 --- a/src/generated/java/org/lwjgl/opengl/AMDMultiDrawIndirect.java +++ b/src/generated/java/org/lwjgl/opengl/AMDMultiDrawIndirect.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class AMDMultiDrawIndirect { + public static void glMultiDrawArraysIndirectAMD(int arg0, long arg1, int arg2, int arg3) { throw new UnsupportedOperationException(); } @@ -17,8 +18,8 @@ public class AMDMultiDrawIndirect { throw new UnsupportedOperationException(); } - public static void glMultiDrawElementsIndirectAMD( - int arg0, int arg1, java.nio.ByteBuffer arg2, int arg3, int arg4) { + public static void glMultiDrawElementsIndirectAMD(int arg0, int arg1, java.nio.ByteBuffer arg2, int arg3, + int arg4) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/AMDNameGenDelete.java b/src/generated/java/org/lwjgl/opengl/AMDNameGenDelete.java index b1b7080..3fbabdf 100644 --- a/src/generated/java/org/lwjgl/opengl/AMDNameGenDelete.java +++ b/src/generated/java/org/lwjgl/opengl/AMDNameGenDelete.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class AMDNameGenDelete { + public static final int GL_DATA_BUFFER_AMD = (int) 37201; public static final int GL_PERFORMANCE_MONITOR_AMD = (int) 37202; public static final int GL_QUERY_OBJECT_AMD = (int) 37203; diff --git a/src/generated/java/org/lwjgl/opengl/APPLEAuxDepthStencil.java b/src/generated/java/org/lwjgl/opengl/APPLEAuxDepthStencil.java index ed8e7c8..413bc1c 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEAuxDepthStencil.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEAuxDepthStencil.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public class APPLEAuxDepthStencil { + public static final int GL_AUX_DEPTH_STENCIL_APPLE = (int) 35348; } diff --git a/src/generated/java/org/lwjgl/opengl/APPLEClientStorage.java b/src/generated/java/org/lwjgl/opengl/APPLEClientStorage.java index c9dbb59..e32a35f 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEClientStorage.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEClientStorage.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public class APPLEClientStorage { + public static final int GL_UNPACK_CLIENT_STORAGE_APPLE = (int) 34226; } diff --git a/src/generated/java/org/lwjgl/opengl/APPLEElementArray.java b/src/generated/java/org/lwjgl/opengl/APPLEElementArray.java index c28fd1d..1b2bf93 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEElementArray.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEElementArray.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLEElementArray { + public static final int GL_ELEMENT_ARRAY_APPLE = (int) 34664; public static final int GL_ELEMENT_ARRAY_POINTER_APPLE = (int) 34666; public static final int GL_ELEMENT_ARRAY_TYPE_APPLE = (int) 34665; @@ -29,8 +30,8 @@ public class APPLEElementArray { throw new UnsupportedOperationException(); } - public static void glMultiDrawRangeElementArrayAPPLE( - int arg0, int arg1, int arg2, java.nio.IntBuffer arg3, java.nio.IntBuffer arg4) { + public static void glMultiDrawRangeElementArrayAPPLE(int arg0, int arg1, int arg2, java.nio.IntBuffer arg3, + java.nio.IntBuffer arg4) { throw new UnsupportedOperationException(); } } diff --git a/src/generated/java/org/lwjgl/opengl/APPLEFence.java b/src/generated/java/org/lwjgl/opengl/APPLEFence.java index 437653b..633d411 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEFence.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEFence.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLEFence { + public static final int GL_DRAW_PIXELS_APPLE = (int) 35338; public static final int GL_FENCE_APPLE = (int) 35339; diff --git a/src/generated/java/org/lwjgl/opengl/APPLEFloatPixels.java b/src/generated/java/org/lwjgl/opengl/APPLEFloatPixels.java index b155508..491aaa1 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEFloatPixels.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEFloatPixels.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLEFloatPixels { + public static final int GL_ALPHA_FLOAT16_APPLE = (int) 34844; public static final int GL_ALPHA_FLOAT32_APPLE = (int) 34838; public static final int GL_COLOR_FLOAT_APPLE = (int) 35343; diff --git a/src/generated/java/org/lwjgl/opengl/APPLEFlushBufferRange.java b/src/generated/java/org/lwjgl/opengl/APPLEFlushBufferRange.java index 4df7c00..f32bac9 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEFlushBufferRange.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEFlushBufferRange.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLEFlushBufferRange { + public static final int GL_BUFFER_FLUSHING_UNMAP_APPLE = (int) 35347; public static final int GL_BUFFER_SERIALIZED_MODIFY_APPLE = (int) 35346; diff --git a/src/generated/java/org/lwjgl/opengl/APPLEObjectPurgeable.java b/src/generated/java/org/lwjgl/opengl/APPLEObjectPurgeable.java index 9fceeaa..10caab6 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEObjectPurgeable.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEObjectPurgeable.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLEObjectPurgeable { + public static final int GL_BUFFER_OBJECT_APPLE = (int) 34227; public static final int GL_PURGEABLE_APPLE = (int) 35357; public static final int GL_RELEASED_APPLE = (int) 35353; diff --git a/src/generated/java/org/lwjgl/opengl/APPLEPackedPixels.java b/src/generated/java/org/lwjgl/opengl/APPLEPackedPixels.java index 4c5a904..dcac4c8 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEPackedPixels.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEPackedPixels.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLEPackedPixels { + public static final int GL_UNSIGNED_BYTE_2_3_3_REV = (int) 33634; public static final int GL_UNSIGNED_BYTE_3_3_2 = (int) 32818; public static final int GL_UNSIGNED_INT_10_10_10_2 = (int) 32822; diff --git a/src/generated/java/org/lwjgl/opengl/APPLERgb422.java b/src/generated/java/org/lwjgl/opengl/APPLERgb422.java index 931c194..af97df7 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLERgb422.java +++ b/src/generated/java/org/lwjgl/opengl/APPLERgb422.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLERgb422 { + public static final int GL_RGB_422_APPLE = (int) 35359; public static final int GL_UNSIGNED_SHORT_8_8_APPLE = (int) 34234; public static final int GL_UNSIGNED_SHORT_8_8_REV_APPLE = (int) 34235; diff --git a/src/generated/java/org/lwjgl/opengl/APPLERowBytes.java b/src/generated/java/org/lwjgl/opengl/APPLERowBytes.java index 395e499..15f2cc7 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLERowBytes.java +++ b/src/generated/java/org/lwjgl/opengl/APPLERowBytes.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLERowBytes { + public static final int GL_PACK_ROW_BYTES_APPLE = (int) 35349; public static final int GL_UNPACK_ROW_BYTES_APPLE = (int) 35350; } diff --git a/src/generated/java/org/lwjgl/opengl/APPLETextureRange.java b/src/generated/java/org/lwjgl/opengl/APPLETextureRange.java index 7688ff9..dc06e73 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLETextureRange.java +++ b/src/generated/java/org/lwjgl/opengl/APPLETextureRange.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLETextureRange { + public static final int GL_STORAGE_CACHED_APPLE = (int) 34238; public static final int GL_STORAGE_PRIVATE_APPLE = (int) 34237; public static final int GL_STORAGE_SHARED_APPLE = (int) 34239; diff --git a/src/generated/java/org/lwjgl/opengl/APPLEVertexArrayObject.java b/src/generated/java/org/lwjgl/opengl/APPLEVertexArrayObject.java index 1293fb7..f2dfe97 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEVertexArrayObject.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEVertexArrayObject.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLEVertexArrayObject { + public static final int GL_VERTEX_ARRAY_BINDING_APPLE = (int) 34229; public static void glBindVertexArrayAPPLE(int arg0) { diff --git a/src/generated/java/org/lwjgl/opengl/APPLEVertexArrayRange.java b/src/generated/java/org/lwjgl/opengl/APPLEVertexArrayRange.java index 89b5ed5..0ca854e 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEVertexArrayRange.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEVertexArrayRange.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLEVertexArrayRange { + public static final int GL_DRAW_PIXELS_APPLE = (int) 35338; public static final int GL_FENCE_APPLE = (int) 35339; public static final int GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE = (int) 34080; diff --git a/src/generated/java/org/lwjgl/opengl/APPLEVertexProgramEvaluators.java b/src/generated/java/org/lwjgl/opengl/APPLEVertexProgramEvaluators.java index c7f25d9..1245ef7 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEVertexProgramEvaluators.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEVertexProgramEvaluators.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLEVertexProgramEvaluators { + public static final int GL_VERTEX_ATTRIB_MAP1_APPLE = (int) 35328; public static final int GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE = (int) 35331; public static final int GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE = (int) 35333; @@ -24,43 +25,23 @@ public class APPLEVertexProgramEvaluators { throw new UnsupportedOperationException(); } - public static void glMapVertexAttrib1dAPPLE( - int arg0, int arg1, double arg2, double arg3, int arg4, int arg5, java.nio.DoubleBuffer arg6) { + public static void glMapVertexAttrib1dAPPLE(int arg0, int arg1, double arg2, double arg3, int arg4, int arg5, + java.nio.DoubleBuffer arg6) { throw new UnsupportedOperationException(); } - public static void glMapVertexAttrib1fAPPLE( - int arg0, int arg1, float arg2, float arg3, int arg4, int arg5, java.nio.FloatBuffer arg6) { + public static void glMapVertexAttrib1fAPPLE(int arg0, int arg1, float arg2, float arg3, int arg4, int arg5, + java.nio.FloatBuffer arg6) { throw new UnsupportedOperationException(); } - public static void glMapVertexAttrib2dAPPLE( - int arg0, - int arg1, - double arg2, - double arg3, - int arg4, - int arg5, - double arg6, - double arg7, - int arg8, - int arg9, - java.nio.DoubleBuffer arg10) { + public static void glMapVertexAttrib2dAPPLE(int arg0, int arg1, double arg2, double arg3, int arg4, int arg5, + double arg6, double arg7, int arg8, int arg9, java.nio.DoubleBuffer arg10) { throw new UnsupportedOperationException(); } - public static void glMapVertexAttrib2fAPPLE( - int arg0, - int arg1, - float arg2, - float arg3, - int arg4, - int arg5, - float arg6, - float arg7, - int arg8, - int arg9, - java.nio.FloatBuffer arg10) { + public static void glMapVertexAttrib2fAPPLE(int arg0, int arg1, float arg2, float arg3, int arg4, int arg5, + float arg6, float arg7, int arg8, int arg9, java.nio.FloatBuffer arg10) { throw new UnsupportedOperationException(); } } diff --git a/src/generated/java/org/lwjgl/opengl/APPLEYcbcr422.java b/src/generated/java/org/lwjgl/opengl/APPLEYcbcr422.java index 5bc1214..a2f9a35 100644 --- a/src/generated/java/org/lwjgl/opengl/APPLEYcbcr422.java +++ b/src/generated/java/org/lwjgl/opengl/APPLEYcbcr422.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class APPLEYcbcr422 { + public static final int GL_UNSIGNED_SHORT_8_8_APPLE = (int) 34234; public static final int GL_UNSIGNED_SHORT_8_8_REV_APPLE = (int) 34235; public static final int GL_YCBCR_422_APPLE = (int) 34233; diff --git a/src/generated/java/org/lwjgl/opengl/ARBBufferObject.java b/src/generated/java/org/lwjgl/opengl/ARBBufferObject.java index b092e3a..3a9ef54 100644 --- a/src/generated/java/org/lwjgl/opengl/ARBBufferObject.java +++ b/src/generated/java/org/lwjgl/opengl/ARBBufferObject.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ARBBufferObject { + public static final int GL_BUFFER_ACCESS_ARB = (int) 35003; public static final int GL_BUFFER_MAPPED_ARB = (int) 35004; public static final int GL_BUFFER_MAP_POINTER_ARB = (int) 35005; diff --git a/src/generated/java/org/lwjgl/opengl/ARBDebugOutputCallback$Handler.java b/src/generated/java/org/lwjgl/opengl/ARBDebugOutputCallback$Handler.java index 15c66f6..058cf1c 100644 --- a/src/generated/java/org/lwjgl/opengl/ARBDebugOutputCallback$Handler.java +++ b/src/generated/java/org/lwjgl/opengl/ARBDebugOutputCallback$Handler.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public interface ARBDebugOutputCallback$Handler { + public abstract void handleMessage(int arg0, int arg1, int arg2, int arg3, java.lang.String arg4); } diff --git a/src/generated/java/org/lwjgl/opengl/ARBDebugOutputCallback.java b/src/generated/java/org/lwjgl/opengl/ARBDebugOutputCallback.java index fb83d5d..540691d 100644 --- a/src/generated/java/org/lwjgl/opengl/ARBDebugOutputCallback.java +++ b/src/generated/java/org/lwjgl/opengl/ARBDebugOutputCallback.java @@ -1,3 +1,4 @@ package org.lwjgl.opengl; -public class ARBDebugOutputCallback extends org.lwjgl.PointerWrapperAbstract {} +public class ARBDebugOutputCallback extends org.lwjgl.PointerWrapperAbstract { +} diff --git a/src/generated/java/org/lwjgl/opengl/ARBGpuShader5.java b/src/generated/java/org/lwjgl/opengl/ARBGpuShader5.java index 391897f..ca2a480 100644 --- a/src/generated/java/org/lwjgl/opengl/ARBGpuShader5.java +++ b/src/generated/java/org/lwjgl/opengl/ARBGpuShader5.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ARBGpuShader5 { + public static final int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = (int) 36445; public static final int GL_GEOMETRY_SHADER_INVOCATIONS = (int) 34943; public static final int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = (int) 36444; diff --git a/src/generated/java/org/lwjgl/opengl/ARBGpuShaderFp64.java b/src/generated/java/org/lwjgl/opengl/ARBGpuShaderFp64.java index 6f445c6..906786b 100644 --- a/src/generated/java/org/lwjgl/opengl/ARBGpuShaderFp64.java +++ b/src/generated/java/org/lwjgl/opengl/ARBGpuShaderFp64.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ARBGpuShaderFp64 { + public static final int GL_DOUBLE_MAT2 = (int) 36678; public static final int GL_DOUBLE_MAT2x3 = (int) 36681; public static final int GL_DOUBLE_MAT2x4 = (int) 36682; diff --git a/src/generated/java/org/lwjgl/opengl/ARBProgram.java b/src/generated/java/org/lwjgl/opengl/ARBProgram.java index 835d0ab..5757dd8 100644 --- a/src/generated/java/org/lwjgl/opengl/ARBProgram.java +++ b/src/generated/java/org/lwjgl/opengl/ARBProgram.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ARBProgram { + public static final int GL_CURRENT_MATRIX_ARB = (int) 34369; public static final int GL_CURRENT_MATRIX_STACK_DEPTH_ARB = (int) 34368; public static final int GL_MATRIX0_ARB = (int) 35008; @@ -133,8 +134,8 @@ public class ARBProgram { throw new UnsupportedOperationException(); } - public static void glProgramEnvParameter4dARB( - int arg0, int arg1, double arg2, double arg3, double arg4, double arg5) { + public static void glProgramEnvParameter4dARB(int arg0, int arg1, double arg2, double arg3, double arg4, + double arg5) { throw new UnsupportedOperationException(); } @@ -150,13 +151,13 @@ public class ARBProgram { throw new UnsupportedOperationException(); } - public static void glProgramLocalParameter4dARB( - int arg0, int arg1, double arg2, double arg3, double arg4, double arg5) { + public static void glProgramLocalParameter4dARB(int arg0, int arg1, double arg2, double arg3, double arg4, + double arg5) { throw new UnsupportedOperationException(); } - public static void glProgramLocalParameter4fARB( - int arg0, int arg1, float arg2, float arg3, float arg4, float arg5) { + public static void glProgramLocalParameter4fARB(int arg0, int arg1, float arg2, float arg3, float arg4, + float arg5) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/ARBTextureRg.java b/src/generated/java/org/lwjgl/opengl/ARBTextureRg.java index 0f82653..b527194 100644 --- a/src/generated/java/org/lwjgl/opengl/ARBTextureRg.java +++ b/src/generated/java/org/lwjgl/opengl/ARBTextureRg.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ARBTextureRg { + public static final int GL_R16 = (int) 33322; public static final int GL_R16F = (int) 33325; public static final int GL_R16I = (int) 33331; diff --git a/src/generated/java/org/lwjgl/opengl/ARBVertexArrayBgra.java b/src/generated/java/org/lwjgl/opengl/ARBVertexArrayBgra.java index b17274c..1f98209 100644 --- a/src/generated/java/org/lwjgl/opengl/ARBVertexArrayBgra.java +++ b/src/generated/java/org/lwjgl/opengl/ARBVertexArrayBgra.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public class ARBVertexArrayBgra { + public static final int GL_BGRA = (int) 32993; } diff --git a/src/generated/java/org/lwjgl/opengl/ARBVertexAttrib64bit.java b/src/generated/java/org/lwjgl/opengl/ARBVertexAttrib64bit.java index 12d0f47..ef72ef7 100644 --- a/src/generated/java/org/lwjgl/opengl/ARBVertexAttrib64bit.java +++ b/src/generated/java/org/lwjgl/opengl/ARBVertexAttrib64bit.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ARBVertexAttrib64bit { + public static final int GL_DOUBLE_MAT2 = (int) 36678; public static final int GL_DOUBLE_MAT2x3 = (int) 36681; public static final int GL_DOUBLE_MAT2x4 = (int) 36682; @@ -18,8 +19,8 @@ public class ARBVertexAttrib64bit { throw new UnsupportedOperationException(); } - public static void glVertexArrayVertexAttribLOffsetEXT( - int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, long arg6) { + public static void glVertexArrayVertexAttribLOffsetEXT(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, + long arg6) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/ATIDrawBuffers.java b/src/generated/java/org/lwjgl/opengl/ATIDrawBuffers.java index 08bd927..74ec742 100644 --- a/src/generated/java/org/lwjgl/opengl/ATIDrawBuffers.java +++ b/src/generated/java/org/lwjgl/opengl/ATIDrawBuffers.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATIDrawBuffers { + public static final int GL_DRAW_BUFFER0_ATI = (int) 34853; public static final int GL_DRAW_BUFFER10_ATI = (int) 34863; public static final int GL_DRAW_BUFFER11_ATI = (int) 34864; diff --git a/src/generated/java/org/lwjgl/opengl/ATIElementArray.java b/src/generated/java/org/lwjgl/opengl/ATIElementArray.java index 8affb18..d25f51c 100644 --- a/src/generated/java/org/lwjgl/opengl/ATIElementArray.java +++ b/src/generated/java/org/lwjgl/opengl/ATIElementArray.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATIElementArray { + public static final int GL_ELEMENT_ARRAY_ATI = (int) 34664; public static final int GL_ELEMENT_ARRAY_POINTER_ATI = (int) 34666; public static final int GL_ELEMENT_ARRAY_TYPE_ATI = (int) 34665; diff --git a/src/generated/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java b/src/generated/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java index e88845a..111b3a9 100644 --- a/src/generated/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java +++ b/src/generated/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATIEnvmapBumpmap { + public static final int GL_BUMP_ENVMAP_ATI = (int) 34683; public static final int GL_BUMP_NUM_TEX_UNITS_ATI = (int) 34679; public static final int GL_BUMP_ROT_MATRIX_ATI = (int) 34677; diff --git a/src/generated/java/org/lwjgl/opengl/ATIFragmentShader.java b/src/generated/java/org/lwjgl/opengl/ATIFragmentShader.java index 868c8fa..7e0738b 100644 --- a/src/generated/java/org/lwjgl/opengl/ATIFragmentShader.java +++ b/src/generated/java/org/lwjgl/opengl/ATIFragmentShader.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATIFragmentShader { + public static final int GL_2X_BIT_ATI = (int) 1; public static final int GL_4X_BIT_ATI = (int) 2; public static final int GL_8X_BIT_ATI = (int) 4; @@ -110,24 +111,13 @@ public class ATIFragmentShader { throw new UnsupportedOperationException(); } - public static void glAlphaFragmentOp2ATI( - int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8) { + public static void glAlphaFragmentOp2ATI(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, + int arg7, int arg8) { throw new UnsupportedOperationException(); } - public static void glAlphaFragmentOp3ATI( - int arg0, - int arg1, - int arg2, - int arg3, - int arg4, - int arg5, - int arg6, - int arg7, - int arg8, - int arg9, - int arg10, - int arg11) { + public static void glAlphaFragmentOp3ATI(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, + int arg7, int arg8, int arg9, int arg10, int arg11) { throw new UnsupportedOperationException(); } @@ -143,25 +133,13 @@ public class ATIFragmentShader { throw new UnsupportedOperationException(); } - public static void glColorFragmentOp2ATI( - int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9) { + public static void glColorFragmentOp2ATI(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, + int arg7, int arg8, int arg9) { throw new UnsupportedOperationException(); } - public static void glColorFragmentOp3ATI( - int arg0, - int arg1, - int arg2, - int arg3, - int arg4, - int arg5, - int arg6, - int arg7, - int arg8, - int arg9, - int arg10, - int arg11, - int arg12) { + public static void glColorFragmentOp3ATI(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, + int arg7, int arg8, int arg9, int arg10, int arg11, int arg12) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/ATIMapObjectBuffer.java b/src/generated/java/org/lwjgl/opengl/ATIMapObjectBuffer.java index 1b4b6f8..59f9aa7 100644 --- a/src/generated/java/org/lwjgl/opengl/ATIMapObjectBuffer.java +++ b/src/generated/java/org/lwjgl/opengl/ATIMapObjectBuffer.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATIMapObjectBuffer { + public static java.nio.ByteBuffer glMapObjectBufferATI(int arg0, long arg1, java.nio.ByteBuffer arg2) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/ATIPnTriangles.java b/src/generated/java/org/lwjgl/opengl/ATIPnTriangles.java index 11545ae..1a5db4a 100644 --- a/src/generated/java/org/lwjgl/opengl/ATIPnTriangles.java +++ b/src/generated/java/org/lwjgl/opengl/ATIPnTriangles.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATIPnTriangles { + public static final int GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = (int) 34801; public static final int GL_PN_TRIANGLES_ATI = (int) 34800; public static final int GL_PN_TRIANGLES_NORMAL_MODE_ATI = (int) 34803; diff --git a/src/generated/java/org/lwjgl/opengl/ATISeparateStencil.java b/src/generated/java/org/lwjgl/opengl/ATISeparateStencil.java index f7c271d..3047f2a 100644 --- a/src/generated/java/org/lwjgl/opengl/ATISeparateStencil.java +++ b/src/generated/java/org/lwjgl/opengl/ATISeparateStencil.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATISeparateStencil { + public static final int GL_STENCIL_BACK_FAIL_ATI = (int) 34817; public static final int GL_STENCIL_BACK_FUNC_ATI = (int) 34816; public static final int GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = (int) 34818; diff --git a/src/generated/java/org/lwjgl/opengl/ATITextFragmentShader.java b/src/generated/java/org/lwjgl/opengl/ATITextFragmentShader.java index 26bdfdc..a6c57f8 100644 --- a/src/generated/java/org/lwjgl/opengl/ATITextFragmentShader.java +++ b/src/generated/java/org/lwjgl/opengl/ATITextFragmentShader.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public class ATITextFragmentShader { + public static final int GL_TEXT_FRAGMENT_SHADER_ATI = (int) 33280; } diff --git a/src/generated/java/org/lwjgl/opengl/ATITextureEnvCombine3.java b/src/generated/java/org/lwjgl/opengl/ATITextureEnvCombine3.java index 05529a9..d405e19 100644 --- a/src/generated/java/org/lwjgl/opengl/ATITextureEnvCombine3.java +++ b/src/generated/java/org/lwjgl/opengl/ATITextureEnvCombine3.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATITextureEnvCombine3 { + public static final int GL_MODULATE_ADD_ATI = (int) 34628; public static final int GL_MODULATE_SIGNED_ADD_ATI = (int) 34629; public static final int GL_MODULATE_SUBTRACT_ATI = (int) 34630; diff --git a/src/generated/java/org/lwjgl/opengl/ATITextureFloat.java b/src/generated/java/org/lwjgl/opengl/ATITextureFloat.java index cde7349..29a83f1 100644 --- a/src/generated/java/org/lwjgl/opengl/ATITextureFloat.java +++ b/src/generated/java/org/lwjgl/opengl/ATITextureFloat.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATITextureFloat { + public static final int GL_ALPHA_FLOAT16_ATI = (int) 34844; public static final int GL_ALPHA_FLOAT32_ATI = (int) 34838; public static final int GL_INTENSITY_FLOAT16_ATI = (int) 34845; diff --git a/src/generated/java/org/lwjgl/opengl/ATITextureMirrorOnce.java b/src/generated/java/org/lwjgl/opengl/ATITextureMirrorOnce.java index d7d300b..748579c 100644 --- a/src/generated/java/org/lwjgl/opengl/ATITextureMirrorOnce.java +++ b/src/generated/java/org/lwjgl/opengl/ATITextureMirrorOnce.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATITextureMirrorOnce { + public static final int GL_MIRROR_CLAMP_ATI = (int) 34626; public static final int GL_MIRROR_CLAMP_TO_EDGE_ATI = (int) 34627; } diff --git a/src/generated/java/org/lwjgl/opengl/ATIVertexArrayObject.java b/src/generated/java/org/lwjgl/opengl/ATIVertexArrayObject.java index 85ce803..f4f6c1b 100644 --- a/src/generated/java/org/lwjgl/opengl/ATIVertexArrayObject.java +++ b/src/generated/java/org/lwjgl/opengl/ATIVertexArrayObject.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATIVertexArrayObject { + public static final int GL_ARRAY_OBJECT_BUFFER_ATI = (int) 34662; public static final int GL_ARRAY_OBJECT_OFFSET_ATI = (int) 34663; public static final int GL_DISCARD_ATI = (int) 34659; diff --git a/src/generated/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java b/src/generated/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java index cc1b28b..70d032e 100644 --- a/src/generated/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java +++ b/src/generated/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATIVertexAttribArrayObject { + public static void glGetVertexAttribArrayObjectATI(int arg0, int arg1, java.nio.FloatBuffer arg2) { throw new UnsupportedOperationException(); } @@ -9,8 +10,8 @@ public class ATIVertexAttribArrayObject { throw new UnsupportedOperationException(); } - public static void glVertexAttribArrayObjectATI( - int arg0, int arg1, int arg2, boolean arg3, int arg4, int arg5, int arg6) { + public static void glVertexAttribArrayObjectATI(int arg0, int arg1, int arg2, boolean arg3, int arg4, int arg5, + int arg6) { throw new UnsupportedOperationException(); } } diff --git a/src/generated/java/org/lwjgl/opengl/ATIVertexStreams.java b/src/generated/java/org/lwjgl/opengl/ATIVertexStreams.java index cd703d9..9c20d4c 100644 --- a/src/generated/java/org/lwjgl/opengl/ATIVertexStreams.java +++ b/src/generated/java/org/lwjgl/opengl/ATIVertexStreams.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ATIVertexStreams { + public static final int GL_MAX_VERTEX_STREAMS_ATI = (int) 34667; public static final int GL_VERTEX_SOURCE_ATI = (int) 34668; public static final int GL_VERTEX_STREAM0_ATI = (int) 34669; diff --git a/src/generated/java/org/lwjgl/opengl/ContextAttribs.java b/src/generated/java/org/lwjgl/opengl/ContextAttribs.java index 7e0d4af..673a6d4 100644 --- a/src/generated/java/org/lwjgl/opengl/ContextAttribs.java +++ b/src/generated/java/org/lwjgl/opengl/ContextAttribs.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ContextAttribs { + public static final int CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = (int) 2; public static final int CONTEXT_CORE_PROFILE_BIT_ARB = (int) 1; public static final int CONTEXT_DEBUG_BIT_ARB = (int) 1; diff --git a/src/generated/java/org/lwjgl/opengl/ContextCapabilities.java b/src/generated/java/org/lwjgl/opengl/ContextCapabilities.java index 9cedd64..8151228 100644 --- a/src/generated/java/org/lwjgl/opengl/ContextCapabilities.java +++ b/src/generated/java/org/lwjgl/opengl/ContextCapabilities.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class ContextCapabilities { + public final boolean GL_AMD_blend_minmax_factor = false; public final boolean GL_AMD_conservative_depth = false; public final boolean GL_AMD_debug_output = false; diff --git a/src/generated/java/org/lwjgl/opengl/Display.java b/src/generated/java/org/lwjgl/opengl/Display.java index 324ed62..43d789c 100644 --- a/src/generated/java/org/lwjgl/opengl/Display.java +++ b/src/generated/java/org/lwjgl/opengl/Display.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class Display { + public static void create() { throw new UnsupportedOperationException(); } @@ -17,8 +18,8 @@ public class Display { throw new UnsupportedOperationException(); } - public static void create( - org.lwjgl.opengl.PixelFormat arg0, org.lwjgl.opengl.Drawable arg1, org.lwjgl.opengl.ContextAttribs arg2) { + public static void create(org.lwjgl.opengl.PixelFormat arg0, org.lwjgl.opengl.Drawable arg1, + org.lwjgl.opengl.ContextAttribs arg2) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/DisplayMode.java b/src/generated/java/org/lwjgl/opengl/DisplayMode.java index a0bb3df..d7c9b41 100644 --- a/src/generated/java/org/lwjgl/opengl/DisplayMode.java +++ b/src/generated/java/org/lwjgl/opengl/DisplayMode.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class DisplayMode { + public boolean equals(java.lang.Object arg0) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/Drawable.java b/src/generated/java/org/lwjgl/opengl/Drawable.java index c9cc55a..2e62194 100644 --- a/src/generated/java/org/lwjgl/opengl/Drawable.java +++ b/src/generated/java/org/lwjgl/opengl/Drawable.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public interface Drawable { + public abstract void destroy(); public abstract boolean isCurrent(); diff --git a/src/generated/java/org/lwjgl/opengl/EXTAbgr.java b/src/generated/java/org/lwjgl/opengl/EXTAbgr.java index 13380eb..5e7e57a 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTAbgr.java +++ b/src/generated/java/org/lwjgl/opengl/EXTAbgr.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public class EXTAbgr { + public static final int GL_ABGR_EXT = (int) 32768; } diff --git a/src/generated/java/org/lwjgl/opengl/EXTBgra.java b/src/generated/java/org/lwjgl/opengl/EXTBgra.java index 7d18676..cd5f499 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTBgra.java +++ b/src/generated/java/org/lwjgl/opengl/EXTBgra.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTBgra { + public static final int GL_BGRA_EXT = (int) 32993; public static final int GL_BGR_EXT = (int) 32992; } diff --git a/src/generated/java/org/lwjgl/opengl/EXTCgShader.java b/src/generated/java/org/lwjgl/opengl/EXTCgShader.java index eb39b09..0a3c376 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTCgShader.java +++ b/src/generated/java/org/lwjgl/opengl/EXTCgShader.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTCgShader { + public static final int GL_CG_FRAGMENT_SHADER_EXT = (int) 35087; public static final int GL_CG_VERTEX_SHADER_EXT = (int) 35086; } diff --git a/src/generated/java/org/lwjgl/opengl/EXTDrawRangeElements.java b/src/generated/java/org/lwjgl/opengl/EXTDrawRangeElements.java index a278d57..26cf264 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTDrawRangeElements.java +++ b/src/generated/java/org/lwjgl/opengl/EXTDrawRangeElements.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTDrawRangeElements { + public static final int GL_MAX_ELEMENTS_INDICES_EXT = (int) 33001; public static final int GL_MAX_ELEMENTS_VERTICES_EXT = (int) 33000; diff --git a/src/generated/java/org/lwjgl/opengl/EXTFogCoord.java b/src/generated/java/org/lwjgl/opengl/EXTFogCoord.java index 31397fe..655d7d3 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTFogCoord.java +++ b/src/generated/java/org/lwjgl/opengl/EXTFogCoord.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTFogCoord { + public static final int GL_CURRENT_FOG_COORDINATE_EXT = (int) 33875; public static final int GL_FOG_COORDINATE_ARRAY_EXT = (int) 33879; public static final int GL_FOG_COORDINATE_ARRAY_POINTER_EXT = (int) 33878; diff --git a/src/generated/java/org/lwjgl/opengl/EXTGpuProgramParameters.java b/src/generated/java/org/lwjgl/opengl/EXTGpuProgramParameters.java index 5e87e4c..d21104b 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTGpuProgramParameters.java +++ b/src/generated/java/org/lwjgl/opengl/EXTGpuProgramParameters.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTGpuProgramParameters { + public static void glProgramEnvParameters4EXT(int arg0, int arg1, int arg2, java.nio.FloatBuffer arg3) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/EXTGpuShader4.java b/src/generated/java/org/lwjgl/opengl/EXTGpuShader4.java index 1903c26..facda78 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTGpuShader4.java +++ b/src/generated/java/org/lwjgl/opengl/EXTGpuShader4.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTGpuShader4 { + public static final int GL_INT_SAMPLER_1D_ARRAY_EXT = (int) 36302; public static final int GL_INT_SAMPLER_1D_EXT = (int) 36297; public static final int GL_INT_SAMPLER_2D_ARRAY_EXT = (int) 36303; diff --git a/src/generated/java/org/lwjgl/opengl/EXTMultiDrawArrays.java b/src/generated/java/org/lwjgl/opengl/EXTMultiDrawArrays.java index b7ada39..cfecae5 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTMultiDrawArrays.java +++ b/src/generated/java/org/lwjgl/opengl/EXTMultiDrawArrays.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTMultiDrawArrays { + public static void glMultiDrawArraysEXT(int arg0, java.nio.IntBuffer arg1, java.nio.IntBuffer arg2) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/EXTPackedPixels.java b/src/generated/java/org/lwjgl/opengl/EXTPackedPixels.java index 040c494..3239234 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTPackedPixels.java +++ b/src/generated/java/org/lwjgl/opengl/EXTPackedPixels.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTPackedPixels { + public static final int GL_UNSIGNED_BYTE_3_3_2_EXT = (int) 32818; public static final int GL_UNSIGNED_INT_10_10_10_2_EXT = (int) 32822; public static final int GL_UNSIGNED_INT_8_8_8_8_EXT = (int) 32821; diff --git a/src/generated/java/org/lwjgl/opengl/EXTPalettedTexture.java b/src/generated/java/org/lwjgl/opengl/EXTPalettedTexture.java index 1c03a90..fcab76a 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTPalettedTexture.java +++ b/src/generated/java/org/lwjgl/opengl/EXTPalettedTexture.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTPalettedTexture { + public static final int GL_COLOR_INDEX12_EXT = (int) 32998; public static final int GL_COLOR_INDEX16_EXT = (int) 32999; public static final int GL_COLOR_INDEX1_EXT = (int) 32994; @@ -21,8 +22,8 @@ public class EXTPalettedTexture { throw new UnsupportedOperationException(); } - public static void glColorSubTableEXT( - int arg0, int arg1, int arg2, int arg3, int arg4, java.nio.DoubleBuffer arg5) { + public static void glColorSubTableEXT(int arg0, int arg1, int arg2, int arg3, int arg4, + java.nio.DoubleBuffer arg5) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/EXTRescaleNormal.java b/src/generated/java/org/lwjgl/opengl/EXTRescaleNormal.java index 5703bbd..482f7b4 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTRescaleNormal.java +++ b/src/generated/java/org/lwjgl/opengl/EXTRescaleNormal.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public class EXTRescaleNormal { + public static final int GL_RESCALE_NORMAL_EXT = (int) 32826; } diff --git a/src/generated/java/org/lwjgl/opengl/EXTSeparateSpecularColor.java b/src/generated/java/org/lwjgl/opengl/EXTSeparateSpecularColor.java index f141e4c..83627e2 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTSeparateSpecularColor.java +++ b/src/generated/java/org/lwjgl/opengl/EXTSeparateSpecularColor.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTSeparateSpecularColor { + public static final int GL_LIGHT_MODEL_COLOR_CONTROL_EXT = (int) 33272; public static final int GL_SEPARATE_SPECULAR_COLOR_EXT = (int) 33274; public static final int GL_SINGLE_COLOR_EXT = (int) 33273; diff --git a/src/generated/java/org/lwjgl/opengl/EXTTextureEnvCombine.java b/src/generated/java/org/lwjgl/opengl/EXTTextureEnvCombine.java index 6dfde40..150d424 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTTextureEnvCombine.java +++ b/src/generated/java/org/lwjgl/opengl/EXTTextureEnvCombine.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTTextureEnvCombine { + public static final int GL_ADD_SIGNED_EXT = (int) 34164; public static final int GL_COMBINE_ALPHA_EXT = (int) 34162; public static final int GL_COMBINE_EXT = (int) 34160; diff --git a/src/generated/java/org/lwjgl/opengl/EXTTextureEnvDot3.java b/src/generated/java/org/lwjgl/opengl/EXTTextureEnvDot3.java index 54ee89a..b41eb9b 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTTextureEnvDot3.java +++ b/src/generated/java/org/lwjgl/opengl/EXTTextureEnvDot3.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTTextureEnvDot3 { + public static final int GL_DOT3_RGBA_EXT = (int) 34625; public static final int GL_DOT3_RGB_EXT = (int) 34624; } diff --git a/src/generated/java/org/lwjgl/opengl/EXTTextureLODBias.java b/src/generated/java/org/lwjgl/opengl/EXTTextureLODBias.java index 31aebf8..cff9e5c 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTTextureLODBias.java +++ b/src/generated/java/org/lwjgl/opengl/EXTTextureLODBias.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTTextureLODBias { + public static final int GL_MAX_TEXTURE_LOD_BIAS_EXT = (int) 34045; public static final int GL_TEXTURE_FILTER_CONTROL_EXT = (int) 34048; public static final int GL_TEXTURE_LOD_BIAS_EXT = (int) 34049; diff --git a/src/generated/java/org/lwjgl/opengl/EXTTextureRectangle.java b/src/generated/java/org/lwjgl/opengl/EXTTextureRectangle.java index a6c687e..4ddd79a 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTTextureRectangle.java +++ b/src/generated/java/org/lwjgl/opengl/EXTTextureRectangle.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTTextureRectangle { + public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT = (int) 34040; public static final int GL_PROXY_TEXTURE_RECTANGLE_EXT = (int) 34039; public static final int GL_TEXTURE_BINDING_RECTANGLE_EXT = (int) 34038; diff --git a/src/generated/java/org/lwjgl/opengl/EXTVertexArrayBgra.java b/src/generated/java/org/lwjgl/opengl/EXTVertexArrayBgra.java index cab7aad..5d554d6 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTVertexArrayBgra.java +++ b/src/generated/java/org/lwjgl/opengl/EXTVertexArrayBgra.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public class EXTVertexArrayBgra { + public static final int GL_BGRA = (int) 32993; } diff --git a/src/generated/java/org/lwjgl/opengl/EXTVertexShader.java b/src/generated/java/org/lwjgl/opengl/EXTVertexShader.java index 13fcdd0..369757b 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTVertexShader.java +++ b/src/generated/java/org/lwjgl/opengl/EXTVertexShader.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTVertexShader { + public static final int GL_CURRENT_VERTEX_EXT = (int) 34786; public static final int GL_FULL_RANGE_EXT = (int) 34785; public static final int GL_INVARIANT_DATATYPE_EXT = (int) 34795; diff --git a/src/generated/java/org/lwjgl/opengl/EXTVertexWeighting.java b/src/generated/java/org/lwjgl/opengl/EXTVertexWeighting.java index c8bba21..da479c5 100644 --- a/src/generated/java/org/lwjgl/opengl/EXTVertexWeighting.java +++ b/src/generated/java/org/lwjgl/opengl/EXTVertexWeighting.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class EXTVertexWeighting { + public static final int GL_CURRENT_VERTEX_WEIGHT_EXT = (int) 34059; public static final int GL_MODELVIEW0_EXT = (int) 5888; public static final int GL_MODELVIEW0_MATRIX_EXT = (int) 2982; diff --git a/src/generated/java/org/lwjgl/opengl/GLContext.java b/src/generated/java/org/lwjgl/opengl/GLContext.java index 59f8c1d..78b964b 100644 --- a/src/generated/java/org/lwjgl/opengl/GLContext.java +++ b/src/generated/java/org/lwjgl/opengl/GLContext.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class GLContext { + public static org.lwjgl.opengl.ContextCapabilities getCapabilities() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/GLSync.java b/src/generated/java/org/lwjgl/opengl/GLSync.java index 6f762ba..c9004e4 100644 --- a/src/generated/java/org/lwjgl/opengl/GLSync.java +++ b/src/generated/java/org/lwjgl/opengl/GLSync.java @@ -1,3 +1,4 @@ package org.lwjgl.opengl; -public class GLSync extends org.lwjgl.PointerWrapperAbstract {} +public class GLSync extends org.lwjgl.PointerWrapperAbstract { +} diff --git a/src/generated/java/org/lwjgl/opengl/GLUConstants.java b/src/generated/java/org/lwjgl/opengl/GLUConstants.java index c01f497..8db6bbe 100644 --- a/src/generated/java/org/lwjgl/opengl/GLUConstants.java +++ b/src/generated/java/org/lwjgl/opengl/GLUConstants.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public interface GLUConstants { + public static final int GLU_EXTENSIONS = (int) 100801; public static final int GLU_FALSE = (int) 0; public static final int GLU_INCOMPATIBLE_GL_VERSION = (int) 100903; diff --git a/src/generated/java/org/lwjgl/opengl/HPOcclusionTest.java b/src/generated/java/org/lwjgl/opengl/HPOcclusionTest.java index 6e5cba0..a655929 100644 --- a/src/generated/java/org/lwjgl/opengl/HPOcclusionTest.java +++ b/src/generated/java/org/lwjgl/opengl/HPOcclusionTest.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class HPOcclusionTest { + public static final int GL_OCCLUSION_TEST_HP = (int) 33125; public static final int GL_OCCLUSION_TEST_RESULT_HP = (int) 33126; } diff --git a/src/generated/java/org/lwjgl/opengl/IBMRasterposClip.java b/src/generated/java/org/lwjgl/opengl/IBMRasterposClip.java index 002830e..4c89269 100644 --- a/src/generated/java/org/lwjgl/opengl/IBMRasterposClip.java +++ b/src/generated/java/org/lwjgl/opengl/IBMRasterposClip.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public class IBMRasterposClip { + public static final int GL_RASTER_POSITION_UNCLIPPED_IBM = (int) 103010; } diff --git a/src/generated/java/org/lwjgl/opengl/InputImplementation.java b/src/generated/java/org/lwjgl/opengl/InputImplementation.java index e4d4214..a16776e 100644 --- a/src/generated/java/org/lwjgl/opengl/InputImplementation.java +++ b/src/generated/java/org/lwjgl/opengl/InputImplementation.java @@ -1,8 +1,9 @@ package org.lwjgl.opengl; public interface InputImplementation { - public abstract java.lang.Object createCursor( - int arg0, int arg1, int arg2, int arg3, int arg4, java.nio.IntBuffer arg5, java.nio.IntBuffer arg6); + + public abstract java.lang.Object createCursor(int arg0, int arg1, int arg2, int arg3, int arg4, + java.nio.IntBuffer arg5, java.nio.IntBuffer arg6); public abstract void createKeyboard(); diff --git a/src/generated/java/org/lwjgl/opengl/KHRDebugCallback$Handler.java b/src/generated/java/org/lwjgl/opengl/KHRDebugCallback$Handler.java index 1adcc5c..cf15156 100644 --- a/src/generated/java/org/lwjgl/opengl/KHRDebugCallback$Handler.java +++ b/src/generated/java/org/lwjgl/opengl/KHRDebugCallback$Handler.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public interface KHRDebugCallback$Handler { + public abstract void handleMessage(int arg0, int arg1, int arg2, int arg3, java.lang.String arg4); } diff --git a/src/generated/java/org/lwjgl/opengl/KHRDebugCallback.java b/src/generated/java/org/lwjgl/opengl/KHRDebugCallback.java index 6e20363..af13de2 100644 --- a/src/generated/java/org/lwjgl/opengl/KHRDebugCallback.java +++ b/src/generated/java/org/lwjgl/opengl/KHRDebugCallback.java @@ -1,3 +1,4 @@ package org.lwjgl.opengl; -public class KHRDebugCallback extends org.lwjgl.PointerWrapperAbstract {} +public class KHRDebugCallback extends org.lwjgl.PointerWrapperAbstract { +} diff --git a/src/generated/java/org/lwjgl/opengl/KHRTextureCompressionAstcLdr.java b/src/generated/java/org/lwjgl/opengl/KHRTextureCompressionAstcLdr.java index 44235d5..8c10afc 100644 --- a/src/generated/java/org/lwjgl/opengl/KHRTextureCompressionAstcLdr.java +++ b/src/generated/java/org/lwjgl/opengl/KHRTextureCompressionAstcLdr.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class KHRTextureCompressionAstcLdr { + public static final int GL_COMPRESSED_RGBA_ASTC_10x10_KHR = (int) 37819; public static final int GL_COMPRESSED_RGBA_ASTC_10x5_KHR = (int) 37816; public static final int GL_COMPRESSED_RGBA_ASTC_10x6_KHR = (int) 37817; diff --git a/src/generated/java/org/lwjgl/opengl/NVComputeProgram5.java b/src/generated/java/org/lwjgl/opengl/NVComputeProgram5.java index 2763405..4977523 100644 --- a/src/generated/java/org/lwjgl/opengl/NVComputeProgram5.java +++ b/src/generated/java/org/lwjgl/opengl/NVComputeProgram5.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVComputeProgram5 { + public static final int GL_COMPUTE_PROGRAM_NV = (int) 37115; public static final int GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV = (int) 37116; } diff --git a/src/generated/java/org/lwjgl/opengl/NVEvaluators.java b/src/generated/java/org/lwjgl/opengl/NVEvaluators.java index 81cb1b8..92e37fc 100644 --- a/src/generated/java/org/lwjgl/opengl/NVEvaluators.java +++ b/src/generated/java/org/lwjgl/opengl/NVEvaluators.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVEvaluators { + public static final int GL_EVAL_2D_NV = (int) 34496; public static final int GL_EVAL_FRACTIONAL_TESSELLATION_NV = (int) 34501; public static final int GL_EVAL_TRIANGULAR_2D_NV = (int) 34497; @@ -38,8 +39,8 @@ public class NVEvaluators { throw new UnsupportedOperationException(); } - public static void glGetMapControlPointsNV( - int arg0, int arg1, int arg2, int arg3, int arg4, boolean arg5, java.nio.FloatBuffer arg6) { + public static void glGetMapControlPointsNV(int arg0, int arg1, int arg2, int arg3, int arg4, boolean arg5, + java.nio.FloatBuffer arg6) { throw new UnsupportedOperationException(); } @@ -51,16 +52,8 @@ public class NVEvaluators { throw new UnsupportedOperationException(); } - public static void glMapControlPointsNV( - int arg0, - int arg1, - int arg2, - int arg3, - int arg4, - int arg5, - int arg6, - boolean arg7, - java.nio.FloatBuffer arg8) { + public static void glMapControlPointsNV(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, + boolean arg7, java.nio.FloatBuffer arg8) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/NVFragmentProgram.java b/src/generated/java/org/lwjgl/opengl/NVFragmentProgram.java index b2f241e..4b9c621 100644 --- a/src/generated/java/org/lwjgl/opengl/NVFragmentProgram.java +++ b/src/generated/java/org/lwjgl/opengl/NVFragmentProgram.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVFragmentProgram extends org.lwjgl.opengl.NVProgram { + public static final int GL_FRAGMENT_PROGRAM_BINDING_NV = (int) 34931; public static final int GL_FRAGMENT_PROGRAM_NV = (int) 34928; public static final int GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = (int) 34920; @@ -15,13 +16,13 @@ public class NVFragmentProgram extends org.lwjgl.opengl.NVProgram { throw new UnsupportedOperationException(); } - public static void glProgramNamedParameter4dNV( - int arg0, java.nio.ByteBuffer arg1, double arg2, double arg3, double arg4, double arg5) { + public static void glProgramNamedParameter4dNV(int arg0, java.nio.ByteBuffer arg1, double arg2, double arg3, + double arg4, double arg5) { throw new UnsupportedOperationException(); } - public static void glProgramNamedParameter4fNV( - int arg0, java.nio.ByteBuffer arg1, float arg2, float arg3, float arg4, float arg5) { + public static void glProgramNamedParameter4fNV(int arg0, java.nio.ByteBuffer arg1, float arg2, float arg3, + float arg4, float arg5) { throw new UnsupportedOperationException(); } } diff --git a/src/generated/java/org/lwjgl/opengl/NVFragmentProgram2.java b/src/generated/java/org/lwjgl/opengl/NVFragmentProgram2.java index 03cc309..3b3caba 100644 --- a/src/generated/java/org/lwjgl/opengl/NVFragmentProgram2.java +++ b/src/generated/java/org/lwjgl/opengl/NVFragmentProgram2.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVFragmentProgram2 { + public static final int GL_MAX_PROGRAM_CALL_DEPTH_NV = (int) 35061; public static final int GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = (int) 35060; public static final int GL_MAX_PROGRAM_IF_DEPTH_NV = (int) 35062; diff --git a/src/generated/java/org/lwjgl/opengl/NVGeometryProgram4.java b/src/generated/java/org/lwjgl/opengl/NVGeometryProgram4.java index f1f716a..b7e85c9 100644 --- a/src/generated/java/org/lwjgl/opengl/NVGeometryProgram4.java +++ b/src/generated/java/org/lwjgl/opengl/NVGeometryProgram4.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVGeometryProgram4 { + public static final int GL_GEOMETRY_PROGRAM_NV = (int) 35878; public static final int GL_MAX_PROGRAM_OUTPUT_VERTICES_NV = (int) 35879; public static final int GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV = (int) 35880; diff --git a/src/generated/java/org/lwjgl/opengl/NVGpuProgram4.java b/src/generated/java/org/lwjgl/opengl/NVGpuProgram4.java index a35f49e..19c6103 100644 --- a/src/generated/java/org/lwjgl/opengl/NVGpuProgram4.java +++ b/src/generated/java/org/lwjgl/opengl/NVGpuProgram4.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVGpuProgram4 { + public static final int GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV = (int) 35080; public static final int GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV = (int) 36261; public static final int GL_MAX_PROGRAM_GENERIC_RESULTS_NV = (int) 36262; diff --git a/src/generated/java/org/lwjgl/opengl/NVGpuProgram5.java b/src/generated/java/org/lwjgl/opengl/NVGpuProgram5.java index 73f1c6a..7b3ea70 100644 --- a/src/generated/java/org/lwjgl/opengl/NVGpuProgram5.java +++ b/src/generated/java/org/lwjgl/opengl/NVGpuProgram5.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVGpuProgram5 { + public static final int GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV = (int) 36445; public static final int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV = (int) 36444; public static final int GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV = (int) 36442; diff --git a/src/generated/java/org/lwjgl/opengl/NVGpuShader5.java b/src/generated/java/org/lwjgl/opengl/NVGpuShader5.java index f6a8288..b129669 100644 --- a/src/generated/java/org/lwjgl/opengl/NVGpuShader5.java +++ b/src/generated/java/org/lwjgl/opengl/NVGpuShader5.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVGpuShader5 { + public static final int GL_FLOAT16_NV = (int) 36856; public static final int GL_FLOAT16_VEC2_NV = (int) 36857; public static final int GL_FLOAT16_VEC3_NV = (int) 36858; diff --git a/src/generated/java/org/lwjgl/opengl/NVOcclusionQuery.java b/src/generated/java/org/lwjgl/opengl/NVOcclusionQuery.java index 2ef256c..2039756 100644 --- a/src/generated/java/org/lwjgl/opengl/NVOcclusionQuery.java +++ b/src/generated/java/org/lwjgl/opengl/NVOcclusionQuery.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVOcclusionQuery { + public static final int GL_CURRENT_OCCLUSION_QUERY_ID_NV = (int) 34917; public static final int GL_OCCLUSION_TEST_HP = (int) 33125; public static final int GL_OCCLUSION_TEST_RESULT_HP = (int) 33126; diff --git a/src/generated/java/org/lwjgl/opengl/NVParameterBufferObject.java b/src/generated/java/org/lwjgl/opengl/NVParameterBufferObject.java index 6dd3a5a..660feb4 100644 --- a/src/generated/java/org/lwjgl/opengl/NVParameterBufferObject.java +++ b/src/generated/java/org/lwjgl/opengl/NVParameterBufferObject.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVParameterBufferObject { + public static final int GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV = (int) 36260; public static final int GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV = (int) 36259; public static final int GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV = (int) 36256; diff --git a/src/generated/java/org/lwjgl/opengl/NVPresentVideo.java b/src/generated/java/org/lwjgl/opengl/NVPresentVideo.java index 704715b..8bde782 100644 --- a/src/generated/java/org/lwjgl/opengl/NVPresentVideo.java +++ b/src/generated/java/org/lwjgl/opengl/NVPresentVideo.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVPresentVideo { + public static final int FIELDS_NV = (int) 36391; public static final int GL_CURRENT_TIME_NV = (int) 36392; public static final int GL_FRAME_NV = (int) 36390; @@ -41,35 +42,13 @@ public class NVPresentVideo { throw new UnsupportedOperationException(); } - public static void glPresentFrameDualFillNV( - int arg0, - long arg1, - int arg2, - int arg3, - int arg4, - int arg5, - int arg6, - int arg7, - int arg8, - int arg9, - int arg10, - int arg11, - int arg12) { + public static void glPresentFrameDualFillNV(int arg0, long arg1, int arg2, int arg3, int arg4, int arg5, int arg6, + int arg7, int arg8, int arg9, int arg10, int arg11, int arg12) { throw new UnsupportedOperationException(); } - public static void glPresentFrameKeyedNV( - int arg0, - long arg1, - int arg2, - int arg3, - int arg4, - int arg5, - int arg6, - int arg7, - int arg8, - int arg9, - int arg10) { + public static void glPresentFrameKeyedNV(int arg0, long arg1, int arg2, int arg3, int arg4, int arg5, int arg6, + int arg7, int arg8, int arg9, int arg10) { throw new UnsupportedOperationException(); } } diff --git a/src/generated/java/org/lwjgl/opengl/NVPresentVideoUtil.java b/src/generated/java/org/lwjgl/opengl/NVPresentVideoUtil.java index 7b19dd7..747a79c 100644 --- a/src/generated/java/org/lwjgl/opengl/NVPresentVideoUtil.java +++ b/src/generated/java/org/lwjgl/opengl/NVPresentVideoUtil.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVPresentVideoUtil { + public static boolean glBindVideoDeviceNV(int arg0, long arg1, java.nio.IntBuffer arg2) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/NVProgram.java b/src/generated/java/org/lwjgl/opengl/NVProgram.java index fe04e6b..f2c7550 100644 --- a/src/generated/java/org/lwjgl/opengl/NVProgram.java +++ b/src/generated/java/org/lwjgl/opengl/NVProgram.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVProgram { + public static final int GL_PROGRAM_ERROR_POSITION_NV = (int) 34379; public static final int GL_PROGRAM_ERROR_STRING_NV = (int) 34932; public static final int GL_PROGRAM_LENGTH_NV = (int) 34343; diff --git a/src/generated/java/org/lwjgl/opengl/NVRegisterCombiners.java b/src/generated/java/org/lwjgl/opengl/NVRegisterCombiners.java index 45c9bcc..ad1f9ce 100644 --- a/src/generated/java/org/lwjgl/opengl/NVRegisterCombiners.java +++ b/src/generated/java/org/lwjgl/opengl/NVRegisterCombiners.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVRegisterCombiners { + public static final int GL_BIAS_BY_NEGATIVE_ONE_HALF_NV = (int) 34113; public static final int GL_COLOR_SUM_CLAMP_NV = (int) 34127; public static final int GL_COMBINER0_NV = (int) 34128; @@ -57,17 +58,8 @@ public class NVRegisterCombiners { throw new UnsupportedOperationException(); } - public static void glCombinerOutputNV( - int arg0, - int arg1, - int arg2, - int arg3, - int arg4, - int arg5, - int arg6, - boolean arg7, - boolean arg8, - boolean arg9) { + public static void glCombinerOutputNV(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, + boolean arg7, boolean arg8, boolean arg9) { throw new UnsupportedOperationException(); } @@ -91,8 +83,8 @@ public class NVRegisterCombiners { throw new UnsupportedOperationException(); } - public static void glGetCombinerInputParameterNV( - int arg0, int arg1, int arg2, int arg3, java.nio.FloatBuffer arg4) { + public static void glGetCombinerInputParameterNV(int arg0, int arg1, int arg2, int arg3, + java.nio.FloatBuffer arg4) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/NVRegisterCombiners2.java b/src/generated/java/org/lwjgl/opengl/NVRegisterCombiners2.java index ca729e4..ea4a807 100644 --- a/src/generated/java/org/lwjgl/opengl/NVRegisterCombiners2.java +++ b/src/generated/java/org/lwjgl/opengl/NVRegisterCombiners2.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVRegisterCombiners2 { + public static final int GL_PER_STAGE_CONSTANTS_NV = (int) 34101; public static void glCombinerStageParameterNV(int arg0, int arg1, java.nio.FloatBuffer arg2) { diff --git a/src/generated/java/org/lwjgl/opengl/NVTessellationProgram5.java b/src/generated/java/org/lwjgl/opengl/NVTessellationProgram5.java index 73a4d10..ff8d168 100644 --- a/src/generated/java/org/lwjgl/opengl/NVTessellationProgram5.java +++ b/src/generated/java/org/lwjgl/opengl/NVTessellationProgram5.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVTessellationProgram5 { + public static final int GL_MAX_PROGRAM_PATCH_ATTRIBS_NV = (int) 34520; public static final int GL_TESS_CONTROL_PROGRAM_NV = (int) 35102; public static final int GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV = (int) 35956; diff --git a/src/generated/java/org/lwjgl/opengl/NVTextureCompressionVTC.java b/src/generated/java/org/lwjgl/opengl/NVTextureCompressionVTC.java index a82b697..c1224d8 100644 --- a/src/generated/java/org/lwjgl/opengl/NVTextureCompressionVTC.java +++ b/src/generated/java/org/lwjgl/opengl/NVTextureCompressionVTC.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVTextureCompressionVTC { + public static final int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = (int) 33777; public static final int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = (int) 33778; public static final int GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = (int) 33779; diff --git a/src/generated/java/org/lwjgl/opengl/NVTextureEnvCombine4.java b/src/generated/java/org/lwjgl/opengl/NVTextureEnvCombine4.java index 45be9b0..2d9f1af 100644 --- a/src/generated/java/org/lwjgl/opengl/NVTextureEnvCombine4.java +++ b/src/generated/java/org/lwjgl/opengl/NVTextureEnvCombine4.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVTextureEnvCombine4 { + public static final int GL_COMBINE4_NV = (int) 34051; public static final int GL_OPERAND3_ALPHA_NV = (int) 34203; public static final int GL_OPERAND3_RGB_NV = (int) 34195; diff --git a/src/generated/java/org/lwjgl/opengl/NVTextureExpandNormal.java b/src/generated/java/org/lwjgl/opengl/NVTextureExpandNormal.java index c82ed48..8f9e13e 100644 --- a/src/generated/java/org/lwjgl/opengl/NVTextureExpandNormal.java +++ b/src/generated/java/org/lwjgl/opengl/NVTextureExpandNormal.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public class NVTextureExpandNormal { + public static final int GL_TEXTURE_UNSIGNED_REMAP_MODE_NV = (int) 34959; } diff --git a/src/generated/java/org/lwjgl/opengl/NVTextureRectangle.java b/src/generated/java/org/lwjgl/opengl/NVTextureRectangle.java index 2a762c3..b8ab248 100644 --- a/src/generated/java/org/lwjgl/opengl/NVTextureRectangle.java +++ b/src/generated/java/org/lwjgl/opengl/NVTextureRectangle.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVTextureRectangle { + public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE_NV = (int) 34040; public static final int GL_PROXY_TEXTURE_RECTANGLE_NV = (int) 34039; public static final int GL_TEXTURE_BINDING_RECTANGLE_NV = (int) 34038; diff --git a/src/generated/java/org/lwjgl/opengl/NVVertexProgram.java b/src/generated/java/org/lwjgl/opengl/NVVertexProgram.java index d662ca0..f1d4abc 100644 --- a/src/generated/java/org/lwjgl/opengl/NVVertexProgram.java +++ b/src/generated/java/org/lwjgl/opengl/NVVertexProgram.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVVertexProgram extends org.lwjgl.opengl.NVProgram { + public static final int GL_ATTRIB_ARRAY_POINTER_NV = (int) 34373; public static final int GL_ATTRIB_ARRAY_SIZE_NV = (int) 34339; public static final int GL_ATTRIB_ARRAY_STRIDE_NV = (int) 34340; diff --git a/src/generated/java/org/lwjgl/opengl/NVVertexProgram2Option.java b/src/generated/java/org/lwjgl/opengl/NVVertexProgram2Option.java index dd31384..b09db3e 100644 --- a/src/generated/java/org/lwjgl/opengl/NVVertexProgram2Option.java +++ b/src/generated/java/org/lwjgl/opengl/NVVertexProgram2Option.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVVertexProgram2Option { + public static final int GL_MAX_PROGRAM_CALL_DEPTH_NV = (int) 35061; public static final int GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = (int) 35060; } diff --git a/src/generated/java/org/lwjgl/opengl/NVVertexProgram3.java b/src/generated/java/org/lwjgl/opengl/NVVertexProgram3.java index db36f40..13a338e 100644 --- a/src/generated/java/org/lwjgl/opengl/NVVertexProgram3.java +++ b/src/generated/java/org/lwjgl/opengl/NVVertexProgram3.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public class NVVertexProgram3 { + public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = (int) 35660; } diff --git a/src/generated/java/org/lwjgl/opengl/NVVideoCapture.java b/src/generated/java/org/lwjgl/opengl/NVVideoCapture.java index a769b44..2e83496 100644 --- a/src/generated/java/org/lwjgl/opengl/NVVideoCapture.java +++ b/src/generated/java/org/lwjgl/opengl/NVVideoCapture.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVVideoCapture { + public static final int GL_FAILURE_NV = (int) 36912; public static final int GL_FIELD_LOWER_NV = (int) 36899; public static final int GL_FIELD_UPPER_NV = (int) 36898; diff --git a/src/generated/java/org/lwjgl/opengl/NVVideoCaptureUtil.java b/src/generated/java/org/lwjgl/opengl/NVVideoCaptureUtil.java index 4ac61b5..ebf7bab 100644 --- a/src/generated/java/org/lwjgl/opengl/NVVideoCaptureUtil.java +++ b/src/generated/java/org/lwjgl/opengl/NVVideoCaptureUtil.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVVideoCaptureUtil { + public static boolean glBindVideoCaptureDeviceNV(int arg0, long arg1) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/NVXGpuMemoryInfo.java b/src/generated/java/org/lwjgl/opengl/NVXGpuMemoryInfo.java index 029606b..15c7975 100644 --- a/src/generated/java/org/lwjgl/opengl/NVXGpuMemoryInfo.java +++ b/src/generated/java/org/lwjgl/opengl/NVXGpuMemoryInfo.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class NVXGpuMemoryInfo { + public static final int GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX = (int) 36937; public static final int GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX = (int) 36935; public static final int GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX = (int) 36939; diff --git a/src/generated/java/org/lwjgl/opengl/OpenGLException.java b/src/generated/java/org/lwjgl/opengl/OpenGLException.java index 0ae1fb0..06c8ec3 100644 --- a/src/generated/java/org/lwjgl/opengl/OpenGLException.java +++ b/src/generated/java/org/lwjgl/opengl/OpenGLException.java @@ -1,3 +1,4 @@ package org.lwjgl.opengl; -public class OpenGLException extends java.lang.RuntimeException {} +public class OpenGLException extends java.lang.RuntimeException { +} diff --git a/src/generated/java/org/lwjgl/opengl/Pbuffer.java b/src/generated/java/org/lwjgl/opengl/Pbuffer.java index df36b19..6a93441 100644 --- a/src/generated/java/org/lwjgl/opengl/Pbuffer.java +++ b/src/generated/java/org/lwjgl/opengl/Pbuffer.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class Pbuffer extends org.lwjglx.opengl.DrawableGL { + public static final int BACK_LEFT_BUFFER = (int) 8325; public static final int BACK_RIGHT_BUFFER = (int) 8326; public static final int CUBE_MAP_FACE = (int) 8316; diff --git a/src/generated/java/org/lwjgl/opengl/PixelFormat.java b/src/generated/java/org/lwjgl/opengl/PixelFormat.java index 3ee746f..b21e023 100644 --- a/src/generated/java/org/lwjgl/opengl/PixelFormat.java +++ b/src/generated/java/org/lwjgl/opengl/PixelFormat.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class PixelFormat { + public int getAccumulationAlpha() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/PixelFormatLWJGL.java b/src/generated/java/org/lwjgl/opengl/PixelFormatLWJGL.java index 61c6524..8e03ddd 100644 --- a/src/generated/java/org/lwjgl/opengl/PixelFormatLWJGL.java +++ b/src/generated/java/org/lwjgl/opengl/PixelFormatLWJGL.java @@ -1,3 +1,4 @@ package org.lwjgl.opengl; -public interface PixelFormatLWJGL {} +public interface PixelFormatLWJGL { +} diff --git a/src/generated/java/org/lwjgl/opengl/RenderTexture.java b/src/generated/java/org/lwjgl/opengl/RenderTexture.java index 9bd3cb3..ac1daed 100644 --- a/src/generated/java/org/lwjgl/opengl/RenderTexture.java +++ b/src/generated/java/org/lwjgl/opengl/RenderTexture.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class RenderTexture { + public static final int RENDER_TEXTURE_1D = (int) 8313; public static final int RENDER_TEXTURE_2D = (int) 8314; public static final int RENDER_TEXTURE_CUBE_MAP = (int) 8312; diff --git a/src/generated/java/org/lwjgl/opengl/SGISGenerateMipmap.java b/src/generated/java/org/lwjgl/opengl/SGISGenerateMipmap.java index d680b95..d392421 100644 --- a/src/generated/java/org/lwjgl/opengl/SGISGenerateMipmap.java +++ b/src/generated/java/org/lwjgl/opengl/SGISGenerateMipmap.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class SGISGenerateMipmap { + public static final int GL_GENERATE_MIPMAP_HINT_SGIS = (int) 33170; public static final int GL_GENERATE_MIPMAP_SGIS = (int) 33169; } diff --git a/src/generated/java/org/lwjgl/opengl/SGISTextureLOD.java b/src/generated/java/org/lwjgl/opengl/SGISTextureLOD.java index 53fc78f..9ce4b31 100644 --- a/src/generated/java/org/lwjgl/opengl/SGISTextureLOD.java +++ b/src/generated/java/org/lwjgl/opengl/SGISTextureLOD.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class SGISTextureLOD { + public static final int GL_TEXTURE_BASE_LEVEL_SGIS = (int) 33084; public static final int GL_TEXTURE_MAX_LEVEL_SGIS = (int) 33085; public static final int GL_TEXTURE_MAX_LOD_SGIS = (int) 33083; diff --git a/src/generated/java/org/lwjgl/opengl/SUNSliceAccum.java b/src/generated/java/org/lwjgl/opengl/SUNSliceAccum.java index b8701ae..2a8c3f5 100644 --- a/src/generated/java/org/lwjgl/opengl/SUNSliceAccum.java +++ b/src/generated/java/org/lwjgl/opengl/SUNSliceAccum.java @@ -1,5 +1,6 @@ package org.lwjgl.opengl; public class SUNSliceAccum { + public static final int GL_SLICE_ACCUM_SUN = (int) 34252; } diff --git a/src/generated/java/org/lwjgl/opengl/SharedDrawable.java b/src/generated/java/org/lwjgl/opengl/SharedDrawable.java index ff5e7db..eaf8a9f 100644 --- a/src/generated/java/org/lwjgl/opengl/SharedDrawable.java +++ b/src/generated/java/org/lwjgl/opengl/SharedDrawable.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class SharedDrawable extends org.lwjglx.opengl.DrawableGL { + public org.lwjglx.opengl.ContextGL createSharedContext() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/Util.java b/src/generated/java/org/lwjgl/opengl/Util.java index d2e1cb2..bd058c3 100644 --- a/src/generated/java/org/lwjgl/opengl/Util.java +++ b/src/generated/java/org/lwjgl/opengl/Util.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class Util { + public static void checkGLError() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/opengl/XRandR$Screen.java b/src/generated/java/org/lwjgl/opengl/XRandR$Screen.java index 17cd375..915505c 100644 --- a/src/generated/java/org/lwjgl/opengl/XRandR$Screen.java +++ b/src/generated/java/org/lwjgl/opengl/XRandR$Screen.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class XRandR$Screen { + public final int freq = 0; public final int height = 0; public final java.lang.String name = null; diff --git a/src/generated/java/org/lwjgl/opengl/XRandR.java b/src/generated/java/org/lwjgl/opengl/XRandR.java index 7d2c236..99aa12e 100644 --- a/src/generated/java/org/lwjgl/opengl/XRandR.java +++ b/src/generated/java/org/lwjgl/opengl/XRandR.java @@ -1,6 +1,7 @@ package org.lwjgl.opengl; public class XRandR { + public static org.lwjgl.opengl.XRandR$Screen[] getConfiguration() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/Color.java b/src/generated/java/org/lwjgl/util/Color.java index e5f617c..38b540d 100644 --- a/src/generated/java/org/lwjgl/util/Color.java +++ b/src/generated/java/org/lwjgl/util/Color.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public class Color { + public boolean equals(java.lang.Object arg0) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/Dimension.java b/src/generated/java/org/lwjgl/util/Dimension.java index 634f453..2106b76 100644 --- a/src/generated/java/org/lwjgl/util/Dimension.java +++ b/src/generated/java/org/lwjgl/util/Dimension.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public class Dimension { + public boolean equals(java.lang.Object arg0) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/Display.java b/src/generated/java/org/lwjgl/util/Display.java index 07db674..3ef316e 100644 --- a/src/generated/java/org/lwjgl/util/Display.java +++ b/src/generated/java/org/lwjgl/util/Display.java @@ -1,13 +1,14 @@ package org.lwjgl.util; public class Display { - public static org.lwjgl.opengl.DisplayMode[] getAvailableDisplayModes( - int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7) { + + public static org.lwjgl.opengl.DisplayMode[] getAvailableDisplayModes(int arg0, int arg1, int arg2, int arg3, + int arg4, int arg5, int arg6, int arg7) { throw new UnsupportedOperationException(); } - public static org.lwjgl.opengl.DisplayMode setDisplayMode( - org.lwjgl.opengl.DisplayMode[] arg0, java.lang.String[] arg1) { + public static org.lwjgl.opengl.DisplayMode setDisplayMode(org.lwjgl.opengl.DisplayMode[] arg0, + java.lang.String[] arg1) { throw new UnsupportedOperationException(); } } diff --git a/src/generated/java/org/lwjgl/util/Point.java b/src/generated/java/org/lwjgl/util/Point.java index f7788bf..3af561f 100644 --- a/src/generated/java/org/lwjgl/util/Point.java +++ b/src/generated/java/org/lwjgl/util/Point.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public class Point { + public boolean equals(java.lang.Object arg0) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/ReadableColor.java b/src/generated/java/org/lwjgl/util/ReadableColor.java index 1aaf382..58a73d4 100644 --- a/src/generated/java/org/lwjgl/util/ReadableColor.java +++ b/src/generated/java/org/lwjgl/util/ReadableColor.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public interface ReadableColor { + public static final org.lwjgl.util.ReadableColor BLACK = null; public static final org.lwjgl.util.ReadableColor BLUE = null; public static final org.lwjgl.util.ReadableColor CYAN = null; diff --git a/src/generated/java/org/lwjgl/util/ReadableDimension.java b/src/generated/java/org/lwjgl/util/ReadableDimension.java index beb0ca7..2fb7c29 100644 --- a/src/generated/java/org/lwjgl/util/ReadableDimension.java +++ b/src/generated/java/org/lwjgl/util/ReadableDimension.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public interface ReadableDimension { + public abstract int getHeight(); public abstract void getSize(org.lwjgl.util.WritableDimension arg0); diff --git a/src/generated/java/org/lwjgl/util/ReadablePoint.java b/src/generated/java/org/lwjgl/util/ReadablePoint.java index a4f828b..ffdfa64 100644 --- a/src/generated/java/org/lwjgl/util/ReadablePoint.java +++ b/src/generated/java/org/lwjgl/util/ReadablePoint.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public interface ReadablePoint { + public abstract void getLocation(org.lwjgl.util.WritablePoint arg0); public abstract int getX(); diff --git a/src/generated/java/org/lwjgl/util/ReadableRectangle.java b/src/generated/java/org/lwjgl/util/ReadableRectangle.java index a168a60..4f08570 100644 --- a/src/generated/java/org/lwjgl/util/ReadableRectangle.java +++ b/src/generated/java/org/lwjgl/util/ReadableRectangle.java @@ -1,5 +1,6 @@ package org.lwjgl.util; public interface ReadableRectangle { + public abstract void getBounds(org.lwjgl.util.WritableRectangle arg0); } diff --git a/src/generated/java/org/lwjgl/util/Rectangle.java b/src/generated/java/org/lwjgl/util/Rectangle.java index 8a1a5d3..a1ea898 100644 --- a/src/generated/java/org/lwjgl/util/Rectangle.java +++ b/src/generated/java/org/lwjgl/util/Rectangle.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public class Rectangle { + public void add(int arg0, int arg1) { throw new UnsupportedOperationException(); } @@ -133,8 +134,8 @@ public class Rectangle { throw new UnsupportedOperationException(); } - public org.lwjgl.util.WritableRectangle union( - org.lwjgl.util.ReadableRectangle arg0, org.lwjgl.util.WritableRectangle arg1) { + public org.lwjgl.util.WritableRectangle union(org.lwjgl.util.ReadableRectangle arg0, + org.lwjgl.util.WritableRectangle arg1) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/Renderable.java b/src/generated/java/org/lwjgl/util/Renderable.java index 418a3d4..cf6df36 100644 --- a/src/generated/java/org/lwjgl/util/Renderable.java +++ b/src/generated/java/org/lwjgl/util/Renderable.java @@ -1,5 +1,6 @@ package org.lwjgl.util; public interface Renderable { + public abstract void render(); } diff --git a/src/generated/java/org/lwjgl/util/Timer.java b/src/generated/java/org/lwjgl/util/Timer.java index 2b8405c..05c1f64 100644 --- a/src/generated/java/org/lwjgl/util/Timer.java +++ b/src/generated/java/org/lwjgl/util/Timer.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public class Timer { + public float getTime() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/WaveData.java b/src/generated/java/org/lwjgl/util/WaveData.java index 8180a17..83a77b4 100644 --- a/src/generated/java/org/lwjgl/util/WaveData.java +++ b/src/generated/java/org/lwjgl/util/WaveData.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public class WaveData { + public final java.nio.ByteBuffer data = null; public final int format = 0; public final int samplerate = 0; diff --git a/src/generated/java/org/lwjgl/util/WritableColor.java b/src/generated/java/org/lwjgl/util/WritableColor.java index ab0e844..256d0e8 100644 --- a/src/generated/java/org/lwjgl/util/WritableColor.java +++ b/src/generated/java/org/lwjgl/util/WritableColor.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public interface WritableColor { + public abstract void readABGR(java.nio.ByteBuffer arg0); public abstract void readARGB(java.nio.ByteBuffer arg0); diff --git a/src/generated/java/org/lwjgl/util/WritableDimension.java b/src/generated/java/org/lwjgl/util/WritableDimension.java index 3e50d8d..8fdfa86 100644 --- a/src/generated/java/org/lwjgl/util/WritableDimension.java +++ b/src/generated/java/org/lwjgl/util/WritableDimension.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public interface WritableDimension { + public abstract void setHeight(int arg0); public abstract void setSize(int arg0, int arg1); diff --git a/src/generated/java/org/lwjgl/util/WritablePoint.java b/src/generated/java/org/lwjgl/util/WritablePoint.java index 9450dec..b1efd7d 100644 --- a/src/generated/java/org/lwjgl/util/WritablePoint.java +++ b/src/generated/java/org/lwjgl/util/WritablePoint.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public interface WritablePoint { + public abstract void setLocation(int arg0, int arg1); public abstract void setLocation(org.lwjgl.util.ReadablePoint arg0); diff --git a/src/generated/java/org/lwjgl/util/WritableRectangle.java b/src/generated/java/org/lwjgl/util/WritableRectangle.java index 70c0538..9e5ba36 100644 --- a/src/generated/java/org/lwjgl/util/WritableRectangle.java +++ b/src/generated/java/org/lwjgl/util/WritableRectangle.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public interface WritableRectangle { + public abstract void setBounds(int arg0, int arg1, int arg2, int arg3); public abstract void setBounds(org.lwjgl.util.ReadablePoint arg0, org.lwjgl.util.ReadableDimension arg1); diff --git a/src/generated/java/org/lwjgl/util/XPMFile.java b/src/generated/java/org/lwjgl/util/XPMFile.java index fbb7592..a607cda 100644 --- a/src/generated/java/org/lwjgl/util/XPMFile.java +++ b/src/generated/java/org/lwjgl/util/XPMFile.java @@ -1,6 +1,7 @@ package org.lwjgl.util; public class XPMFile { + public byte[] getBytes() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/glu/Cylinder.java b/src/generated/java/org/lwjgl/util/glu/Cylinder.java index cb39a36..d1b04db 100644 --- a/src/generated/java/org/lwjgl/util/glu/Cylinder.java +++ b/src/generated/java/org/lwjgl/util/glu/Cylinder.java @@ -1,6 +1,7 @@ package org.lwjgl.util.glu; public class Cylinder extends org.lwjgl.util.glu.Quadric { + public void draw(float arg0, float arg1, float arg2, int arg3, int arg4) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/glu/Disk.java b/src/generated/java/org/lwjgl/util/glu/Disk.java index f57d912..6255da8 100644 --- a/src/generated/java/org/lwjgl/util/glu/Disk.java +++ b/src/generated/java/org/lwjgl/util/glu/Disk.java @@ -1,6 +1,7 @@ package org.lwjgl.util.glu; public class Disk extends org.lwjgl.util.glu.Quadric { + public void draw(float arg0, float arg1, int arg2, int arg3) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/glu/GLU.java b/src/generated/java/org/lwjgl/util/glu/GLU.java index 9a08fd2..266cd7a 100644 --- a/src/generated/java/org/lwjgl/util/glu/GLU.java +++ b/src/generated/java/org/lwjgl/util/glu/GLU.java @@ -1,6 +1,7 @@ package org.lwjgl.util.glu; public class GLU { + public static final int GLU_AUTO_LOAD_MATRIX = (int) 100200; public static final int GLU_BEGIN = (int) 100100; public static final int GLU_CCW = (int) 100121; @@ -117,8 +118,8 @@ public class GLU { public static final int GLU_V_STEP = (int) 100207; public static final double TESS_MAX_COORD = (double) 1.0E150; - public static int gluBuild2DMipmaps( - int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, java.nio.ByteBuffer arg6) { + public static int gluBuild2DMipmaps(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, + java.nio.ByteBuffer arg6) { throw new UnsupportedOperationException(); } @@ -134,16 +135,8 @@ public class GLU { throw new UnsupportedOperationException(); } - public static void gluLookAt( - float arg0, - float arg1, - float arg2, - float arg3, - float arg4, - float arg5, - float arg6, - float arg7, - float arg8) { + public static void gluLookAt(float arg0, float arg1, float arg2, float arg3, float arg4, float arg5, float arg6, + float arg7, float arg8) { throw new UnsupportedOperationException(); } @@ -163,38 +156,18 @@ public class GLU { throw new UnsupportedOperationException(); } - public static boolean gluProject( - float arg0, - float arg1, - float arg2, - java.nio.FloatBuffer arg3, - java.nio.FloatBuffer arg4, - java.nio.IntBuffer arg5, - java.nio.FloatBuffer arg6) { + public static boolean gluProject(float arg0, float arg1, float arg2, java.nio.FloatBuffer arg3, + java.nio.FloatBuffer arg4, java.nio.IntBuffer arg5, java.nio.FloatBuffer arg6) { throw new UnsupportedOperationException(); } - public static int gluScaleImage( - int arg0, - int arg1, - int arg2, - int arg3, - java.nio.ByteBuffer arg4, - int arg5, - int arg6, - int arg7, - java.nio.ByteBuffer arg8) { + public static int gluScaleImage(int arg0, int arg1, int arg2, int arg3, java.nio.ByteBuffer arg4, int arg5, + int arg6, int arg7, java.nio.ByteBuffer arg8) { throw new UnsupportedOperationException(); } - public static boolean gluUnProject( - float arg0, - float arg1, - float arg2, - java.nio.FloatBuffer arg3, - java.nio.FloatBuffer arg4, - java.nio.IntBuffer arg5, - java.nio.FloatBuffer arg6) { + public static boolean gluUnProject(float arg0, float arg1, float arg2, java.nio.FloatBuffer arg3, + java.nio.FloatBuffer arg4, java.nio.IntBuffer arg5, java.nio.FloatBuffer arg6) { throw new UnsupportedOperationException(); } } diff --git a/src/generated/java/org/lwjgl/util/glu/GLUtessellator.java b/src/generated/java/org/lwjgl/util/glu/GLUtessellator.java index 2c5c5b7..f1475ed 100644 --- a/src/generated/java/org/lwjgl/util/glu/GLUtessellator.java +++ b/src/generated/java/org/lwjgl/util/glu/GLUtessellator.java @@ -1,6 +1,7 @@ package org.lwjgl.util.glu; public interface GLUtessellator { + public abstract void gluBeginPolygon(); public abstract void gluDeleteTess(); diff --git a/src/generated/java/org/lwjgl/util/glu/GLUtessellatorCallback.java b/src/generated/java/org/lwjgl/util/glu/GLUtessellatorCallback.java index 13a3e30..0f4dd4f 100644 --- a/src/generated/java/org/lwjgl/util/glu/GLUtessellatorCallback.java +++ b/src/generated/java/org/lwjgl/util/glu/GLUtessellatorCallback.java @@ -1,14 +1,15 @@ package org.lwjgl.util.glu; public interface GLUtessellatorCallback { + public abstract void begin(int arg0); public abstract void beginData(int arg0, java.lang.Object arg1); public abstract void combine(double[] arg0, java.lang.Object[] arg1, float[] arg2, java.lang.Object[] arg3); - public abstract void combineData( - double[] arg0, java.lang.Object[] arg1, float[] arg2, java.lang.Object[] arg3, java.lang.Object arg4); + public abstract void combineData(double[] arg0, java.lang.Object[] arg1, float[] arg2, java.lang.Object[] arg3, + java.lang.Object arg4); public abstract void edgeFlag(boolean arg0); diff --git a/src/generated/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java b/src/generated/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java index 4faab51..7456645 100644 --- a/src/generated/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java +++ b/src/generated/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java @@ -1,6 +1,7 @@ package org.lwjgl.util.glu; public class GLUtessellatorCallbackAdapter { + public void begin(int arg0) { throw new UnsupportedOperationException(); } @@ -13,8 +14,8 @@ public class GLUtessellatorCallbackAdapter { throw new UnsupportedOperationException(); } - public void combineData( - double[] arg0, java.lang.Object[] arg1, float[] arg2, java.lang.Object[] arg3, java.lang.Object arg4) { + public void combineData(double[] arg0, java.lang.Object[] arg1, float[] arg2, java.lang.Object[] arg3, + java.lang.Object arg4) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/glu/MipMap.java b/src/generated/java/org/lwjgl/util/glu/MipMap.java index 6cdffd6..f65dca2 100644 --- a/src/generated/java/org/lwjgl/util/glu/MipMap.java +++ b/src/generated/java/org/lwjgl/util/glu/MipMap.java @@ -1,21 +1,14 @@ package org.lwjgl.util.glu; public class MipMap extends org.lwjgl.util.glu.Util { - public static int gluBuild2DMipmaps( - int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, java.nio.ByteBuffer arg6) { + + public static int gluBuild2DMipmaps(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5, + java.nio.ByteBuffer arg6) { throw new UnsupportedOperationException(); } - public static int gluScaleImage( - int arg0, - int arg1, - int arg2, - int arg3, - java.nio.ByteBuffer arg4, - int arg5, - int arg6, - int arg7, - java.nio.ByteBuffer arg8) { + public static int gluScaleImage(int arg0, int arg1, int arg2, int arg3, java.nio.ByteBuffer arg4, int arg5, + int arg6, int arg7, java.nio.ByteBuffer arg8) { throw new UnsupportedOperationException(); } } diff --git a/src/generated/java/org/lwjgl/util/glu/PartialDisk.java b/src/generated/java/org/lwjgl/util/glu/PartialDisk.java index aa44f1a..432ae28 100644 --- a/src/generated/java/org/lwjgl/util/glu/PartialDisk.java +++ b/src/generated/java/org/lwjgl/util/glu/PartialDisk.java @@ -1,6 +1,7 @@ package org.lwjgl.util.glu; public class PartialDisk extends org.lwjgl.util.glu.Quadric { + public void draw(float arg0, float arg1, int arg2, int arg3, float arg4, float arg5) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/glu/Project.java b/src/generated/java/org/lwjgl/util/glu/Project.java index d7bc729..2334c7a 100644 --- a/src/generated/java/org/lwjgl/util/glu/Project.java +++ b/src/generated/java/org/lwjgl/util/glu/Project.java @@ -1,16 +1,9 @@ package org.lwjgl.util.glu; public class Project extends org.lwjgl.util.glu.Util { - public static void gluLookAt( - float arg0, - float arg1, - float arg2, - float arg3, - float arg4, - float arg5, - float arg6, - float arg7, - float arg8) { + + public static void gluLookAt(float arg0, float arg1, float arg2, float arg3, float arg4, float arg5, float arg6, + float arg7, float arg8) { throw new UnsupportedOperationException(); } @@ -22,25 +15,13 @@ public class Project extends org.lwjgl.util.glu.Util { throw new UnsupportedOperationException(); } - public static boolean gluProject( - float arg0, - float arg1, - float arg2, - java.nio.FloatBuffer arg3, - java.nio.FloatBuffer arg4, - java.nio.IntBuffer arg5, - java.nio.FloatBuffer arg6) { + public static boolean gluProject(float arg0, float arg1, float arg2, java.nio.FloatBuffer arg3, + java.nio.FloatBuffer arg4, java.nio.IntBuffer arg5, java.nio.FloatBuffer arg6) { throw new UnsupportedOperationException(); } - public static boolean gluUnProject( - float arg0, - float arg1, - float arg2, - java.nio.FloatBuffer arg3, - java.nio.FloatBuffer arg4, - java.nio.IntBuffer arg5, - java.nio.FloatBuffer arg6) { + public static boolean gluUnProject(float arg0, float arg1, float arg2, java.nio.FloatBuffer arg3, + java.nio.FloatBuffer arg4, java.nio.IntBuffer arg5, java.nio.FloatBuffer arg6) { throw new UnsupportedOperationException(); } } diff --git a/src/generated/java/org/lwjgl/util/glu/Quadric.java b/src/generated/java/org/lwjgl/util/glu/Quadric.java index 1afce7d..e4412fc 100644 --- a/src/generated/java/org/lwjgl/util/glu/Quadric.java +++ b/src/generated/java/org/lwjgl/util/glu/Quadric.java @@ -1,6 +1,7 @@ package org.lwjgl.util.glu; public class Quadric { + public int getDrawStyle() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/glu/Registry.java b/src/generated/java/org/lwjgl/util/glu/Registry.java index 437eeab..20032eb 100644 --- a/src/generated/java/org/lwjgl/util/glu/Registry.java +++ b/src/generated/java/org/lwjgl/util/glu/Registry.java @@ -1,6 +1,7 @@ package org.lwjgl.util.glu; public class Registry extends org.lwjgl.util.glu.Util { + public static boolean gluCheckExtension(java.lang.String arg0, java.lang.String arg1) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/glu/Sphere.java b/src/generated/java/org/lwjgl/util/glu/Sphere.java index 086c070..7a4fca1 100644 --- a/src/generated/java/org/lwjgl/util/glu/Sphere.java +++ b/src/generated/java/org/lwjgl/util/glu/Sphere.java @@ -1,6 +1,7 @@ package org.lwjgl.util.glu; public class Sphere extends org.lwjgl.util.glu.Quadric { + public void draw(float arg0, int arg1, int arg2) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/glu/Util.java b/src/generated/java/org/lwjgl/util/glu/Util.java index 7018191..a2a5d13 100644 --- a/src/generated/java/org/lwjgl/util/glu/Util.java +++ b/src/generated/java/org/lwjgl/util/glu/Util.java @@ -1,3 +1,4 @@ package org.lwjgl.util.glu; -public class Util {} +public class Util { +} diff --git a/src/generated/java/org/lwjgl/util/glu/tessellation/Dict$DictLeq.java b/src/generated/java/org/lwjgl/util/glu/tessellation/Dict$DictLeq.java index b8117e2..6e2b6cb 100644 --- a/src/generated/java/org/lwjgl/util/glu/tessellation/Dict$DictLeq.java +++ b/src/generated/java/org/lwjgl/util/glu/tessellation/Dict$DictLeq.java @@ -1,5 +1,6 @@ package org.lwjgl.util.glu.tessellation; public interface Dict$DictLeq { + public abstract boolean leq(java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2); } diff --git a/src/generated/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java b/src/generated/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java index 85ba9c1..672b665 100644 --- a/src/generated/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java +++ b/src/generated/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java @@ -1,6 +1,7 @@ package org.lwjgl.util.glu.tessellation; public class GLUtessellatorImpl { + public static final int TESS_MAX_CACHE = (int) 100; public void gluBeginPolygon() { diff --git a/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$Leq.java b/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$Leq.java index 37caa77..6b6845c 100644 --- a/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$Leq.java +++ b/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$Leq.java @@ -1,5 +1,6 @@ package org.lwjgl.util.glu.tessellation; public interface PriorityQ$Leq { + public abstract boolean leq(java.lang.Object arg0, java.lang.Object arg1); } diff --git a/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$PQhandleElem.java b/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$PQhandleElem.java index eb574ef..6ecfc28 100644 --- a/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$PQhandleElem.java +++ b/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$PQhandleElem.java @@ -1,3 +1,4 @@ package org.lwjgl.util.glu.tessellation; -public class PriorityQ$PQhandleElem {} +public class PriorityQ$PQhandleElem { +} diff --git a/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$PQnode.java b/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$PQnode.java index 809826d..6a40b1f 100644 --- a/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$PQnode.java +++ b/src/generated/java/org/lwjgl/util/glu/tessellation/PriorityQ$PQnode.java @@ -1,3 +1,4 @@ package org.lwjgl.util.glu.tessellation; -public class PriorityQ$PQnode {} +public class PriorityQ$PQnode { +} diff --git a/src/generated/java/org/lwjgl/util/input/ControllerAdapter.java b/src/generated/java/org/lwjgl/util/input/ControllerAdapter.java index 2e989e3..c816a0f 100644 --- a/src/generated/java/org/lwjgl/util/input/ControllerAdapter.java +++ b/src/generated/java/org/lwjgl/util/input/ControllerAdapter.java @@ -1,6 +1,7 @@ package org.lwjgl.util.input; public class ControllerAdapter { + public int getAxisCount() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/jinput/LWJGLEnvironmentPlugin.java b/src/generated/java/org/lwjgl/util/jinput/LWJGLEnvironmentPlugin.java index 8a73771..0427317 100644 --- a/src/generated/java/org/lwjgl/util/jinput/LWJGLEnvironmentPlugin.java +++ b/src/generated/java/org/lwjgl/util/jinput/LWJGLEnvironmentPlugin.java @@ -1,6 +1,7 @@ package org.lwjgl.util.jinput; public class LWJGLEnvironmentPlugin extends net.java.games.input.ControllerEnvironment { + public net.java.games.input.Controller[] getControllers() { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/mapped/CacheLinePad.java b/src/generated/java/org/lwjgl/util/mapped/CacheLinePad.java index 78fe125..9ff2faa 100644 --- a/src/generated/java/org/lwjgl/util/mapped/CacheLinePad.java +++ b/src/generated/java/org/lwjgl/util/mapped/CacheLinePad.java @@ -1,6 +1,7 @@ package org.lwjgl.util.mapped; public interface CacheLinePad { + public abstract boolean after(); public abstract boolean before(); diff --git a/src/generated/java/org/lwjgl/util/mapped/CacheUtil.java b/src/generated/java/org/lwjgl/util/mapped/CacheUtil.java index aad2c93..91d3aaf 100644 --- a/src/generated/java/org/lwjgl/util/mapped/CacheUtil.java +++ b/src/generated/java/org/lwjgl/util/mapped/CacheUtil.java @@ -1,6 +1,7 @@ package org.lwjgl.util.mapped; public class CacheUtil { + public static java.nio.ByteBuffer createByteBuffer(int arg0) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/mapped/MappedField.java b/src/generated/java/org/lwjgl/util/mapped/MappedField.java index 313c067..7f10654 100644 --- a/src/generated/java/org/lwjgl/util/mapped/MappedField.java +++ b/src/generated/java/org/lwjgl/util/mapped/MappedField.java @@ -1,6 +1,7 @@ package org.lwjgl.util.mapped; public interface MappedField { + public abstract long byteLength(); public abstract long byteOffset(); diff --git a/src/generated/java/org/lwjgl/util/mapped/MappedHelper.java b/src/generated/java/org/lwjgl/util/mapped/MappedHelper.java index a8a33bb..8f54d07 100644 --- a/src/generated/java/org/lwjgl/util/mapped/MappedHelper.java +++ b/src/generated/java/org/lwjgl/util/mapped/MappedHelper.java @@ -1,6 +1,7 @@ package org.lwjgl.util.mapped; public class MappedHelper { + public static long aget(long arg0) { throw new UnsupportedOperationException(); } @@ -61,8 +62,8 @@ public class MappedHelper { throw new UnsupportedOperationException(); } - public static void copy( - org.lwjgl.util.mapped.MappedObject arg0, org.lwjgl.util.mapped.MappedObject arg1, int arg2) { + public static void copy(org.lwjgl.util.mapped.MappedObject arg0, org.lwjgl.util.mapped.MappedObject arg1, + int arg2) { throw new UnsupportedOperationException(); } @@ -106,8 +107,8 @@ public class MappedHelper { throw new UnsupportedOperationException(); } - public static org.lwjgl.util.mapped.MappedObject dup( - org.lwjgl.util.mapped.MappedObject arg0, org.lwjgl.util.mapped.MappedObject arg1) { + public static org.lwjgl.util.mapped.MappedObject dup(org.lwjgl.util.mapped.MappedObject arg0, + org.lwjgl.util.mapped.MappedObject arg1) { throw new UnsupportedOperationException(); } @@ -271,8 +272,8 @@ public class MappedHelper { throw new UnsupportedOperationException(); } - public static org.lwjgl.util.mapped.MappedObject slice( - org.lwjgl.util.mapped.MappedObject arg0, org.lwjgl.util.mapped.MappedObject arg1) { + public static org.lwjgl.util.mapped.MappedObject slice(org.lwjgl.util.mapped.MappedObject arg0, + org.lwjgl.util.mapped.MappedObject arg1) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/mapped/MappedObject.java b/src/generated/java/org/lwjgl/util/mapped/MappedObject.java index d050240..5488d5f 100644 --- a/src/generated/java/org/lwjgl/util/mapped/MappedObject.java +++ b/src/generated/java/org/lwjgl/util/mapped/MappedObject.java @@ -1,6 +1,7 @@ package org.lwjgl.util.mapped; public abstract class MappedObject { + public static int SIZEOF = 0; public long baseAddress = 0; public int view = 0; diff --git a/src/generated/java/org/lwjgl/util/mapped/MappedObjectTransformer.java b/src/generated/java/org/lwjgl/util/mapped/MappedObjectTransformer.java index 3e1dd94..0f02cc1 100644 --- a/src/generated/java/org/lwjgl/util/mapped/MappedObjectTransformer.java +++ b/src/generated/java/org/lwjgl/util/mapped/MappedObjectTransformer.java @@ -1,6 +1,7 @@ package org.lwjgl.util.mapped; public class MappedObjectTransformer { + public static void register(java.lang.Class arg0) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/mapped/MappedSet.java b/src/generated/java/org/lwjgl/util/mapped/MappedSet.java index be225b2..5e6f185 100644 --- a/src/generated/java/org/lwjgl/util/mapped/MappedSet.java +++ b/src/generated/java/org/lwjgl/util/mapped/MappedSet.java @@ -1,22 +1,19 @@ package org.lwjgl.util.mapped; public class MappedSet { - public static org.lwjgl.util.mapped.MappedSet2 create( - org.lwjgl.util.mapped.MappedObject arg0, org.lwjgl.util.mapped.MappedObject arg1) { + + public static org.lwjgl.util.mapped.MappedSet2 create(org.lwjgl.util.mapped.MappedObject arg0, + org.lwjgl.util.mapped.MappedObject arg1) { throw new UnsupportedOperationException(); } - public static org.lwjgl.util.mapped.MappedSet3 create( - org.lwjgl.util.mapped.MappedObject arg0, - org.lwjgl.util.mapped.MappedObject arg1, - org.lwjgl.util.mapped.MappedObject arg2) { + public static org.lwjgl.util.mapped.MappedSet3 create(org.lwjgl.util.mapped.MappedObject arg0, + org.lwjgl.util.mapped.MappedObject arg1, org.lwjgl.util.mapped.MappedObject arg2) { throw new UnsupportedOperationException(); } - public static org.lwjgl.util.mapped.MappedSet4 create( - org.lwjgl.util.mapped.MappedObject arg0, - org.lwjgl.util.mapped.MappedObject arg1, - org.lwjgl.util.mapped.MappedObject arg2, + public static org.lwjgl.util.mapped.MappedSet4 create(org.lwjgl.util.mapped.MappedObject arg0, + org.lwjgl.util.mapped.MappedObject arg1, org.lwjgl.util.mapped.MappedObject arg2, org.lwjgl.util.mapped.MappedObject arg3) { throw new UnsupportedOperationException(); } diff --git a/src/generated/java/org/lwjgl/util/mapped/MappedSet2.java b/src/generated/java/org/lwjgl/util/mapped/MappedSet2.java index 3dd96ca..bde63f2 100644 --- a/src/generated/java/org/lwjgl/util/mapped/MappedSet2.java +++ b/src/generated/java/org/lwjgl/util/mapped/MappedSet2.java @@ -1,6 +1,7 @@ package org.lwjgl.util.mapped; public class MappedSet2 { + public int view = 0; public void next() { diff --git a/src/generated/java/org/lwjgl/util/mapped/MappedSet3.java b/src/generated/java/org/lwjgl/util/mapped/MappedSet3.java index b2dbcb8..35af351 100644 --- a/src/generated/java/org/lwjgl/util/mapped/MappedSet3.java +++ b/src/generated/java/org/lwjgl/util/mapped/MappedSet3.java @@ -1,6 +1,7 @@ package org.lwjgl.util.mapped; public class MappedSet3 { + public int view = 0; public void next() { diff --git a/src/generated/java/org/lwjgl/util/mapped/MappedSet4.java b/src/generated/java/org/lwjgl/util/mapped/MappedSet4.java index 6e6fef2..9da196d 100644 --- a/src/generated/java/org/lwjgl/util/mapped/MappedSet4.java +++ b/src/generated/java/org/lwjgl/util/mapped/MappedSet4.java @@ -1,6 +1,7 @@ package org.lwjgl.util.mapped; public class MappedSet4 { + public int view = 0; public void next() { diff --git a/src/generated/java/org/lwjgl/util/mapped/MappedType.java b/src/generated/java/org/lwjgl/util/mapped/MappedType.java index bb87619..38f009c 100644 --- a/src/generated/java/org/lwjgl/util/mapped/MappedType.java +++ b/src/generated/java/org/lwjgl/util/mapped/MappedType.java @@ -1,6 +1,7 @@ package org.lwjgl.util.mapped; public interface MappedType { + public abstract int align(); public abstract boolean autoGenerateOffsets(); diff --git a/src/generated/java/org/lwjgl/util/mapped/Pointer.java b/src/generated/java/org/lwjgl/util/mapped/Pointer.java index 4857691..6242ede 100644 --- a/src/generated/java/org/lwjgl/util/mapped/Pointer.java +++ b/src/generated/java/org/lwjgl/util/mapped/Pointer.java @@ -1,3 +1,4 @@ package org.lwjgl.util.mapped; -public interface Pointer {} +public interface Pointer { +} diff --git a/src/generated/java/org/lwjgl/util/vector/Matrix.java b/src/generated/java/org/lwjgl/util/vector/Matrix.java index 3493ba1..50e9867 100644 --- a/src/generated/java/org/lwjgl/util/vector/Matrix.java +++ b/src/generated/java/org/lwjgl/util/vector/Matrix.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -36,12 +20,10 @@ import java.nio.FloatBuffer; /** * - * Base class for matrices. When a matrix is constructed it will be the identity - * matrix unless otherwise stated. + * Base class for matrices. When a matrix is constructed it will be the identity matrix unless otherwise stated. * * @author cix_foo - * @version $Revision: 3418 $ - * $Id: Matrix.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Matrix.java 3418 2010-09-28 21:11:35Z spasi $ */ public abstract class Matrix implements Serializable { @@ -54,19 +36,20 @@ public abstract class Matrix implements Serializable { /** * Set this matrix to be the identity matrix. + * * @return this */ public abstract Matrix setIdentity(); /** * Invert this matrix + * * @return this */ public abstract Matrix invert(); /** - * Load from a float buffer. The buffer stores the matrix in column major - * (OpenGL) order. + * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. * * @param buf A float buffer to read from * @return this @@ -74,8 +57,7 @@ public abstract class Matrix implements Serializable { public abstract Matrix load(FloatBuffer buf); /** - * Load from a float buffer. The buffer stores the matrix in row major - * (mathematical) order. + * Load from a float buffer. The buffer stores the matrix in row major (mathematical) order. * * @param buf A float buffer to read from * @return this @@ -84,21 +66,22 @@ public abstract class Matrix implements Serializable { /** * Negate this matrix + * * @return this */ public abstract Matrix negate(); /** - * Store this matrix in a float buffer. The matrix is stored in column - * major (openGL) order. + * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. + * * @param buf The buffer to store this matrix in * @return this */ public abstract Matrix store(FloatBuffer buf); /** - * Store this matrix in a float buffer. The matrix is stored in row - * major (maths) order. + * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. + * * @param buf The buffer to store this matrix in * @return this */ @@ -106,12 +89,14 @@ public abstract class Matrix implements Serializable { /** * Transpose this matrix + * * @return this */ public abstract Matrix transpose(); /** * Set this matrix to 0. + * * @return this */ public abstract Matrix setZero(); diff --git a/src/generated/java/org/lwjgl/util/vector/Matrix2f.java b/src/generated/java/org/lwjgl/util/vector/Matrix2f.java index ebcb3af..d5f7f59 100644 --- a/src/generated/java/org/lwjgl/util/vector/Matrix2f.java +++ b/src/generated/java/org/lwjgl/util/vector/Matrix2f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Holds a 2x2 matrix * * @author cix_foo - * @version $Revision: 3799 $ - * $Id: Matrix2f.java 3799 2012-09-12 11:29:40Z kappa1 $ + * @version $Revision: 3799 $ $Id: Matrix2f.java 3799 2012-09-12 11:29:40Z kappa1 $ */ public class Matrix2f extends Matrix implements Serializable { @@ -64,6 +47,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Load from another matrix + * * @param src The source matrix * @return this */ @@ -73,7 +57,8 @@ public class Matrix2f extends Matrix implements Serializable { /** * Copy the source matrix to the destination matrix. - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null if a new one should be created. * @return The copied matrix */ @@ -89,8 +74,7 @@ public class Matrix2f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in column major - * (OpenGL) order. + * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. * * @param buf A float buffer to read from * @return this @@ -106,8 +90,7 @@ public class Matrix2f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in row major - * (mathematical) order. + * Load from a float buffer. The buffer stores the matrix in row major (mathematical) order. * * @param buf A float buffer to read from * @return this @@ -123,8 +106,8 @@ public class Matrix2f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in column - * major (openGL) order. + * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. + * * @param buf The buffer to store this matrix in */ public Matrix store(FloatBuffer buf) { @@ -136,8 +119,8 @@ public class Matrix2f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in row - * major (maths) order. + * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. + * * @param buf The buffer to store this matrix in */ public Matrix storeTranspose(FloatBuffer buf) { @@ -150,9 +133,10 @@ public class Matrix2f extends Matrix implements Serializable { /** * Add two matrices together and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix2f add(Matrix2f left, Matrix2f right, Matrix2f dest) { @@ -168,9 +152,10 @@ public class Matrix2f extends Matrix implements Serializable { /** * Subtract the right matrix from the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix2f sub(Matrix2f left, Matrix2f right, Matrix2f dest) { @@ -186,9 +171,10 @@ public class Matrix2f extends Matrix implements Serializable { /** * Multiply the right matrix by the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix2f mul(Matrix2f left, Matrix2f right, Matrix2f dest) { @@ -208,11 +194,11 @@ public class Matrix2f extends Matrix implements Serializable { } /** - * Transform a Vector by a matrix and return the result in a destination - * vector. - * @param left The left matrix + * Transform a Vector by a matrix and return the result in a destination vector. + * + * @param left The left matrix * @param right The right vector - * @param dest The destination vector, or null if a new one is to be created + * @param dest The destination vector, or null if a new one is to be created * @return the destination vector */ public static Vector2f transform(Matrix2f left, Vector2f right, Vector2f dest) { @@ -229,6 +215,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Transpose this matrix + * * @return this */ public Matrix transpose() { @@ -237,6 +224,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Transpose this matrix and place the result in another matrix. + * * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -246,7 +234,8 @@ public class Matrix2f extends Matrix implements Serializable { /** * Transpose the source matrix and place the result in the destination matrix. - * @param src The source matrix or null if a new matrix is to be created + * + * @param src The source matrix or null if a new matrix is to be created * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -264,6 +253,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Invert this matrix + * * @return this if successful, null otherwise */ public Matrix invert() { @@ -272,13 +262,14 @@ public class Matrix2f extends Matrix implements Serializable { /** * Invert the source matrix and place the result in the destination matrix. - * @param src The source matrix to be inverted + * + * @param src The source matrix to be inverted * @param dest The destination matrix or null if a new matrix is to be created * @return The inverted matrix, or null if source can't be reverted. */ public static Matrix2f invert(Matrix2f src, Matrix2f dest) { /* - *inv(A) = 1/det(A) * adj(A); + * inv(A) = 1/det(A) * adj(A); */ float determinant = src.determinant(); @@ -310,6 +301,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Negate this matrix + * * @return this */ public Matrix negate() { @@ -318,6 +310,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Negate this matrix and stash the result in another matrix. + * * @param dest The destination matrix, or null if a new matrix is to be created * @return the negated matrix */ @@ -327,7 +320,8 @@ public class Matrix2f extends Matrix implements Serializable { /** * Negate the source matrix and stash the result in the destination matrix. - * @param src The source matrix to be negated + * + * @param src The source matrix to be negated * @param dest The destination matrix, or null if a new matrix is to be created * @return the negated matrix */ @@ -344,6 +338,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Set this matrix to be the identity matrix. + * * @return this */ public Matrix setIdentity() { @@ -352,6 +347,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Set the source matrix to be the identity matrix. + * * @param src The matrix to set to the identity. * @return The source matrix */ @@ -365,6 +361,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Set this matrix to 0. + * * @return this */ public Matrix setZero() { @@ -379,7 +376,8 @@ public class Matrix2f extends Matrix implements Serializable { return src; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Matrix#determinant() */ public float determinant() { diff --git a/src/generated/java/org/lwjgl/util/vector/Matrix3f.java b/src/generated/java/org/lwjgl/util/vector/Matrix3f.java index 02ca908..0e3ab4c 100644 --- a/src/generated/java/org/lwjgl/util/vector/Matrix3f.java +++ b/src/generated/java/org/lwjgl/util/vector/Matrix3f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Holds a 3x3 matrix. * * @author cix_foo - * @version $Revision: 3799 $ - * $Id: Matrix3f.java 3799 2012-09-12 11:29:40Z kappa1 $ + * @version $Revision: 3799 $ $Id: Matrix3f.java 3799 2012-09-12 11:29:40Z kappa1 $ */ public class Matrix3f extends Matrix implements Serializable { @@ -58,6 +41,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Load from another matrix + * * @param src The source matrix * @return this */ @@ -67,7 +51,8 @@ public class Matrix3f extends Matrix implements Serializable { /** * Copy source matrix to destination matrix - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null of a new matrix is to be created * @return The copied matrix */ @@ -88,8 +73,7 @@ public class Matrix3f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in column major - * (OpenGL) order. + * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. * * @param buf A float buffer to read from * @return this @@ -110,8 +94,7 @@ public class Matrix3f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in row major - * (maths) order. + * Load from a float buffer. The buffer stores the matrix in row major (maths) order. * * @param buf A float buffer to read from * @return this @@ -132,8 +115,8 @@ public class Matrix3f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in column - * major (openGL) order. + * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. + * * @param buf The buffer to store this matrix in */ public Matrix store(FloatBuffer buf) { @@ -150,8 +133,8 @@ public class Matrix3f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in row - * major (maths) order. + * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. + * * @param buf The buffer to store this matrix in */ public Matrix storeTranspose(FloatBuffer buf) { @@ -169,9 +152,10 @@ public class Matrix3f extends Matrix implements Serializable { /** * Add two matrices together and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix3f add(Matrix3f left, Matrix3f right, Matrix3f dest) { @@ -192,9 +176,10 @@ public class Matrix3f extends Matrix implements Serializable { /** * Subtract the right matrix from the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix3f sub(Matrix3f left, Matrix3f right, Matrix3f dest) { @@ -215,9 +200,10 @@ public class Matrix3f extends Matrix implements Serializable { /** * Multiply the right matrix by the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix3f mul(Matrix3f left, Matrix3f right, Matrix3f dest) { @@ -247,11 +233,11 @@ public class Matrix3f extends Matrix implements Serializable { } /** - * Transform a Vector by a matrix and return the result in a destination - * vector. - * @param left The left matrix + * Transform a Vector by a matrix and return the result in a destination vector. + * + * @param left The left matrix * @param right The right vector - * @param dest The destination vector, or null if a new one is to be created + * @param dest The destination vector, or null if a new one is to be created * @return the destination vector */ public static Vector3f transform(Matrix3f left, Vector3f right, Vector3f dest) { @@ -270,6 +256,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Transpose this matrix + * * @return this */ public Matrix transpose() { @@ -278,6 +265,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Transpose this matrix and place the result in another matrix + * * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -287,7 +275,8 @@ public class Matrix3f extends Matrix implements Serializable { /** * Transpose the source matrix and place the result into the destination matrix - * @param src The source matrix to be transposed + * + * @param src The source matrix to be transposed * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -328,32 +317,15 @@ public class Matrix3f extends Matrix implements Serializable { */ public String toString() { StringBuilder buf = new StringBuilder(); - buf.append(m00) - .append(' ') - .append(m10) - .append(' ') - .append(m20) - .append(' ') - .append('\n'); - buf.append(m01) - .append(' ') - .append(m11) - .append(' ') - .append(m21) - .append(' ') - .append('\n'); - buf.append(m02) - .append(' ') - .append(m12) - .append(' ') - .append(m22) - .append(' ') - .append('\n'); + buf.append(m00).append(' ').append(m10).append(' ').append(m20).append(' ').append('\n'); + buf.append(m01).append(' ').append(m11).append(' ').append(m21).append(' ').append('\n'); + buf.append(m02).append(' ').append(m12).append(' ').append(m22).append(' ').append('\n'); return buf.toString(); } /** * Invert this matrix + * * @return this if successful, null otherwise */ public Matrix invert() { @@ -362,7 +334,8 @@ public class Matrix3f extends Matrix implements Serializable { /** * Invert the source matrix and put the result into the destination matrix - * @param src The source matrix to be inverted + * + * @param src The source matrix to be inverted * @param dest The destination matrix, or null if a new one is to be created * @return The inverted matrix if successful, null otherwise */ @@ -371,13 +344,9 @@ public class Matrix3f extends Matrix implements Serializable { if (determinant != 0) { if (dest == null) dest = new Matrix3f(); - /* do it the ordinary way - * - * inv(A) = 1/det(A) * adj(T), where adj(T) = transpose(Conjugate Matrix) - * - * m00 m01 m02 - * m10 m11 m12 - * m20 m21 m22 + /* + * do it the ordinary way inv(A) = 1/det(A) * adj(T), where adj(T) = transpose(Conjugate Matrix) m00 m01 m02 + * m10 m11 m12 m20 m21 m22 */ float determinant_inv = 1f / determinant; @@ -407,6 +376,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Negate this matrix + * * @return this */ public Matrix negate() { @@ -415,6 +385,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Negate this matrix and place the result in a destination matrix. + * * @param dest The destination matrix, or null if a new matrix is to be created * @return the negated matrix */ @@ -424,7 +395,8 @@ public class Matrix3f extends Matrix implements Serializable { /** * Negate the source matrix and place the result in the destination matrix. - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null if a new matrix is to be created * @return the negated matrix */ @@ -445,6 +417,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Set this matrix to be the identity matrix. + * * @return this */ public Matrix setIdentity() { @@ -453,6 +426,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Set the matrix to be the identity matrix. + * * @param m The matrix to be set to the identity * @return m */ @@ -471,6 +445,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Set this matrix to 0. + * * @return this */ public Matrix setZero() { @@ -479,6 +454,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Set the matrix matrix to 0. + * * @param m The matrix to be set to 0 * @return m */ diff --git a/src/generated/java/org/lwjgl/util/vector/Matrix4f.java b/src/generated/java/org/lwjgl/util/vector/Matrix4f.java index 4e553e6..0bfddb1 100644 --- a/src/generated/java/org/lwjgl/util/vector/Matrix4f.java +++ b/src/generated/java/org/lwjgl/util/vector/Matrix4f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -40,6 +24,7 @@ import java.nio.FloatBuffer; * @author foo */ public class Matrix4f extends Matrix implements Serializable { + private static final long serialVersionUID = 1L; public float m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33; @@ -62,43 +47,16 @@ public class Matrix4f extends Matrix implements Serializable { */ public String toString() { StringBuilder buf = new StringBuilder(); - buf.append(m00) - .append(' ') - .append(m10) - .append(' ') - .append(m20) - .append(' ') - .append(m30) - .append('\n'); - buf.append(m01) - .append(' ') - .append(m11) - .append(' ') - .append(m21) - .append(' ') - .append(m31) - .append('\n'); - buf.append(m02) - .append(' ') - .append(m12) - .append(' ') - .append(m22) - .append(' ') - .append(m32) - .append('\n'); - buf.append(m03) - .append(' ') - .append(m13) - .append(' ') - .append(m23) - .append(' ') - .append(m33) - .append('\n'); + buf.append(m00).append(' ').append(m10).append(' ').append(m20).append(' ').append(m30).append('\n'); + buf.append(m01).append(' ').append(m11).append(' ').append(m21).append(' ').append(m31).append('\n'); + buf.append(m02).append(' ').append(m12).append(' ').append(m22).append(' ').append(m32).append('\n'); + buf.append(m03).append(' ').append(m13).append(' ').append(m23).append(' ').append(m33).append('\n'); return buf.toString(); } /** * Set this matrix to be the identity matrix. + * * @return this */ public Matrix setIdentity() { @@ -107,6 +65,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Set the given matrix to be the identity matrix. + * * @param m The matrix to set to the identity * @return m */ @@ -133,6 +92,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Set this matrix to 0. + * * @return this */ public Matrix setZero() { @@ -141,6 +101,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Set the given matrix to 0. + * * @param m The matrix to set to 0 * @return m */ @@ -167,6 +128,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Load from another matrix4f + * * @param src The source matrix * @return this */ @@ -176,7 +138,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Copy the source matrix to the destination matrix - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null of a new one is to be created * @return The copied matrix */ @@ -203,8 +166,7 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in column major - * (OpenGL) order. + * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. * * @param buf A float buffer to read from * @return this @@ -232,8 +194,7 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in row major - * (maths) order. + * Load from a float buffer. The buffer stores the matrix in row major (maths) order. * * @param buf A float buffer to read from * @return this @@ -261,8 +222,8 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in column - * major (openGL) order. + * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. + * * @param buf The buffer to store this matrix in */ public Matrix store(FloatBuffer buf) { @@ -286,8 +247,8 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in row - * major (maths) order. + * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. + * * @param buf The buffer to store this matrix in */ public Matrix storeTranspose(FloatBuffer buf) { @@ -311,8 +272,8 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Store the rotation portion of this matrix in a float buffer. The matrix is stored in column - * major (openGL) order. + * Store the rotation portion of this matrix in a float buffer. The matrix is stored in column major (openGL) order. + * * @param buf The buffer to store this matrix in */ public Matrix store3f(FloatBuffer buf) { @@ -330,9 +291,10 @@ public class Matrix4f extends Matrix implements Serializable { /** * Add two matrices together and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix4f add(Matrix4f left, Matrix4f right, Matrix4f dest) { @@ -360,9 +322,10 @@ public class Matrix4f extends Matrix implements Serializable { /** * Subtract the right matrix from the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix4f sub(Matrix4f left, Matrix4f right, Matrix4f dest) { @@ -390,9 +353,10 @@ public class Matrix4f extends Matrix implements Serializable { /** * Multiply the right matrix by the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix4f mul(Matrix4f left, Matrix4f right, Matrix4f dest) { @@ -436,11 +400,11 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Transform a Vector by a matrix and return the result in a destination - * vector. - * @param left The left matrix + * Transform a Vector by a matrix and return the result in a destination vector. + * + * @param left The left matrix * @param right The right vector - * @param dest The destination vector, or null if a new one is to be created + * @param dest The destination vector, or null if a new one is to be created * @return the destination vector */ public static Vector4f transform(Matrix4f left, Vector4f right, Vector4f dest) { @@ -461,6 +425,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Transpose this matrix + * * @return this */ public Matrix transpose() { @@ -469,6 +434,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate this matrix + * * @param vec The vector to translate by * @return this */ @@ -478,6 +444,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate this matrix + * * @param vec The vector to translate by * @return this */ @@ -487,6 +454,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Scales this matrix + * * @param vec The vector to scale by * @return this */ @@ -496,8 +464,9 @@ public class Matrix4f extends Matrix implements Serializable { /** * Scales the source matrix and put the result in the destination matrix - * @param vec The vector to scale by - * @param src The source matrix + * + * @param vec The vector to scale by + * @param src The source matrix * @param dest The destination matrix, or null if a new matrix is to be created * @return The scaled matrix */ @@ -520,8 +489,9 @@ public class Matrix4f extends Matrix implements Serializable { /** * Rotates the matrix around the given axis the specified angle + * * @param angle the angle, in radians. - * @param axis The vector representing the rotation axis. Must be normalized. + * @param axis The vector representing the rotation axis. Must be normalized. * @return this */ public Matrix4f rotate(float angle, Vector3f axis) { @@ -530,9 +500,10 @@ public class Matrix4f extends Matrix implements Serializable { /** * Rotates the matrix around the given axis the specified angle + * * @param angle the angle, in radians. - * @param axis The vector representing the rotation axis. Must be normalized. - * @param dest The matrix to put the result, or null if a new matrix is to be created + * @param axis The vector representing the rotation axis. Must be normalized. + * @param dest The matrix to put the result, or null if a new matrix is to be created * @return The rotated matrix */ public Matrix4f rotate(float angle, Vector3f axis, Matrix4f dest) { @@ -540,12 +511,12 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Rotates the source matrix around the given axis the specified angle and - * put the result in the destination matrix. + * Rotates the source matrix around the given axis the specified angle and put the result in the destination matrix. + * * @param angle the angle, in radians. - * @param axis The vector representing the rotation axis. Must be normalized. - * @param src The matrix to rotate - * @param dest The matrix to put the result, or null if a new matrix is to be created + * @param axis The vector representing the rotation axis. Must be normalized. + * @param src The matrix to rotate + * @param dest The matrix to put the result, or null if a new matrix is to be created * @return The rotated matrix */ public static Matrix4f rotate(float angle, Vector3f axis, Matrix4f src, Matrix4f dest) { @@ -597,7 +568,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate this matrix and stash the result in another matrix - * @param vec The vector to translate by + * + * @param vec The vector to translate by * @param dest The destination matrix or null if a new matrix is to be created * @return the translated matrix */ @@ -607,8 +579,9 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate the source matrix and stash the result in the destination matrix - * @param vec The vector to translate by - * @param src The source matrix + * + * @param vec The vector to translate by + * @param src The source matrix * @param dest The destination matrix or null if a new matrix is to be created * @return The translated matrix */ @@ -625,7 +598,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate this matrix and stash the result in another matrix - * @param vec The vector to translate by + * + * @param vec The vector to translate by * @param dest The destination matrix or null if a new matrix is to be created * @return the translated matrix */ @@ -635,8 +609,9 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate the source matrix and stash the result in the destination matrix - * @param vec The vector to translate by - * @param src The source matrix + * + * @param vec The vector to translate by + * @param src The source matrix * @param dest The destination matrix or null if a new matrix is to be created * @return The translated matrix */ @@ -653,6 +628,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Transpose this matrix and place the result in another matrix + * * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -662,7 +638,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Transpose the source matrix and place the result in the destination matrix - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -709,40 +686,34 @@ public class Matrix4f extends Matrix implements Serializable { * @return the determinant of the matrix */ public float determinant() { - float f = m00 - * ((m11 * m22 * m33 + m12 * m23 * m31 + m13 * m21 * m32) - - m13 * m22 * m31 - - m11 * m23 * m32 - - m12 * m21 * m33); - f -= m01 - * ((m10 * m22 * m33 + m12 * m23 * m30 + m13 * m20 * m32) - - m13 * m22 * m30 - - m10 * m23 * m32 - - m12 * m20 * m33); - f += m02 - * ((m10 * m21 * m33 + m11 * m23 * m30 + m13 * m20 * m31) - - m13 * m21 * m30 - - m10 * m23 * m31 - - m11 * m20 * m33); - f -= m03 - * ((m10 * m21 * m32 + m11 * m22 * m30 + m12 * m20 * m31) - - m12 * m21 * m30 - - m10 * m22 * m31 - - m11 * m20 * m32); + float f = m00 * ((m11 * m22 * m33 + m12 * m23 * m31 + m13 * m21 * m32) - m13 * m22 * m31 + - m11 * m23 * m32 + - m12 * m21 * m33); + f -= m01 * ((m10 * m22 * m33 + m12 * m23 * m30 + m13 * m20 * m32) - m13 * m22 * m30 + - m10 * m23 * m32 + - m12 * m20 * m33); + f += m02 * ((m10 * m21 * m33 + m11 * m23 * m30 + m13 * m20 * m31) - m13 * m21 * m30 + - m10 * m23 * m31 + - m11 * m20 * m33); + f -= m03 * ((m10 * m21 * m32 + m11 * m22 * m30 + m12 * m20 * m31) - m12 * m21 * m30 + - m10 * m22 * m31 + - m11 * m20 * m32); return f; } /** * Calculate the determinant of a 3x3 matrix + * * @return result */ - private static float determinant3x3( - float t00, float t01, float t02, float t10, float t11, float t12, float t20, float t21, float t22) { + private static float determinant3x3(float t00, float t01, float t02, float t10, float t11, float t12, float t20, + float t21, float t22) { return t00 * (t11 * t22 - t12 * t21) + t01 * (t12 * t20 - t10 * t22) + t02 * (t10 * t21 - t11 * t20); } /** * Invert this matrix + * * @return this if successful, null otherwise */ public Matrix invert() { @@ -751,7 +722,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Invert the source matrix and put the result in the destination - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null if a new matrix is to be created * @return The inverted matrix if successful, null otherwise */ @@ -760,41 +732,102 @@ public class Matrix4f extends Matrix implements Serializable { if (determinant != 0) { /* - * m00 m01 m02 m03 - * m10 m11 m12 m13 - * m20 m21 m22 m23 - * m30 m31 m32 m33 + * m00 m01 m02 m03 m10 m11 m12 m13 m20 m21 m22 m23 m30 m31 m32 m33 */ if (dest == null) dest = new Matrix4f(); float determinant_inv = 1f / determinant; // first row float t00 = determinant3x3(src.m11, src.m12, src.m13, src.m21, src.m22, src.m23, src.m31, src.m32, src.m33); - float t01 = - -determinant3x3(src.m10, src.m12, src.m13, src.m20, src.m22, src.m23, src.m30, src.m32, src.m33); + float t01 = -determinant3x3( + src.m10, + src.m12, + src.m13, + src.m20, + src.m22, + src.m23, + src.m30, + src.m32, + src.m33); float t02 = determinant3x3(src.m10, src.m11, src.m13, src.m20, src.m21, src.m23, src.m30, src.m31, src.m33); - float t03 = - -determinant3x3(src.m10, src.m11, src.m12, src.m20, src.m21, src.m22, src.m30, src.m31, src.m32); + float t03 = -determinant3x3( + src.m10, + src.m11, + src.m12, + src.m20, + src.m21, + src.m22, + src.m30, + src.m31, + src.m32); // second row - float t10 = - -determinant3x3(src.m01, src.m02, src.m03, src.m21, src.m22, src.m23, src.m31, src.m32, src.m33); + float t10 = -determinant3x3( + src.m01, + src.m02, + src.m03, + src.m21, + src.m22, + src.m23, + src.m31, + src.m32, + src.m33); float t11 = determinant3x3(src.m00, src.m02, src.m03, src.m20, src.m22, src.m23, src.m30, src.m32, src.m33); - float t12 = - -determinant3x3(src.m00, src.m01, src.m03, src.m20, src.m21, src.m23, src.m30, src.m31, src.m33); + float t12 = -determinant3x3( + src.m00, + src.m01, + src.m03, + src.m20, + src.m21, + src.m23, + src.m30, + src.m31, + src.m33); float t13 = determinant3x3(src.m00, src.m01, src.m02, src.m20, src.m21, src.m22, src.m30, src.m31, src.m32); // third row float t20 = determinant3x3(src.m01, src.m02, src.m03, src.m11, src.m12, src.m13, src.m31, src.m32, src.m33); - float t21 = - -determinant3x3(src.m00, src.m02, src.m03, src.m10, src.m12, src.m13, src.m30, src.m32, src.m33); + float t21 = -determinant3x3( + src.m00, + src.m02, + src.m03, + src.m10, + src.m12, + src.m13, + src.m30, + src.m32, + src.m33); float t22 = determinant3x3(src.m00, src.m01, src.m03, src.m10, src.m11, src.m13, src.m30, src.m31, src.m33); - float t23 = - -determinant3x3(src.m00, src.m01, src.m02, src.m10, src.m11, src.m12, src.m30, src.m31, src.m32); + float t23 = -determinant3x3( + src.m00, + src.m01, + src.m02, + src.m10, + src.m11, + src.m12, + src.m30, + src.m31, + src.m32); // fourth row - float t30 = - -determinant3x3(src.m01, src.m02, src.m03, src.m11, src.m12, src.m13, src.m21, src.m22, src.m23); + float t30 = -determinant3x3( + src.m01, + src.m02, + src.m03, + src.m11, + src.m12, + src.m13, + src.m21, + src.m22, + src.m23); float t31 = determinant3x3(src.m00, src.m02, src.m03, src.m10, src.m12, src.m13, src.m20, src.m22, src.m23); - float t32 = - -determinant3x3(src.m00, src.m01, src.m03, src.m10, src.m11, src.m13, src.m20, src.m21, src.m23); + float t32 = -determinant3x3( + src.m00, + src.m01, + src.m03, + src.m10, + src.m11, + src.m13, + src.m20, + src.m21, + src.m23); float t33 = determinant3x3(src.m00, src.m01, src.m02, src.m10, src.m11, src.m12, src.m20, src.m21, src.m22); // transpose and divide by the determinant @@ -820,6 +853,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Negate this matrix + * * @return this */ public Matrix negate() { @@ -828,6 +862,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Negate this matrix and place the result in a destination matrix. + * * @param dest The destination matrix, or null if a new matrix is to be created * @return the negated matrix */ @@ -837,7 +872,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Negate this matrix and place the result in a destination matrix. - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null if a new matrix is to be created * @return The negated matrix */ diff --git a/src/generated/java/org/lwjgl/util/vector/Quaternion.java b/src/generated/java/org/lwjgl/util/vector/Quaternion.java index 1278ee8..91525b5 100644 --- a/src/generated/java/org/lwjgl/util/vector/Quaternion.java +++ b/src/generated/java/org/lwjgl/util/vector/Quaternion.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -36,12 +20,12 @@ package org.lwjgl.util.vector; * Quaternions for LWJGL! * * @author fbi - * @version $Revision: 3418 $ - * $Id: Quaternion.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Quaternion.java 3418 2010-09-28 21:11:35Z spasi $ */ import java.nio.FloatBuffer; public class Quaternion extends Vector implements ReadableVector4f { + private static final long serialVersionUID = 1L; public float x, y, z, w; @@ -73,7 +57,6 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (non-Javadoc) - * * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) */ public void set(float x, float y) { @@ -83,7 +66,6 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (non-Javadoc) - * * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) */ public void set(float x, float y, float z) { @@ -94,9 +76,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (non-Javadoc) - * - * @see org.lwjgl.util.vector.WritableVector4f#set(float, float, float, - * float) + * @see org.lwjgl.util.vector.WritableVector4f#set(float, float, float, float) */ public void set(float x, float y, float z, float w) { this.x = x; @@ -108,8 +88,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Load from another Vector4f * - * @param src - * The source vector + * @param src The source vector * @return this */ public Quaternion set(ReadableVector4f src) { @@ -122,6 +101,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Set this quaternion to the multiplication identity. + * * @return this */ public Quaternion setIdentity() { @@ -130,6 +110,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Set the given quaternion to the multiplication identity. + * * @param q The quaternion * @return q */ @@ -151,11 +132,8 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Normalise the source quaternion and place the result in another quaternion. * - * @param src - * The source quaternion - * @param dest - * The destination quaternion, or null if a new quaternion is to be - * created + * @param src The source quaternion + * @param dest The destination quaternion, or null if a new quaternion is to be created * @return The normalised quaternion */ public static Quaternion normalise(Quaternion src, Quaternion dest) { @@ -171,9 +149,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Normalise this quaternion and place the result in another quaternion. * - * @param dest - * The destination quaternion, or null if a new quaternion is to be - * created + * @param dest The destination quaternion, or null if a new quaternion is to be created * @return the normalised quaternion */ public Quaternion normalise(Quaternion dest) { @@ -183,10 +159,8 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * The dot product of two quaternions * - * @param left - * The LHS quat - * @param right - * The RHS quat + * @param left The LHS quat + * @param right The RHS quat * @return left dot right */ public static float dot(Quaternion left, Quaternion right) { @@ -196,9 +170,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Calculate the conjugate of this quaternion and put it into the given one * - * @param dest - * The quaternion which should be set to the conjugate of this - * quaternion + * @param dest The quaternion which should be set to the conjugate of this quaternion */ public Quaternion negate(Quaternion dest) { return negate(this, dest); @@ -207,11 +179,8 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Calculate the conjugate of this quaternion and put it into the given one * - * @param src - * The source quaternion - * @param dest - * The quaternion which should be set to the conjugate of this - * quaternion + * @param src The source quaternion + * @param dest The quaternion which should be set to the conjugate of this quaternion */ public static Quaternion negate(Quaternion src, Quaternion dest) { if (dest == null) dest = new Quaternion(); @@ -231,7 +200,8 @@ public class Quaternion extends Vector implements ReadableVector4f { return negate(this, this); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.Vector#load(java.nio.FloatBuffer) */ public Vector load(FloatBuffer buf) { @@ -244,7 +214,6 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (non-Javadoc) - * * @see org.lwjgl.vector.Vector#scale(float) */ public Vector scale(float scale) { @@ -253,9 +222,10 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Scale the source quaternion by scale and put the result in the destination + * * @param scale The amount to scale by - * @param src The source quaternion - * @param dest The destination quaternion, or null if a new quaternion is to be created + * @param src The source quaternion + * @param dest The destination quaternion, or null if a new quaternion is to be created * @return The scaled quaternion */ public static Quaternion scale(float scale, Quaternion src, Quaternion dest) { @@ -267,7 +237,8 @@ public class Quaternion extends Vector implements ReadableVector4f { return dest; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.ReadableVector#store(java.nio.FloatBuffer) */ public Vector store(FloatBuffer buf) { @@ -322,7 +293,6 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (Overrides) - * * @see org.lwjgl.vector.ReadableVector3f#getZ() */ public float getZ() { @@ -340,7 +310,6 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (Overrides) - * * @see org.lwjgl.vector.ReadableVector3f#getW() */ public float getW() { @@ -352,14 +321,11 @@ public class Quaternion extends Vector implements ReadableVector4f { } /** - * Sets the value of this quaternion to the quaternion product of - * quaternions left and right (this = left * right). Note that this is safe - * for aliasing (e.g. this can be left or right). + * Sets the value of this quaternion to the quaternion product of quaternions left and right (this = left * right). + * Note that this is safe for aliasing (e.g. this can be left or right). * - * @param left - * the first quaternion - * @param right - * the second quaternion + * @param left the first quaternion + * @param right the second quaternion */ public static Quaternion mul(Quaternion left, Quaternion right, Quaternion dest) { if (dest == null) dest = new Quaternion(); @@ -373,14 +339,11 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * - * Multiplies quaternion left by the inverse of quaternion right and places - * the value into this quaternion. The value of both argument quaternions is - * preservered (this = left * right^-1). + * Multiplies quaternion left by the inverse of quaternion right and places the value into this quaternion. The + * value of both argument quaternions is preservered (this = left * right^-1). * - * @param left - * the left quaternion - * @param right - * the right quaternion + * @param left the left quaternion + * @param right the right quaternion */ public static Quaternion mulInverse(Quaternion left, Quaternion right, Quaternion dest) { float n = right.lengthSquared(); @@ -398,11 +361,9 @@ public class Quaternion extends Vector implements ReadableVector4f { } /** - * Sets the value of this quaternion to the equivalent rotation of the - * Axis-Angle argument. + * Sets the value of this quaternion to the equivalent rotation of the Axis-Angle argument. * - * @param a1 - * the axis-angle: (x,y,z) is the axis and w is the angle + * @param a1 the axis-angle: (x,y,z) is the axis and w is the angle */ public final void setFromAxisAngle(Vector4f a1) { x = a1.x; @@ -418,11 +379,9 @@ public class Quaternion extends Vector implements ReadableVector4f { } /** - * Sets the value of this quaternion using the rotational component of the - * passed matrix. + * Sets the value of this quaternion using the rotational component of the passed matrix. * - * @param m - * The matrix + * @param m The matrix * @return this */ public final Quaternion setFromMatrix(Matrix4f m) { @@ -430,13 +389,10 @@ public class Quaternion extends Vector implements ReadableVector4f { } /** - * Sets the value of the source quaternion using the rotational component of the - * passed matrix. + * Sets the value of the source quaternion using the rotational component of the passed matrix. * - * @param m - * The source matrix - * @param q - * The destination quaternion, or null if a new quaternion is to be created + * @param m The source matrix + * @param q The destination quaternion, or null if a new quaternion is to be created * @return q */ public static Quaternion setFromMatrix(Matrix4f m, Quaternion q) { @@ -444,24 +400,19 @@ public class Quaternion extends Vector implements ReadableVector4f { } /** - * Sets the value of this quaternion using the rotational component of the - * passed matrix. + * Sets the value of this quaternion using the rotational component of the passed matrix. * - * @param m - * The source matrix + * @param m The source matrix */ public final Quaternion setFromMatrix(Matrix3f m) { return setFromMatrix(m, this); } /** - * Sets the value of the source quaternion using the rotational component of the - * passed matrix. + * Sets the value of the source quaternion using the rotational component of the passed matrix. * - * @param m - * The source matrix - * @param q - * The destination quaternion, or null if a new quaternion is to be created + * @param m The source matrix + * @param q The destination quaternion, or null if a new quaternion is to be created * @return q */ public static Quaternion setFromMatrix(Matrix3f m, Quaternion q) { @@ -471,8 +422,8 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Private method to perform the matrix-to-quaternion conversion */ - private Quaternion setFromMat( - float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) { + private Quaternion setFromMat(float m00, float m01, float m02, float m10, float m11, float m12, float m20, + float m21, float m22) { float s; float tr = m00 + m11 + m22; diff --git a/src/generated/java/org/lwjgl/util/vector/ReadableVector.java b/src/generated/java/org/lwjgl/util/vector/ReadableVector.java index 423868c..7c07051 100644 --- a/src/generated/java/org/lwjgl/util/vector/ReadableVector.java +++ b/src/generated/java/org/lwjgl/util/vector/ReadableVector.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -37,16 +21,20 @@ import java.nio.FloatBuffer; * @author foo */ public interface ReadableVector { + /** * @return the length of the vector */ float length(); + /** * @return the length squared of the vector */ float lengthSquared(); + /** * Store this vector in a FloatBuffer + * * @param buf The buffer to store it in, at the current position * @return this */ diff --git a/src/generated/java/org/lwjgl/util/vector/ReadableVector2f.java b/src/generated/java/org/lwjgl/util/vector/ReadableVector2f.java index 1a522d8..744fa02 100644 --- a/src/generated/java/org/lwjgl/util/vector/ReadableVector2f.java +++ b/src/generated/java/org/lwjgl/util/vector/ReadableVector2f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -35,10 +19,12 @@ package org.lwjgl.util.vector; * @author foo */ public interface ReadableVector2f extends ReadableVector { + /** * @return x */ float getX(); + /** * @return y */ diff --git a/src/generated/java/org/lwjgl/util/vector/ReadableVector3f.java b/src/generated/java/org/lwjgl/util/vector/ReadableVector3f.java index 227403c..4a7599c 100644 --- a/src/generated/java/org/lwjgl/util/vector/ReadableVector3f.java +++ b/src/generated/java/org/lwjgl/util/vector/ReadableVector3f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -35,6 +19,7 @@ package org.lwjgl.util.vector; * @author foo */ public interface ReadableVector3f extends ReadableVector2f { + /** * @return z */ diff --git a/src/generated/java/org/lwjgl/util/vector/ReadableVector4f.java b/src/generated/java/org/lwjgl/util/vector/ReadableVector4f.java index 5b79cd1..9f30643 100644 --- a/src/generated/java/org/lwjgl/util/vector/ReadableVector4f.java +++ b/src/generated/java/org/lwjgl/util/vector/ReadableVector4f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; diff --git a/src/generated/java/org/lwjgl/util/vector/Vector.java b/src/generated/java/org/lwjgl/util/vector/Vector.java index 93051ce..e04ecd2 100644 --- a/src/generated/java/org/lwjgl/util/vector/Vector.java +++ b/src/generated/java/org/lwjgl/util/vector/Vector.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Base class for vectors. * * @author cix_foo - * @version $Revision: 3418 $ - * $Id: Vector.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Vector.java 3418 2010-09-28 21:11:35Z spasi $ */ public abstract class Vector implements Serializable, ReadableVector { @@ -65,6 +48,7 @@ public abstract class Vector implements Serializable, ReadableVector { /** * Load this vector from a FloatBuffer + * * @param buf The buffer to load it from, at the current position * @return this */ @@ -72,12 +56,14 @@ public abstract class Vector implements Serializable, ReadableVector { /** * Negate a vector + * * @return this */ public abstract Vector negate(); /** * Normalise this vector + * * @return this */ public final Vector normalise() { @@ -90,6 +76,7 @@ public abstract class Vector implements Serializable, ReadableVector { /** * Store this vector in a FloatBuffer + * * @param buf The buffer to store it in, at the current position * @return this */ @@ -97,6 +84,7 @@ public abstract class Vector implements Serializable, ReadableVector { /** * Scale this vector + * * @param scale The scale factor * @return this */ diff --git a/src/generated/java/org/lwjgl/util/vector/Vector2f.java b/src/generated/java/org/lwjgl/util/vector/Vector2f.java index 5e1ce0b..4b7b241 100644 --- a/src/generated/java/org/lwjgl/util/vector/Vector2f.java +++ b/src/generated/java/org/lwjgl/util/vector/Vector2f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Holds a 2-tuple vector. * * @author cix_foo - * @version $Revision: 3418 $ - * $Id: Vector2f.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Vector2f.java 3418 2010-09-28 21:11:35Z spasi $ */ public class Vector2f extends Vector implements Serializable, ReadableVector2f, WritableVector2f { @@ -69,7 +52,8 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, set(x, y); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) */ public void set(float x, float y) { @@ -79,6 +63,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Load from another Vector2f + * * @param src The source vector * @return this */ @@ -97,6 +82,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Translate a vector + * * @param x The translation in x * @param y the translation in y * @return this @@ -109,6 +95,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Negate a vector + * * @return this */ public Vector negate() { @@ -119,6 +106,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Negate a vector and place the result in a destination vector. + * * @param dest The destination vector or null if a new vector is to be created * @return the negated vector */ @@ -131,6 +119,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Normalise this vector and place the result in another vector. + * * @param dest The destination vector, or null if a new vector is to be created * @return the normalised vector */ @@ -144,9 +133,9 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, } /** - * The dot product of two vectors is calculated as - * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z - * @param left The LHS vector + * The dot product of two vectors is calculated as v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + * + * @param left The LHS vector * @param right The RHS vector * @return left dot right */ @@ -156,6 +145,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Calculate the angle between two vectors, in radians + * * @param a A vector * @param b The other vector * @return the angle between the two vectors, in radians @@ -168,11 +158,11 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, } /** - * Add a vector to another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Add a vector to another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return the sum of left and right in dest */ public static Vector2f add(Vector2f left, Vector2f right, Vector2f dest) { @@ -184,11 +174,11 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, } /** - * Subtract a vector from another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Subtract a vector from another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return left minus right in dest */ public static Vector2f sub(Vector2f left, Vector2f right, Vector2f dest) { @@ -201,6 +191,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Store this vector in a FloatBuffer + * * @param buf The buffer to store it in, at the current position * @return this */ @@ -212,6 +203,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Load this vector from a FloatBuffer + * * @param buf The buffer to load it from, at the current position * @return this */ @@ -221,7 +213,8 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#scale(float) */ public Vector scale(float scale) { @@ -232,7 +225,8 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see java.lang.Object#toString() */ public String toString() { @@ -262,6 +256,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Set X + * * @param x */ public final void setX(float x) { @@ -270,6 +265,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Set Y + * * @param y */ public final void setY(float y) { diff --git a/src/generated/java/org/lwjgl/util/vector/Vector3f.java b/src/generated/java/org/lwjgl/util/vector/Vector3f.java index 333c930..63e96cb 100644 --- a/src/generated/java/org/lwjgl/util/vector/Vector3f.java +++ b/src/generated/java/org/lwjgl/util/vector/Vector3f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Holds a 3-tuple vector. * * @author cix_foo - * @version $Revision: 3418 $ - * $Id: Vector3f.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Vector3f.java 3418 2010-09-28 21:11:35Z spasi $ */ public class Vector3f extends Vector implements Serializable, ReadableVector3f, WritableVector3f { @@ -69,7 +52,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, set(x, y, z); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) */ public void set(float x, float y) { @@ -77,7 +61,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, this.y = y; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) */ public void set(float x, float y, float z) { @@ -88,6 +73,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Load from another Vector3f + * * @param src The source vector * @return this */ @@ -107,6 +93,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Translate a vector + * * @param x The translation in x * @param y the translation in y * @return this @@ -119,11 +106,11 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, } /** - * Add a vector to another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Add a vector to another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return the sum of left and right in dest */ public static Vector3f add(Vector3f left, Vector3f right, Vector3f dest) { @@ -135,11 +122,11 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, } /** - * Subtract a vector from another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Subtract a vector from another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return left minus right in dest */ public static Vector3f sub(Vector3f left, Vector3f right, Vector3f dest) { @@ -153,9 +140,9 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * The cross product of two vectors. * - * @param left The LHS vector + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination result, or null if a new vector is to be created + * @param dest The destination result, or null if a new vector is to be created * @return left cross right */ public static Vector3f cross(Vector3f left, Vector3f right, Vector3f dest) { @@ -172,6 +159,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Negate a vector + * * @return this */ public Vector negate() { @@ -183,6 +171,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Negate a vector and place the result in a destination vector. + * * @param dest The destination vector or null if a new vector is to be created * @return the negated vector */ @@ -196,6 +185,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Normalise this vector and place the result in another vector. + * * @param dest The destination vector, or null if a new vector is to be created * @return the normalised vector */ @@ -209,9 +199,9 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, } /** - * The dot product of two vectors is calculated as - * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z - * @param left The LHS vector + * The dot product of two vectors is calculated as v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + * + * @param left The LHS vector * @param right The RHS vector * @return left dot right */ @@ -221,6 +211,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Calculate the angle between two vectors, in radians + * * @param a A vector * @param b The other vector * @return the angle between the two vectors, in radians @@ -232,7 +223,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, return (float) Math.acos(dls); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#load(FloatBuffer) */ public Vector load(FloatBuffer buf) { @@ -242,7 +234,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#scale(float) */ public Vector scale(float scale) { @@ -254,7 +247,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#store(FloatBuffer) */ public Vector store(FloatBuffer buf) { @@ -266,7 +260,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see java.lang.Object#toString() */ public String toString() { @@ -298,6 +293,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Set X + * * @param x */ public final void setX(float x) { @@ -306,6 +302,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Set Y + * * @param y */ public final void setY(float y) { @@ -314,13 +311,15 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Set Z + * * @param z */ public void setZ(float z) { this.z = z; } - /* (Overrides) + /* + * (Overrides) * @see org.lwjgl.vector.ReadableVector3f#getZ() */ public float getZ() { diff --git a/src/generated/java/org/lwjgl/util/vector/Vector4f.java b/src/generated/java/org/lwjgl/util/vector/Vector4f.java index 9519ce9..6778f67 100644 --- a/src/generated/java/org/lwjgl/util/vector/Vector4f.java +++ b/src/generated/java/org/lwjgl/util/vector/Vector4f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Holds a 4-tuple vector. * * @author cix_foo - * @version $Revision: 2983 $ - * $Id: Vector4f.java 2983 2008-04-07 18:36:09Z matzon $ + * @version $Revision: 2983 $ $Id: Vector4f.java 2983 2008-04-07 18:36:09Z matzon $ */ public class Vector4f extends Vector implements Serializable, ReadableVector4f, WritableVector4f { @@ -69,7 +52,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, set(x, y, z, w); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) */ public void set(float x, float y) { @@ -77,7 +61,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, this.y = y; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) */ public void set(float x, float y, float z) { @@ -86,7 +71,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, this.z = z; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector4f#set(float, float, float, float) */ public void set(float x, float y, float z, float w) { @@ -98,6 +84,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Load from another Vector4f + * * @param src The source vector * @return this */ @@ -118,6 +105,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Translate a vector + * * @param x The translation in x * @param y the translation in y * @return this @@ -131,11 +119,11 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, } /** - * Add a vector to another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Add a vector to another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return the sum of left and right in dest */ public static Vector4f add(Vector4f left, Vector4f right, Vector4f dest) { @@ -147,11 +135,11 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, } /** - * Subtract a vector from another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Subtract a vector from another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return left minus right in dest */ public static Vector4f sub(Vector4f left, Vector4f right, Vector4f dest) { @@ -164,6 +152,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Negate a vector + * * @return this */ public Vector negate() { @@ -176,6 +165,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Negate a vector and place the result in a destination vector. + * * @param dest The destination vector or null if a new vector is to be created * @return the negated vector */ @@ -190,6 +180,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Normalise this vector and place the result in another vector. + * * @param dest The destination vector, or null if a new vector is to be created * @return the normalised vector */ @@ -203,9 +194,9 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, } /** - * The dot product of two vectors is calculated as - * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + v1.w * v2.w - * @param left The LHS vector + * The dot product of two vectors is calculated as v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + v1.w * v2.w + * + * @param left The LHS vector * @param right The RHS vector * @return left dot right */ @@ -215,6 +206,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Calculate the angle between two vectors, in radians + * * @param a A vector * @param b The other vector * @return the angle between the two vectors, in radians @@ -226,7 +218,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, return (float) Math.acos(dls); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#load(FloatBuffer) */ public Vector load(FloatBuffer buf) { @@ -237,7 +230,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#scale(float) */ public Vector scale(float scale) { @@ -248,7 +242,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#store(FloatBuffer) */ public Vector store(FloatBuffer buf) { @@ -281,6 +276,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Set X + * * @param x */ public final void setX(float x) { @@ -289,6 +285,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Set Y + * * @param y */ public final void setY(float y) { @@ -297,13 +294,15 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Set Z + * * @param z */ public void setZ(float z) { this.z = z; } - /* (Overrides) + /* + * (Overrides) * @see org.lwjgl.vector.ReadableVector3f#getZ() */ public float getZ() { @@ -312,13 +311,15 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Set W + * * @param w */ public void setW(float w) { this.w = w; } - /* (Overrides) + /* + * (Overrides) * @see org.lwjgl.vector.ReadableVector3f#getZ() */ public float getW() { diff --git a/src/generated/java/org/lwjgl/util/vector/WritableVector2f.java b/src/generated/java/org/lwjgl/util/vector/WritableVector2f.java index da75abf..9193bfd 100644 --- a/src/generated/java/org/lwjgl/util/vector/WritableVector2f.java +++ b/src/generated/java/org/lwjgl/util/vector/WritableVector2f.java @@ -1,58 +1,45 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; /** * Writable interface to Vector2fs + * * @author $author$ - * @version $revision$ - * $Id: WritableVector2f.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $revision$ $Id: WritableVector2f.java 3418 2010-09-28 21:11:35Z spasi $ */ public interface WritableVector2f { /** * Set the X value + * * @param x */ void setX(float x); /** * Set the Y value + * * @param y */ void setY(float y); /** * Set the X,Y values + * * @param x * @param y */ diff --git a/src/generated/java/org/lwjgl/util/vector/WritableVector3f.java b/src/generated/java/org/lwjgl/util/vector/WritableVector3f.java index 2cc7b1d..bb94f7e 100644 --- a/src/generated/java/org/lwjgl/util/vector/WritableVector3f.java +++ b/src/generated/java/org/lwjgl/util/vector/WritableVector3f.java @@ -1,52 +1,38 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; /** * Writable interface to Vector3fs + * * @author $author$ - * @version $revision$ - * $Id: WritableVector3f.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $revision$ $Id: WritableVector3f.java 3418 2010-09-28 21:11:35Z spasi $ */ public interface WritableVector3f extends WritableVector2f { /** * Set the Z value + * * @param z */ void setZ(float z); /** * Set the X,Y,Z values + * * @param x * @param y * @param z diff --git a/src/generated/java/org/lwjgl/util/vector/WritableVector4f.java b/src/generated/java/org/lwjgl/util/vector/WritableVector4f.java index 093e0f7..d7289f1 100644 --- a/src/generated/java/org/lwjgl/util/vector/WritableVector4f.java +++ b/src/generated/java/org/lwjgl/util/vector/WritableVector4f.java @@ -1,52 +1,38 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.util.vector; /** * Writable interface to Vector4fs + * * @author $author$ - * @version $revision$ - * $Id: WritableVector4f.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $revision$ $Id: WritableVector4f.java 3418 2010-09-28 21:11:35Z spasi $ */ public interface WritableVector4f extends WritableVector3f { /** * Set the W value + * * @param w */ void setW(float w); /** * Set the X,Y,Z,W values + * * @param x * @param y * @param z diff --git a/src/generated/java/org/lwjglx/openal/AL11.java b/src/generated/java/org/lwjglx/openal/AL11.java index 2aa9251..a97bb45 100644 --- a/src/generated/java/org/lwjglx/openal/AL11.java +++ b/src/generated/java/org/lwjglx/openal/AL11.java @@ -1,6 +1,7 @@ package org.lwjglx.openal; public class AL11 { + public static final int AL_BYTE_OFFSET = (int) 4134; public static final int AL_EXPONENT_DISTANCE = (int) 53253; public static final int AL_EXPONENT_DISTANCE_CLAMPED = (int) 53254; diff --git a/src/generated/java/org/lwjglx/openal/ALC11.java b/src/generated/java/org/lwjglx/openal/ALC11.java index 768e432..0e52aba 100644 --- a/src/generated/java/org/lwjglx/openal/ALC11.java +++ b/src/generated/java/org/lwjglx/openal/ALC11.java @@ -1,6 +1,7 @@ package org.lwjglx.openal; public class ALC11 { + public static final int ALC_ALL_DEVICES_SPECIFIER = (int) 4115; public static final int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = (int) 785; public static final int ALC_CAPTURE_DEVICE_SPECIFIER = (int) 784; @@ -16,8 +17,8 @@ public class ALC11 { return returnValue; } - public static org.lwjglx.openal.ALCdevice alcCaptureOpenDevice( - java.lang.String arg0, int arg1, int frequency, int format) { + public static org.lwjglx.openal.ALCdevice alcCaptureOpenDevice(java.lang.String arg0, int arg1, int frequency, + int format) { org.lwjglx.openal.ALCdevice returnValue = new org.lwjglx.openal.ALCdevice( org.lwjgl.openal.ALC11.alcCaptureOpenDevice(arg0, arg1, frequency, format)); diff --git a/src/generated/java/org/lwjglx/opengl/AMDBlendMinmaxFactor.java b/src/generated/java/org/lwjglx/opengl/AMDBlendMinmaxFactor.java index 54894ad..d7c160d 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDBlendMinmaxFactor.java +++ b/src/generated/java/org/lwjglx/opengl/AMDBlendMinmaxFactor.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class AMDBlendMinmaxFactor { + public static final int GL_FACTOR_MAX_AMD = (int) 36893; public static final int GL_FACTOR_MIN_AMD = (int) 36892; } diff --git a/src/generated/java/org/lwjglx/opengl/AMDDebugOutput.java b/src/generated/java/org/lwjglx/opengl/AMDDebugOutput.java index 93c9d3e..ebbdad4 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDDebugOutput.java +++ b/src/generated/java/org/lwjglx/opengl/AMDDebugOutput.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class AMDDebugOutput { + public static final int GL_DEBUG_CATEGORY_API_ERROR_AMD = (int) 37193; public static final int GL_DEBUG_CATEGORY_APPLICATION_AMD = (int) 37199; public static final int GL_DEBUG_CATEGORY_DEPRECATION_AMD = (int) 37195; @@ -28,14 +29,9 @@ public class AMDDebugOutput { org.lwjgl.opengl.AMDDebugOutput.glDebugMessageInsertAMD(category, severity, id, buf); } - public static int glGetDebugMessageLogAMD( - int count, - java.nio.IntBuffer categories, - java.nio.IntBuffer severities, - java.nio.IntBuffer ids, - java.nio.IntBuffer lengths, - java.nio.ByteBuffer messageLog) { - return org.lwjgl.opengl.AMDDebugOutput.glGetDebugMessageLogAMD( - count, categories, severities, ids, lengths, messageLog); + public static int glGetDebugMessageLogAMD(int count, java.nio.IntBuffer categories, java.nio.IntBuffer severities, + java.nio.IntBuffer ids, java.nio.IntBuffer lengths, java.nio.ByteBuffer messageLog) { + return org.lwjgl.opengl.AMDDebugOutput + .glGetDebugMessageLogAMD(count, categories, severities, ids, lengths, messageLog); } } diff --git a/src/generated/java/org/lwjglx/opengl/AMDDepthClampSeparate.java b/src/generated/java/org/lwjglx/opengl/AMDDepthClampSeparate.java index 786733f..b3e17e8 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDDepthClampSeparate.java +++ b/src/generated/java/org/lwjglx/opengl/AMDDepthClampSeparate.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class AMDDepthClampSeparate { + public static final int GL_DEPTH_CLAMP_FAR_AMD = (int) 36895; public static final int GL_DEPTH_CLAMP_NEAR_AMD = (int) 36894; } diff --git a/src/generated/java/org/lwjglx/opengl/AMDDrawBuffersBlend.java b/src/generated/java/org/lwjglx/opengl/AMDDrawBuffersBlend.java index af20838..5b2826c 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDDrawBuffersBlend.java +++ b/src/generated/java/org/lwjglx/opengl/AMDDrawBuffersBlend.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class AMDDrawBuffersBlend { + public static void glBlendEquationIndexedAMD(int buf, int mode) { org.lwjgl.opengl.AMDDrawBuffersBlend.glBlendEquationIndexedAMD(buf, mode); } diff --git a/src/generated/java/org/lwjglx/opengl/AMDInterleavedElements.java b/src/generated/java/org/lwjglx/opengl/AMDInterleavedElements.java index 857773b..57a73be 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDInterleavedElements.java +++ b/src/generated/java/org/lwjglx/opengl/AMDInterleavedElements.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class AMDInterleavedElements { + public static final int GL_VERTEX_ELEMENT_SWIZZLE_AMD = (int) 37284; public static final int GL_VERTEX_ID_SWIZZLE_AMD = (int) 37285; diff --git a/src/generated/java/org/lwjglx/opengl/AMDPerformanceMonitor.java b/src/generated/java/org/lwjglx/opengl/AMDPerformanceMonitor.java index 7cdacf0..3af1114 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDPerformanceMonitor.java +++ b/src/generated/java/org/lwjglx/opengl/AMDPerformanceMonitor.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class AMDPerformanceMonitor { + public static final int GL_COUNTER_RANGE_AMD = (int) 35777; public static final int GL_COUNTER_TYPE_AMD = (int) 35776; public static final int GL_PERCENTAGE_AMD = (int) 35779; @@ -33,8 +34,8 @@ public class AMDPerformanceMonitor { org.lwjgl.opengl.AMDPerformanceMonitor.glGenPerfMonitorsAMD(monitors); } - public static void glGetPerfMonitorCounterDataAMD( - int monitor, int pname, java.nio.IntBuffer data, java.nio.IntBuffer bytesWritten) { + public static void glGetPerfMonitorCounterDataAMD(int monitor, int pname, java.nio.IntBuffer data, + java.nio.IntBuffer bytesWritten) { org.lwjgl.opengl.AMDPerformanceMonitor.glGetPerfMonitorCounterDataAMD(monitor, pname, data, bytesWritten); } @@ -42,22 +43,19 @@ public class AMDPerformanceMonitor { org.lwjgl.opengl.AMDPerformanceMonitor.glGetPerfMonitorCounterInfoAMD(group, counter, pname, data); } - public static void glGetPerfMonitorCounterStringAMD( - int group, int counter, java.nio.IntBuffer length, java.nio.ByteBuffer counterString) { + public static void glGetPerfMonitorCounterStringAMD(int group, int counter, java.nio.IntBuffer length, + java.nio.ByteBuffer counterString) { org.lwjgl.opengl.AMDPerformanceMonitor.glGetPerfMonitorCounterStringAMD(group, counter, length, counterString); } - public static void glGetPerfMonitorCountersAMD( - int group, - java.nio.IntBuffer numCounters, - java.nio.IntBuffer maxActiveCounters, - java.nio.IntBuffer counters) { - org.lwjgl.opengl.AMDPerformanceMonitor.glGetPerfMonitorCountersAMD( - group, numCounters, maxActiveCounters, counters); + public static void glGetPerfMonitorCountersAMD(int group, java.nio.IntBuffer numCounters, + java.nio.IntBuffer maxActiveCounters, java.nio.IntBuffer counters) { + org.lwjgl.opengl.AMDPerformanceMonitor + .glGetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counters); } - public static void glGetPerfMonitorGroupStringAMD( - int group, java.nio.IntBuffer length, java.nio.ByteBuffer groupString) { + public static void glGetPerfMonitorGroupStringAMD(int group, java.nio.IntBuffer length, + java.nio.ByteBuffer groupString) { org.lwjgl.opengl.AMDPerformanceMonitor.glGetPerfMonitorGroupStringAMD(group, length, groupString); } @@ -67,12 +65,12 @@ public class AMDPerformanceMonitor { public static void glSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, int counter) { - org.lwjgl.opengl.AMDPerformanceMonitor.glSelectPerfMonitorCountersAMD( - monitor, enable, group, new int[] {counter}); + org.lwjgl.opengl.AMDPerformanceMonitor + .glSelectPerfMonitorCountersAMD(monitor, enable, group, new int[] { counter }); } - public static void glSelectPerfMonitorCountersAMD( - int monitor, boolean enable, int group, java.nio.IntBuffer counterList) { + public static void glSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, + java.nio.IntBuffer counterList) { org.lwjgl.opengl.AMDPerformanceMonitor.glSelectPerfMonitorCountersAMD(monitor, enable, group, counterList); } } diff --git a/src/generated/java/org/lwjglx/opengl/AMDPinnedMemory.java b/src/generated/java/org/lwjglx/opengl/AMDPinnedMemory.java index 8311bce..58fb090 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDPinnedMemory.java +++ b/src/generated/java/org/lwjglx/opengl/AMDPinnedMemory.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class AMDPinnedMemory { + public static final int GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD = (int) 37216; } diff --git a/src/generated/java/org/lwjglx/opengl/AMDQueryBufferObject.java b/src/generated/java/org/lwjglx/opengl/AMDQueryBufferObject.java index dac4d93..c544d40 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDQueryBufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/AMDQueryBufferObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class AMDQueryBufferObject { + public static final int GL_QUERY_BUFFER_AMD = (int) 37266; public static final int GL_QUERY_BUFFER_BINDING_AMD = (int) 37267; public static final int GL_QUERY_RESULT_NO_WAIT_AMD = (int) 37268; diff --git a/src/generated/java/org/lwjglx/opengl/AMDSamplePositions.java b/src/generated/java/org/lwjglx/opengl/AMDSamplePositions.java index fd4dd67..6445287 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDSamplePositions.java +++ b/src/generated/java/org/lwjglx/opengl/AMDSamplePositions.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class AMDSamplePositions { + public static final int GL_SUBSAMPLE_DISTANCE_AMD = (int) 34879; public static void glSetMultisampleAMD(int pname, int index, java.nio.FloatBuffer val) { diff --git a/src/generated/java/org/lwjglx/opengl/AMDSeamlessCubemapPerTexture.java b/src/generated/java/org/lwjglx/opengl/AMDSeamlessCubemapPerTexture.java index c361bce..6f01ebd 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDSeamlessCubemapPerTexture.java +++ b/src/generated/java/org/lwjglx/opengl/AMDSeamlessCubemapPerTexture.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class AMDSeamlessCubemapPerTexture { + public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = (int) 34895; } diff --git a/src/generated/java/org/lwjglx/opengl/AMDSparseTexture.java b/src/generated/java/org/lwjglx/opengl/AMDSparseTexture.java index d8519f1..be32710 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDSparseTexture.java +++ b/src/generated/java/org/lwjglx/opengl/AMDSparseTexture.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class AMDSparseTexture { + public static final int GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD = (int) 37273; public static final int GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS = (int) 37274; public static final int GL_MAX_SPARSE_TEXTURE_SIZE_AMD = (int) 37272; @@ -11,15 +12,15 @@ public class AMDSparseTexture { public static final int GL_VIRTUAL_PAGE_SIZE_Y_AMD = (int) 37270; public static final int GL_VIRTUAL_PAGE_SIZE_Z_AMD = (int) 37271; - public static void glTexStorageSparseAMD( - int target, int internalFormat, int width, int height, int depth, int layers, int flags) { - org.lwjgl.opengl.AMDSparseTexture.glTexStorageSparseAMD( - target, internalFormat, width, height, depth, layers, flags); + public static void glTexStorageSparseAMD(int target, int internalFormat, int width, int height, int depth, + int layers, int flags) { + org.lwjgl.opengl.AMDSparseTexture + .glTexStorageSparseAMD(target, internalFormat, width, height, depth, layers, flags); } - public static void glTextureStorageSparseAMD( - int texture, int target, int internalFormat, int width, int height, int depth, int layers, int flags) { - org.lwjgl.opengl.AMDSparseTexture.glTextureStorageSparseAMD( - texture, target, internalFormat, width, height, depth, layers, flags); + public static void glTextureStorageSparseAMD(int texture, int target, int internalFormat, int width, int height, + int depth, int layers, int flags) { + org.lwjgl.opengl.AMDSparseTexture + .glTextureStorageSparseAMD(texture, target, internalFormat, width, height, depth, layers, flags); } } diff --git a/src/generated/java/org/lwjglx/opengl/AMDStencilOperationExtended.java b/src/generated/java/org/lwjglx/opengl/AMDStencilOperationExtended.java index 4f39251..72e1893 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDStencilOperationExtended.java +++ b/src/generated/java/org/lwjglx/opengl/AMDStencilOperationExtended.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class AMDStencilOperationExtended { + public static final int GL_REPLACE_VALUE_AMD = (int) 34635; public static final int GL_SET_AMD = (int) 34634; public static final int GL_STENCIL_BACK_OP_VALUE_AMD = (int) 34637; diff --git a/src/generated/java/org/lwjglx/opengl/AMDVertexShaderTessellator.java b/src/generated/java/org/lwjglx/opengl/AMDVertexShaderTessellator.java index d128f33..b86839a 100644 --- a/src/generated/java/org/lwjglx/opengl/AMDVertexShaderTessellator.java +++ b/src/generated/java/org/lwjglx/opengl/AMDVertexShaderTessellator.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class AMDVertexShaderTessellator { + public static final int GL_CONTINUOUS_AMD = (int) 36871; public static final int GL_DISCRETE_AMD = (int) 36870; public static final int GL_INT_SAMPLER_BUFFER_AMD = (int) 36866; diff --git a/src/generated/java/org/lwjglx/opengl/ARBBaseInstance.java b/src/generated/java/org/lwjglx/opengl/ARBBaseInstance.java index 8460728..badc2ab 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBBaseInstance.java +++ b/src/generated/java/org/lwjglx/opengl/ARBBaseInstance.java @@ -1,59 +1,65 @@ package org.lwjglx.opengl; public class ARBBaseInstance { - public static void glDrawArraysInstancedBaseInstance( - int mode, int first, int count, int primcount, int baseinstance) { + + public static void glDrawArraysInstancedBaseInstance(int mode, int first, int count, int primcount, + int baseinstance) { org.lwjgl.opengl.ARBBaseInstance.glDrawArraysInstancedBaseInstance(mode, first, count, primcount, baseinstance); } - public static void glDrawElementsInstancedBaseInstance( - int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int baseinstance) { + public static void glDrawElementsInstancedBaseInstance(int mode, int indices_count, int type, + long indices_buffer_offset, int primcount, int baseinstance) { org.lwjgl.opengl.ARBBaseInstance.glDrawElementsInstancedBaseInstance( - mode, indices_count, type, indices_buffer_offset, primcount, baseinstance); + mode, + indices_count, + type, + indices_buffer_offset, + primcount, + baseinstance); } - public static void glDrawElementsInstancedBaseInstance( - int mode, java.nio.ByteBuffer indices, int primcount, int baseinstance) { - org.lwjgl.opengl.ARBBaseInstance.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance( - int mode, java.nio.IntBuffer indices, int primcount, int baseinstance) { - org.lwjgl.opengl.ARBBaseInstance.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance( - int mode, java.nio.ShortBuffer indices, int primcount, int baseinstance) { - org.lwjgl.opengl.ARBBaseInstance.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseVertexBaseInstance( - int mode, - int indices_count, - int type, - long indices_buffer_offset, - int primcount, - int basevertex, + public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.ByteBuffer indices, int primcount, int baseinstance) { - org.lwjgl.opengl.ARBBaseInstance.glDrawElementsInstancedBaseVertexBaseInstance( - mode, indices_count, type, indices_buffer_offset, primcount, basevertex, baseinstance); + org.lwjgl.opengl.ARBBaseInstance.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); } - public static void glDrawElementsInstancedBaseVertexBaseInstance( - int mode, java.nio.ByteBuffer indices, int primcount, int basevertex, int baseinstance) { - org.lwjgl.opengl.ARBBaseInstance.glDrawElementsInstancedBaseVertexBaseInstance( - mode, indices, primcount, basevertex, baseinstance); + public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.IntBuffer indices, int primcount, + int baseinstance) { + org.lwjgl.opengl.ARBBaseInstance.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); } - public static void glDrawElementsInstancedBaseVertexBaseInstance( - int mode, java.nio.IntBuffer indices, int primcount, int basevertex, int baseinstance) { - org.lwjgl.opengl.ARBBaseInstance.glDrawElementsInstancedBaseVertexBaseInstance( - mode, indices, primcount, basevertex, baseinstance); + public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.ShortBuffer indices, int primcount, + int baseinstance) { + org.lwjgl.opengl.ARBBaseInstance.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); } - public static void glDrawElementsInstancedBaseVertexBaseInstance( - int mode, java.nio.ShortBuffer indices, int primcount, int basevertex, int baseinstance) { + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, int indices_count, int type, + long indices_buffer_offset, int primcount, int basevertex, int baseinstance) { org.lwjgl.opengl.ARBBaseInstance.glDrawElementsInstancedBaseVertexBaseInstance( - mode, indices, primcount, basevertex, baseinstance); + mode, + indices_count, + type, + indices_buffer_offset, + primcount, + basevertex, + baseinstance); + } + + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.ByteBuffer indices, + int primcount, int basevertex, int baseinstance) { + org.lwjgl.opengl.ARBBaseInstance + .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); + } + + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.IntBuffer indices, + int primcount, int basevertex, int baseinstance) { + org.lwjgl.opengl.ARBBaseInstance + .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); + } + + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.ShortBuffer indices, + int primcount, int basevertex, int baseinstance) { + org.lwjgl.opengl.ARBBaseInstance + .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBBindlessTexture.java b/src/generated/java/org/lwjglx/opengl/ARBBindlessTexture.java index 94b577c..5e02714 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBBindlessTexture.java +++ b/src/generated/java/org/lwjglx/opengl/ARBBindlessTexture.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBBindlessTexture { + public static final int GL_UNSIGNED_INT64_ARB = (int) 5135; public static long glGetImageHandleARB(int texture, int level, boolean layered, int layer, int format) { diff --git a/src/generated/java/org/lwjglx/opengl/ARBBlendFuncExtended.java b/src/generated/java/org/lwjglx/opengl/ARBBlendFuncExtended.java index fa496f4..a8447db 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBBlendFuncExtended.java +++ b/src/generated/java/org/lwjglx/opengl/ARBBlendFuncExtended.java @@ -1,19 +1,20 @@ package org.lwjglx.opengl; public class ARBBlendFuncExtended { + public static final int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = (int) 35068; public static final int GL_ONE_MINUS_SRC1_ALPHA = (int) 35067; public static final int GL_ONE_MINUS_SRC1_COLOR = (int) 35066; public static final int GL_SRC1_ALPHA = (int) 34185; public static final int GL_SRC1_COLOR = (int) 35065; - public static void glBindFragDataLocationIndexed( - int program, int colorNumber, int index, java.lang.CharSequence name) { + public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, + java.lang.CharSequence name) { org.lwjgl.opengl.ARBBlendFuncExtended.glBindFragDataLocationIndexed(program, colorNumber, index, name); } - public static void glBindFragDataLocationIndexed( - int program, int colorNumber, int index, java.nio.ByteBuffer name) { + public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, + java.nio.ByteBuffer name) { org.lwjgl.opengl.ARBBlendFuncExtended.glBindFragDataLocationIndexed(program, colorNumber, index, name); } diff --git a/src/generated/java/org/lwjglx/opengl/ARBBufferStorage.java b/src/generated/java/org/lwjglx/opengl/ARBBufferStorage.java index 6235f07..a66e8d2 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBBufferStorage.java +++ b/src/generated/java/org/lwjglx/opengl/ARBBufferStorage.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBBufferStorage { + public static final int GL_BUFFER_IMMUTABLE_STORAGE = (int) 33311; public static final int GL_BUFFER_STORAGE_FLAGS = (int) 33312; public static final int GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = (int) 16384; diff --git a/src/generated/java/org/lwjglx/opengl/ARBClearBufferObject.java b/src/generated/java/org/lwjglx/opengl/ARBClearBufferObject.java index f9fe548..ca6568b 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBClearBufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/ARBClearBufferObject.java @@ -1,25 +1,26 @@ package org.lwjglx.opengl; public class ARBClearBufferObject { - public static void glClearBufferData( - int target, int internalformat, int format, int type, java.nio.ByteBuffer data) { + + public static void glClearBufferData(int target, int internalformat, int format, int type, + java.nio.ByteBuffer data) { org.lwjgl.opengl.ARBClearBufferObject.glClearBufferData(target, internalformat, format, type, data); } - public static void glClearBufferSubData( - int target, int internalformat, long offset, long size, int format, int type, java.nio.ByteBuffer data) { - org.lwjgl.opengl.ARBClearBufferObject.glClearBufferSubData( - target, internalformat, offset, size, format, type, data); + public static void glClearBufferSubData(int target, int internalformat, long offset, long size, int format, + int type, java.nio.ByteBuffer data) { + org.lwjgl.opengl.ARBClearBufferObject + .glClearBufferSubData(target, internalformat, offset, size, format, type, data); } - public static void glClearNamedBufferDataEXT( - int buffer, int internalformat, int format, int type, java.nio.ByteBuffer data) { + public static void glClearNamedBufferDataEXT(int buffer, int internalformat, int format, int type, + java.nio.ByteBuffer data) { org.lwjgl.opengl.ARBClearBufferObject.glClearNamedBufferDataEXT(buffer, internalformat, format, type, data); } - public static void glClearNamedBufferSubDataEXT( - int buffer, int internalformat, long offset, long size, int format, int type, java.nio.ByteBuffer data) { - org.lwjgl.opengl.ARBClearBufferObject.glClearNamedBufferSubDataEXT( - buffer, internalformat, offset, size, format, type, data); + public static void glClearNamedBufferSubDataEXT(int buffer, int internalformat, long offset, long size, int format, + int type, java.nio.ByteBuffer data) { + org.lwjgl.opengl.ARBClearBufferObject + .glClearNamedBufferSubDataEXT(buffer, internalformat, offset, size, format, type, data); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBClearTexture.java b/src/generated/java/org/lwjglx/opengl/ARBClearTexture.java index 604cb58..6a22095 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBClearTexture.java +++ b/src/generated/java/org/lwjglx/opengl/ARBClearTexture.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBClearTexture { + public static final int GL_CLEAR_TEXTURE = (int) 37733; public static void glClearTexImage(int texture, int level, int format, int type, java.nio.ByteBuffer data) { @@ -23,83 +24,83 @@ public class ARBClearTexture { org.lwjgl.opengl.ARBClearTexture.glClearTexImage(texture, level, format, type, data); } - public static void glClearTexSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ByteBuffer data) { + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ByteBuffer data) { org.lwjgl.opengl.ARBClearTexture.glClearTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + data); } - public static void glClearTexSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.DoubleBuffer data) { + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.DoubleBuffer data) { org.lwjgl.opengl.ARBClearTexture.glClearTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + data); } - public static void glClearTexSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.FloatBuffer data) { + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.FloatBuffer data) { org.lwjgl.opengl.ARBClearTexture.glClearTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + data); } - public static void glClearTexSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.IntBuffer data) { + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.IntBuffer data) { org.lwjgl.opengl.ARBClearTexture.glClearTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + data); } - public static void glClearTexSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ShortBuffer data) { + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ShortBuffer data) { org.lwjgl.opengl.ARBClearTexture.glClearTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + data); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBClipControl.java b/src/generated/java/org/lwjglx/opengl/ARBClipControl.java index 5a94579..85ca716 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBClipControl.java +++ b/src/generated/java/org/lwjglx/opengl/ARBClipControl.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBClipControl { + public static final int GL_CLIP_DEPTH_MODE = (int) 37725; public static final int GL_CLIP_ORIGIN = (int) 37724; public static final int GL_LOWER_LEFT = (int) 36001; diff --git a/src/generated/java/org/lwjglx/opengl/ARBColorBufferFloat.java b/src/generated/java/org/lwjglx/opengl/ARBColorBufferFloat.java index e799b91..cd06998 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBColorBufferFloat.java +++ b/src/generated/java/org/lwjglx/opengl/ARBColorBufferFloat.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBColorBufferFloat { + public static final int GLX_RGBA_FLOAT_BIT = (int) 4; public static final int GLX_RGBA_FLOAT_TYPE = (int) 8377; public static final int GL_CLAMP_FRAGMENT_COLOR_ARB = (int) 35099; diff --git a/src/generated/java/org/lwjglx/opengl/ARBCompressedTexturePixelStorage.java b/src/generated/java/org/lwjglx/opengl/ARBCompressedTexturePixelStorage.java index f3c31e4..d9d87e4 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBCompressedTexturePixelStorage.java +++ b/src/generated/java/org/lwjglx/opengl/ARBCompressedTexturePixelStorage.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBCompressedTexturePixelStorage { + public static final int GL_PACK_COMPRESSED_BLOCK_DEPTH = (int) 37165; public static final int GL_PACK_COMPRESSED_BLOCK_HEIGHT = (int) 37164; public static final int GL_PACK_COMPRESSED_BLOCK_SIZE = (int) 37166; diff --git a/src/generated/java/org/lwjglx/opengl/ARBComputeShader.java b/src/generated/java/org/lwjglx/opengl/ARBComputeShader.java index 6ee8e0f..3f4b6c1 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBComputeShader.java +++ b/src/generated/java/org/lwjglx/opengl/ARBComputeShader.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBComputeShader { + public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = (int) 37101; public static final int GL_COMPUTE_SHADER = (int) 37305; public static final int GL_COMPUTE_SHADER_BIT = (int) 32; diff --git a/src/generated/java/org/lwjglx/opengl/ARBComputeVariableGroupSize.java b/src/generated/java/org/lwjglx/opengl/ARBComputeVariableGroupSize.java index 70361f6..0ad805d 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBComputeVariableGroupSize.java +++ b/src/generated/java/org/lwjglx/opengl/ARBComputeVariableGroupSize.java @@ -1,19 +1,20 @@ package org.lwjglx.opengl; public class ARBComputeVariableGroupSize { + public static final int GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB = (int) 37099; public static final int GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB = (int) 37311; public static final int GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB = (int) 37700; public static final int GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB = (int) 37701; - public static void glDispatchComputeGroupSizeARB( - int num_groups_x, - int num_groups_y, - int num_groups_z, - int group_size_x, - int group_size_y, - int group_size_z) { + public static void glDispatchComputeGroupSizeARB(int num_groups_x, int num_groups_y, int num_groups_z, + int group_size_x, int group_size_y, int group_size_z) { org.lwjgl.opengl.ARBComputeVariableGroupSize.glDispatchComputeGroupSizeARB( - num_groups_x, num_groups_y, num_groups_z, group_size_x, group_size_y, group_size_z); + num_groups_x, + num_groups_y, + num_groups_z, + group_size_x, + group_size_y, + group_size_z); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBConditionalRenderInverted.java b/src/generated/java/org/lwjglx/opengl/ARBConditionalRenderInverted.java index 2fdc253..1b83d9e 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBConditionalRenderInverted.java +++ b/src/generated/java/org/lwjglx/opengl/ARBConditionalRenderInverted.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBConditionalRenderInverted { + public static final int GL_QUERY_BY_REGION_NO_WAIT_INVERTED = (int) 36378; public static final int GL_QUERY_BY_REGION_WAIT_INVERTED = (int) 36377; public static final int GL_QUERY_NO_WAIT_INVERTED = (int) 36376; diff --git a/src/generated/java/org/lwjglx/opengl/ARBCopyBuffer.java b/src/generated/java/org/lwjglx/opengl/ARBCopyBuffer.java index 3d3d5c4..ffd94e0 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBCopyBuffer.java +++ b/src/generated/java/org/lwjglx/opengl/ARBCopyBuffer.java @@ -1,11 +1,12 @@ package org.lwjglx.opengl; public class ARBCopyBuffer { + public static final int GL_COPY_READ_BUFFER = (int) 36662; public static final int GL_COPY_WRITE_BUFFER = (int) 36663; - public static void glCopyBufferSubData( - int readTarget, int writeTarget, long readOffset, long writeOffset, long size) { + public static void glCopyBufferSubData(int readTarget, int writeTarget, long readOffset, long writeOffset, + long size) { org.lwjgl.opengl.ARBCopyBuffer.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBCopyImage.java b/src/generated/java/org/lwjglx/opengl/ARBCopyImage.java index 3d05ab8..70a8865 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBCopyImage.java +++ b/src/generated/java/org/lwjglx/opengl/ARBCopyImage.java @@ -1,24 +1,25 @@ package org.lwjglx.opengl; public class ARBCopyImage { - public static void glCopyImageSubData( - int srcName, - int srcTarget, - int srcLevel, - int srcX, - int srcY, - int srcZ, - int dstName, - int dstTarget, - int dstLevel, - int dstX, - int dstY, - int dstZ, - int srcWidth, - int srcHeight, + + public static void glCopyImageSubData(int srcName, int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, + int dstName, int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int srcWidth, int srcHeight, int srcDepth) { org.lwjgl.opengl.ARBCopyImage.glCopyImageSubData( - srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, - srcWidth, srcHeight, srcDepth); + srcName, + srcTarget, + srcLevel, + srcX, + srcY, + srcZ, + dstName, + dstTarget, + dstLevel, + dstX, + dstY, + dstZ, + srcWidth, + srcHeight, + srcDepth); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBCullDistance.java b/src/generated/java/org/lwjglx/opengl/ARBCullDistance.java index 0afbd7c..e52e2ff 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBCullDistance.java +++ b/src/generated/java/org/lwjglx/opengl/ARBCullDistance.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBCullDistance { + public static final int GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES = (int) 33530; public static final int GL_MAX_CULL_DISTANCES = (int) 33529; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBDebugOutput.java b/src/generated/java/org/lwjglx/opengl/ARBDebugOutput.java index 52a12f9..df1ffb7 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBDebugOutput.java +++ b/src/generated/java/org/lwjglx/opengl/ARBDebugOutput.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBDebugOutput { + public static final int GL_DEBUG_CALLBACK_FUNCTION_ARB = (int) 33348; public static final int GL_DEBUG_CALLBACK_USER_PARAM_ARB = (int) 33349; public static final int GL_DEBUG_LOGGED_MESSAGES_ARB = (int) 37189; @@ -24,8 +25,8 @@ public class ARBDebugOutput { public static final int GL_MAX_DEBUG_LOGGED_MESSAGES_ARB = (int) 37188; public static final int GL_MAX_DEBUG_MESSAGE_LENGTH_ARB = (int) 37187; - public static void glDebugMessageControlARB( - int source, int type, int severity, java.nio.IntBuffer ids, boolean enabled) { + public static void glDebugMessageControlARB(int source, int type, int severity, java.nio.IntBuffer ids, + boolean enabled) { org.lwjgl.opengl.ARBDebugOutput.glDebugMessageControlARB(source, type, severity, ids, enabled); } @@ -37,15 +38,10 @@ public class ARBDebugOutput { org.lwjgl.opengl.ARBDebugOutput.glDebugMessageInsertARB(source, type, id, severity, buf); } - public static int glGetDebugMessageLogARB( - int count, - java.nio.IntBuffer sources, - java.nio.IntBuffer types, - java.nio.IntBuffer ids, - java.nio.IntBuffer severities, - java.nio.IntBuffer lengths, + public static int glGetDebugMessageLogARB(int count, java.nio.IntBuffer sources, java.nio.IntBuffer types, + java.nio.IntBuffer ids, java.nio.IntBuffer severities, java.nio.IntBuffer lengths, java.nio.ByteBuffer messageLog) { - return org.lwjgl.opengl.ARBDebugOutput.glGetDebugMessageLogARB( - count, sources, types, ids, severities, lengths, messageLog); + return org.lwjgl.opengl.ARBDebugOutput + .glGetDebugMessageLogARB(count, sources, types, ids, severities, lengths, messageLog); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBDepthBufferFloat.java b/src/generated/java/org/lwjglx/opengl/ARBDepthBufferFloat.java index d568e7e..84e778c 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBDepthBufferFloat.java +++ b/src/generated/java/org/lwjglx/opengl/ARBDepthBufferFloat.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBDepthBufferFloat { + public static final int GL_DEPTH32F_STENCIL8 = (int) 36013; public static final int GL_DEPTH_COMPONENT32F = (int) 36012; public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = (int) 36269; diff --git a/src/generated/java/org/lwjglx/opengl/ARBDepthClamp.java b/src/generated/java/org/lwjglx/opengl/ARBDepthClamp.java index a7c8f50..1e9c95c 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBDepthClamp.java +++ b/src/generated/java/org/lwjglx/opengl/ARBDepthClamp.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBDepthClamp { + public static final int GL_DEPTH_CLAMP = (int) 34383; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBDepthTexture.java b/src/generated/java/org/lwjglx/opengl/ARBDepthTexture.java index 651d1c0..2d83f4e 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBDepthTexture.java +++ b/src/generated/java/org/lwjglx/opengl/ARBDepthTexture.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBDepthTexture { + public static final int GL_DEPTH_COMPONENT16_ARB = (int) 33189; public static final int GL_DEPTH_COMPONENT24_ARB = (int) 33190; public static final int GL_DEPTH_COMPONENT32_ARB = (int) 33191; diff --git a/src/generated/java/org/lwjglx/opengl/ARBDirectStateAccess.java b/src/generated/java/org/lwjglx/opengl/ARBDirectStateAccess.java index 6247f93..96f0353 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBDirectStateAccess.java +++ b/src/generated/java/org/lwjglx/opengl/ARBDirectStateAccess.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBDirectStateAccess { + public static final int GL_QUERY_TARGET = (int) 33514; public static final int GL_TEXTURE_BINDING = (int) 33515; public static final int GL_TEXTURE_TARGET = (int) 4102; @@ -9,113 +10,112 @@ public class ARBDirectStateAccess { org.lwjgl.opengl.ARBDirectStateAccess.glBindTextureUnit(unit, texture); } - public static void glBlitNamedFramebuffer( - int readFramebuffer, - int drawFramebuffer, - int srcX0, - int srcY0, - int srcX1, - int srcY1, - int dstX0, - int dstY0, - int dstX1, - int dstY1, - int mask, - int filter) { + public static void glBlitNamedFramebuffer(int readFramebuffer, int drawFramebuffer, int srcX0, int srcY0, int srcX1, + int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) { org.lwjgl.opengl.ARBDirectStateAccess.glBlitNamedFramebuffer( - readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + readFramebuffer, + drawFramebuffer, + srcX0, + srcY0, + srcX1, + srcY1, + dstX0, + dstY0, + dstX1, + dstY1, + mask, + filter); } public static int glCheckNamedFramebufferStatus(int framebuffer, int target) { return org.lwjgl.opengl.ARBDirectStateAccess.glCheckNamedFramebufferStatus(framebuffer, target); } - public static void glClearNamedBufferData( - int buffer, int internalformat, int format, int type, java.nio.ByteBuffer data) { + public static void glClearNamedBufferData(int buffer, int internalformat, int format, int type, + java.nio.ByteBuffer data) { org.lwjgl.opengl.ARBDirectStateAccess.glClearNamedBufferData(buffer, internalformat, format, type, data); } - public static void glClearNamedBufferSubData( - int buffer, int internalformat, long offset, long size, int format, int type, java.nio.ByteBuffer data) { - org.lwjgl.opengl.ARBDirectStateAccess.glClearNamedBufferSubData( - buffer, internalformat, offset, size, format, type, data); + public static void glClearNamedBufferSubData(int buffer, int internalformat, long offset, long size, int format, + int type, java.nio.ByteBuffer data) { + org.lwjgl.opengl.ARBDirectStateAccess + .glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); } - public static void glCompressedTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int data_imageSize, long data_buffer_offset) { + public static void glCompressedTextureSubImage1D(int texture, int level, int xoffset, int width, int format, + int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.ARBDirectStateAccess.glCompressedTextureSubImage1D( - texture, level, xoffset, width, format, data_imageSize, data_buffer_offset); + texture, + level, + xoffset, + width, + format, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, java.nio.ByteBuffer data) { - org.lwjgl.opengl.ARBDirectStateAccess.glCompressedTextureSubImage1D( - texture, level, xoffset, width, format, data); - } - - public static void glCompressedTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int data_imageSize, - long data_buffer_offset) { - org.lwjgl.opengl.ARBDirectStateAccess.glCompressedTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, data_imageSize, data_buffer_offset); - } - - public static void glCompressedTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, + public static void glCompressedTextureSubImage1D(int texture, int level, int xoffset, int width, int format, java.nio.ByteBuffer data) { + org.lwjgl.opengl.ARBDirectStateAccess + .glCompressedTextureSubImage1D(texture, level, xoffset, width, format, data); + } + + public static void glCompressedTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, + int height, int format, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.ARBDirectStateAccess.glCompressedTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, data); + texture, + level, + xoffset, + yoffset, + width, + height, + format, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int imageSize, - long data_buffer_offset) { + public static void glCompressedTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, + int height, int format, java.nio.ByteBuffer data) { + org.lwjgl.opengl.ARBDirectStateAccess + .glCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, data); + } + + public static void glCompressedTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, int imageSize, long data_buffer_offset) { org.lwjgl.opengl.ARBDirectStateAccess.glCompressedTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_buffer_offset); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + imageSize, + data_buffer_offset); } - public static void glCopyNamedBufferSubData( - int readBuffer, int writeBuffer, long readOffset, long writeOffset, long size) { - org.lwjgl.opengl.ARBDirectStateAccess.glCopyNamedBufferSubData( - readBuffer, writeBuffer, readOffset, writeOffset, size); + public static void glCopyNamedBufferSubData(int readBuffer, int writeBuffer, long readOffset, long writeOffset, + long size) { + org.lwjgl.opengl.ARBDirectStateAccess + .glCopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size); } public static void glCopyTextureSubImage1D(int texture, int level, int xoffset, int x, int y, int width) { org.lwjgl.opengl.ARBDirectStateAccess.glCopyTextureSubImage1D(texture, level, xoffset, x, y, width); } - public static void glCopyTextureSubImage2D( - int texture, int level, int xoffset, int yoffset, int x, int y, int width, int height) { - org.lwjgl.opengl.ARBDirectStateAccess.glCopyTextureSubImage2D( - texture, level, xoffset, yoffset, x, y, width, height); + public static void glCopyTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int x, int y, + int width, int height) { + org.lwjgl.opengl.ARBDirectStateAccess + .glCopyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height); } - public static void glCopyTextureSubImage3D( - int texture, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) { - org.lwjgl.opengl.ARBDirectStateAccess.glCopyTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, x, y, width, height); + public static void glCopyTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int x, + int y, int width, int height) { + org.lwjgl.opengl.ARBDirectStateAccess + .glCopyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width, height); } public static int glCreateBuffers() { @@ -206,10 +206,10 @@ public class ARBDirectStateAccess { org.lwjgl.opengl.ARBDirectStateAccess.glGenerateTextureMipmap(texture); } - public static void glGetCompressedTextureImage( - int texture, int level, int pixels_bufSize, long pixels_buffer_offset) { - org.lwjgl.opengl.ARBDirectStateAccess.glGetCompressedTextureImage( - texture, level, pixels_bufSize, pixels_buffer_offset); + public static void glGetCompressedTextureImage(int texture, int level, int pixels_bufSize, + long pixels_buffer_offset) { + org.lwjgl.opengl.ARBDirectStateAccess + .glGetCompressedTextureImage(texture, level, pixels_bufSize, pixels_buffer_offset); } public static void glGetCompressedTextureImage(int texture, int level, java.nio.ByteBuffer pixels) { @@ -244,10 +244,10 @@ public class ARBDirectStateAccess { org.lwjgl.opengl.ARBDirectStateAccess.glGetNamedBufferSubData(buffer, offset, data); } - public static void glGetTextureImage( - int texture, int level, int format, int type, int pixels_bufSize, long pixels_buffer_offset) { - org.lwjgl.opengl.ARBDirectStateAccess.glGetTextureImage( - texture, level, format, type, pixels_bufSize, pixels_buffer_offset); + public static void glGetTextureImage(int texture, int level, int format, int type, int pixels_bufSize, + long pixels_buffer_offset) { + org.lwjgl.opengl.ARBDirectStateAccess + .glGetTextureImage(texture, level, format, type, pixels_bufSize, pixels_buffer_offset); } public static void glGetTextureImage(int texture, int level, int format, int type, java.nio.ByteBuffer pixels) { @@ -314,14 +314,14 @@ public class ARBDirectStateAccess { org.lwjgl.opengl.ARBDirectStateAccess.glInvalidateNamedFramebufferData(framebuffer, attachments); } - public static void glInvalidateNamedFramebufferSubData( - int framebuffer, java.nio.IntBuffer attachments, int x, int y, int width, int height) { - org.lwjgl.opengl.ARBDirectStateAccess.glInvalidateNamedFramebufferSubData( - framebuffer, attachments, x, y, width, height); + public static void glInvalidateNamedFramebufferSubData(int framebuffer, java.nio.IntBuffer attachments, int x, + int y, int width, int height) { + org.lwjgl.opengl.ARBDirectStateAccess + .glInvalidateNamedFramebufferSubData(framebuffer, attachments, x, y, width, height); } - public static java.nio.ByteBuffer glMapNamedBuffer( - int buffer, int access, long length, java.nio.ByteBuffer old_buffer) { + public static java.nio.ByteBuffer glMapNamedBuffer(int buffer, int access, long length, + java.nio.ByteBuffer old_buffer) { return org.lwjgl.opengl.ARBDirectStateAccess.glMapNamedBuffer(buffer, access, length, old_buffer); } @@ -329,8 +329,8 @@ public class ARBDirectStateAccess { return org.lwjgl.opengl.ARBDirectStateAccess.glMapNamedBuffer(buffer, access, old_buffer); } - public static java.nio.ByteBuffer glMapNamedBufferRange( - int buffer, long offset, long length, int access, java.nio.ByteBuffer old_buffer) { + public static java.nio.ByteBuffer glMapNamedBufferRange(int buffer, long offset, long length, int access, + java.nio.ByteBuffer old_buffer) { return org.lwjgl.opengl.ARBDirectStateAccess.glMapNamedBufferRange(buffer, offset, length, access, old_buffer); } @@ -418,30 +418,30 @@ public class ARBDirectStateAccess { org.lwjgl.opengl.ARBDirectStateAccess.glNamedFramebufferReadBuffer(framebuffer, mode); } - public static void glNamedFramebufferRenderbuffer( - int framebuffer, int attachment, int renderbuffertarget, int renderbuffer) { - org.lwjgl.opengl.ARBDirectStateAccess.glNamedFramebufferRenderbuffer( - framebuffer, attachment, renderbuffertarget, renderbuffer); + public static void glNamedFramebufferRenderbuffer(int framebuffer, int attachment, int renderbuffertarget, + int renderbuffer) { + org.lwjgl.opengl.ARBDirectStateAccess + .glNamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer); } public static void glNamedFramebufferTexture(int framebuffer, int attachment, int texture, int level) { org.lwjgl.opengl.ARBDirectStateAccess.glNamedFramebufferTexture(framebuffer, attachment, texture, level); } - public static void glNamedFramebufferTextureLayer( - int framebuffer, int attachment, int texture, int level, int layer) { - org.lwjgl.opengl.ARBDirectStateAccess.glNamedFramebufferTextureLayer( - framebuffer, attachment, texture, level, layer); + public static void glNamedFramebufferTextureLayer(int framebuffer, int attachment, int texture, int level, + int layer) { + org.lwjgl.opengl.ARBDirectStateAccess + .glNamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer); } public static void glNamedRenderbufferStorage(int renderbuffer, int internalformat, int width, int height) { org.lwjgl.opengl.ARBDirectStateAccess.glNamedRenderbufferStorage(renderbuffer, internalformat, width, height); } - public static void glNamedRenderbufferStorageMultisample( - int renderbuffer, int samples, int internalformat, int width, int height) { - org.lwjgl.opengl.ARBDirectStateAccess.glNamedRenderbufferStorageMultisample( - renderbuffer, samples, internalformat, width, height); + public static void glNamedRenderbufferStorageMultisample(int renderbuffer, int samples, int internalformat, + int width, int height) { + org.lwjgl.opengl.ARBDirectStateAccess + .glNamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height); } public static void glTextureBuffer(int texture, int internalformat, int buffer) { @@ -468,238 +468,198 @@ public class ARBDirectStateAccess { org.lwjgl.opengl.ARBDirectStateAccess.glTextureStorage2D(texture, levels, internalformat, width, height); } - public static void glTextureStorage2DMultisample( - int texture, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureStorage2DMultisample( - texture, samples, internalformat, width, height, fixedsamplelocations); + public static void glTextureStorage2DMultisample(int texture, int samples, int internalformat, int width, + int height, boolean fixedsamplelocations) { + org.lwjgl.opengl.ARBDirectStateAccess + .glTextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations); } - public static void glTextureStorage3D( - int texture, int levels, int internalformat, int width, int height, int depth) { + public static void glTextureStorage3D(int texture, int levels, int internalformat, int width, int height, + int depth) { org.lwjgl.opengl.ARBDirectStateAccess.glTextureStorage3D(texture, levels, internalformat, width, height, depth); } - public static void glTextureStorage3DMultisample( - int texture, - int samples, - int internalformat, - int width, - int height, - int depth, - boolean fixedsamplelocations) { + public static void glTextureStorage3DMultisample(int texture, int samples, int internalformat, int width, + int height, int depth, boolean fixedsamplelocations) { org.lwjgl.opengl.ARBDirectStateAccess.glTextureStorage3DMultisample( - texture, samples, internalformat, width, height, depth, fixedsamplelocations); + texture, + samples, + internalformat, + width, + height, + depth, + fixedsamplelocations); } - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, long pixels_buffer_offset) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage1D( - texture, level, xoffset, width, format, type, pixels_buffer_offset); - } - - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, long pixels_buffer_offset) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset); + org.lwjgl.opengl.ARBDirectStateAccess + .glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels_buffer_offset); } - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels); + org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels); + org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels); + org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels); + org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); + } + + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels); + texture, + level, + xoffset, + yoffset, + width, + height, + format, + type, + pixels_buffer_offset); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - long pixels_buffer_offset) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_buffer_offset); + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.ARBDirectStateAccess + .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.ARBDirectStateAccess + .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.ARBDirectStateAccess + .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.ARBDirectStateAccess + .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.IntBuffer pixels) { - org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.ARBDirectStateAccess + .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels_buffer_offset); + } + + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); + } + + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); + } + + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); + } + + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); + } + + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.ARBDirectStateAccess.glTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } public static void glTransformFeedbackBufferBase(int xfb, int index, int buffer) { @@ -718,20 +678,20 @@ public class ARBDirectStateAccess { org.lwjgl.opengl.ARBDirectStateAccess.glVertexArrayAttribBinding(vaobj, attribindex, bindingindex); } - public static void glVertexArrayAttribFormat( - int vaobj, int attribindex, int size, int type, boolean normalized, int relativeoffset) { - org.lwjgl.opengl.ARBDirectStateAccess.glVertexArrayAttribFormat( - vaobj, attribindex, size, type, normalized, relativeoffset); + public static void glVertexArrayAttribFormat(int vaobj, int attribindex, int size, int type, boolean normalized, + int relativeoffset) { + org.lwjgl.opengl.ARBDirectStateAccess + .glVertexArrayAttribFormat(vaobj, attribindex, size, type, normalized, relativeoffset); } public static void glVertexArrayAttribIFormat(int vaobj, int attribindex, int size, int type, int relativeoffset) { - org.lwjgl.opengl.ARBDirectStateAccess.glVertexArrayAttribIFormat( - vaobj, attribindex, size, type, relativeoffset); + org.lwjgl.opengl.ARBDirectStateAccess + .glVertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset); } public static void glVertexArrayAttribLFormat(int vaobj, int attribindex, int size, int type, int relativeoffset) { - org.lwjgl.opengl.ARBDirectStateAccess.glVertexArrayAttribLFormat( - vaobj, attribindex, size, type, relativeoffset); + org.lwjgl.opengl.ARBDirectStateAccess + .glVertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset); } public static void glVertexArrayBindingDivisor(int vaobj, int bindingindex, int divisor) { diff --git a/src/generated/java/org/lwjglx/opengl/ARBDrawBuffers.java b/src/generated/java/org/lwjglx/opengl/ARBDrawBuffers.java index d18c302..55e44ab 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBDrawBuffers.java +++ b/src/generated/java/org/lwjglx/opengl/ARBDrawBuffers.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBDrawBuffers { + public static final int GL_DRAW_BUFFER0_ARB = (int) 34853; public static final int GL_DRAW_BUFFER10_ARB = (int) 34863; public static final int GL_DRAW_BUFFER11_ARB = (int) 34864; @@ -21,7 +22,7 @@ public class ARBDrawBuffers { public static void glDrawBuffersARB(int buffer) { - org.lwjgl.opengl.ARBDrawBuffers.glDrawBuffersARB(new int[] {buffer}); + org.lwjgl.opengl.ARBDrawBuffers.glDrawBuffersARB(new int[] { buffer }); } public static void glDrawBuffersARB(java.nio.IntBuffer buffers) { diff --git a/src/generated/java/org/lwjglx/opengl/ARBDrawBuffersBlend.java b/src/generated/java/org/lwjglx/opengl/ARBDrawBuffersBlend.java index 3e17fc1..fac6f0c 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBDrawBuffersBlend.java +++ b/src/generated/java/org/lwjglx/opengl/ARBDrawBuffersBlend.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBDrawBuffersBlend { + public static void glBlendEquationSeparateiARB(int buf, int modeRGB, int modeAlpha) { org.lwjgl.opengl.ARBDrawBuffersBlend.glBlendEquationSeparateiARB(buf, modeRGB, modeAlpha); } diff --git a/src/generated/java/org/lwjglx/opengl/ARBDrawElementsBaseVertex.java b/src/generated/java/org/lwjglx/opengl/ARBDrawElementsBaseVertex.java index 703aedd..c5b9527 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBDrawElementsBaseVertex.java +++ b/src/generated/java/org/lwjglx/opengl/ARBDrawElementsBaseVertex.java @@ -1,10 +1,11 @@ package org.lwjglx.opengl; public class ARBDrawElementsBaseVertex { - public static void glDrawElementsBaseVertex( - int mode, int indices_count, int type, long indices_buffer_offset, int basevertex) { - org.lwjgl.opengl.ARBDrawElementsBaseVertex.glDrawElementsBaseVertex( - mode, indices_count, type, indices_buffer_offset, basevertex); + + public static void glDrawElementsBaseVertex(int mode, int indices_count, int type, long indices_buffer_offset, + int basevertex) { + org.lwjgl.opengl.ARBDrawElementsBaseVertex + .glDrawElementsBaseVertex(mode, indices_count, type, indices_buffer_offset, basevertex); } public static void glDrawElementsBaseVertex(int mode, java.nio.ByteBuffer indices, int basevertex) { @@ -19,48 +20,59 @@ public class ARBDrawElementsBaseVertex { org.lwjgl.opengl.ARBDrawElementsBaseVertex.glDrawElementsBaseVertex(mode, indices, basevertex); } - public static void glDrawElementsInstancedBaseVertex( - int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int basevertex) { + public static void glDrawElementsInstancedBaseVertex(int mode, int indices_count, int type, + long indices_buffer_offset, int primcount, int basevertex) { org.lwjgl.opengl.ARBDrawElementsBaseVertex.glDrawElementsInstancedBaseVertex( - mode, indices_count, type, indices_buffer_offset, primcount, basevertex); + mode, + indices_count, + type, + indices_buffer_offset, + primcount, + basevertex); } - public static void glDrawElementsInstancedBaseVertex( - int mode, java.nio.ByteBuffer indices, int primcount, int basevertex) { - org.lwjgl.opengl.ARBDrawElementsBaseVertex.glDrawElementsInstancedBaseVertex( - mode, indices, primcount, basevertex); + public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.ByteBuffer indices, int primcount, + int basevertex) { + org.lwjgl.opengl.ARBDrawElementsBaseVertex + .glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); } - public static void glDrawElementsInstancedBaseVertex( - int mode, java.nio.IntBuffer indices, int primcount, int basevertex) { - org.lwjgl.opengl.ARBDrawElementsBaseVertex.glDrawElementsInstancedBaseVertex( - mode, indices, primcount, basevertex); + public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.IntBuffer indices, int primcount, + int basevertex) { + org.lwjgl.opengl.ARBDrawElementsBaseVertex + .glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); } - public static void glDrawElementsInstancedBaseVertex( - int mode, java.nio.ShortBuffer indices, int primcount, int basevertex) { - org.lwjgl.opengl.ARBDrawElementsBaseVertex.glDrawElementsInstancedBaseVertex( - mode, indices, primcount, basevertex); + public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.ShortBuffer indices, int primcount, + int basevertex) { + org.lwjgl.opengl.ARBDrawElementsBaseVertex + .glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); } - public static void glDrawRangeElementsBaseVertex( - int mode, int start, int end, int indices_count, int type, long indices_buffer_offset, int basevertex) { + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, int indices_count, int type, + long indices_buffer_offset, int basevertex) { org.lwjgl.opengl.ARBDrawElementsBaseVertex.glDrawRangeElementsBaseVertex( - mode, start, end, indices_count, type, indices_buffer_offset, basevertex); + mode, + start, + end, + indices_count, + type, + indices_buffer_offset, + basevertex); } - public static void glDrawRangeElementsBaseVertex( - int mode, int start, int end, java.nio.ByteBuffer indices, int basevertex) { + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.ByteBuffer indices, + int basevertex) { org.lwjgl.opengl.ARBDrawElementsBaseVertex.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); } - public static void glDrawRangeElementsBaseVertex( - int mode, int start, int end, java.nio.IntBuffer indices, int basevertex) { + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.IntBuffer indices, + int basevertex) { org.lwjgl.opengl.ARBDrawElementsBaseVertex.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); } - public static void glDrawRangeElementsBaseVertex( - int mode, int start, int end, java.nio.ShortBuffer indices, int basevertex) { + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.ShortBuffer indices, + int basevertex) { org.lwjgl.opengl.ARBDrawElementsBaseVertex.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBDrawIndirect.java b/src/generated/java/org/lwjglx/opengl/ARBDrawIndirect.java index 2c4be7c..2b27f70 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBDrawIndirect.java +++ b/src/generated/java/org/lwjglx/opengl/ARBDrawIndirect.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBDrawIndirect { + public static final int GL_DRAW_INDIRECT_BUFFER = (int) 36671; public static final int GL_DRAW_INDIRECT_BUFFER_BINDING = (int) 36675; diff --git a/src/generated/java/org/lwjglx/opengl/ARBDrawInstanced.java b/src/generated/java/org/lwjglx/opengl/ARBDrawInstanced.java index 61a0afc..23dd290 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBDrawInstanced.java +++ b/src/generated/java/org/lwjglx/opengl/ARBDrawInstanced.java @@ -1,14 +1,15 @@ package org.lwjglx.opengl; public class ARBDrawInstanced { + public static void glDrawArraysInstancedARB(int mode, int first, int count, int primcount) { org.lwjgl.opengl.ARBDrawInstanced.glDrawArraysInstancedARB(mode, first, count, primcount); } - public static void glDrawElementsInstancedARB( - int mode, int indices_count, int type, long indices_buffer_offset, int primcount) { - org.lwjgl.opengl.ARBDrawInstanced.glDrawElementsInstancedARB( - mode, indices_count, type, indices_buffer_offset, primcount); + public static void glDrawElementsInstancedARB(int mode, int indices_count, int type, long indices_buffer_offset, + int primcount) { + org.lwjgl.opengl.ARBDrawInstanced + .glDrawElementsInstancedARB(mode, indices_count, type, indices_buffer_offset, primcount); } public static void glDrawElementsInstancedARB(int mode, java.nio.ByteBuffer indices, int primcount) { diff --git a/src/generated/java/org/lwjglx/opengl/ARBES2Compatibility.java b/src/generated/java/org/lwjglx/opengl/ARBES2Compatibility.java index a4e0c43..c346b7f 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBES2Compatibility.java +++ b/src/generated/java/org/lwjglx/opengl/ARBES2Compatibility.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBES2Compatibility { + public static final int GL_FIXED = (int) 5132; public static final int GL_HIGH_FLOAT = (int) 36338; public static final int GL_HIGH_INT = (int) 36341; @@ -25,8 +26,8 @@ public class ARBES2Compatibility { org.lwjgl.opengl.ARBES2Compatibility.glDepthRangef(n, f); } - public static void glGetShaderPrecisionFormat( - int shadertype, int precisiontype, java.nio.IntBuffer range, java.nio.IntBuffer precision) { + public static void glGetShaderPrecisionFormat(int shadertype, int precisiontype, java.nio.IntBuffer range, + java.nio.IntBuffer precision) { org.lwjgl.opengl.ARBES2Compatibility.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); } diff --git a/src/generated/java/org/lwjglx/opengl/ARBES31Compatibility.java b/src/generated/java/org/lwjglx/opengl/ARBES31Compatibility.java index 6bb4a87..4b9d26f 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBES31Compatibility.java +++ b/src/generated/java/org/lwjglx/opengl/ARBES31Compatibility.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBES31Compatibility { + public static void glMemoryBarrierByRegion(int barriers) { org.lwjgl.opengl.ARBES31Compatibility.glMemoryBarrierByRegion(barriers); } diff --git a/src/generated/java/org/lwjglx/opengl/ARBES3Compatibility.java b/src/generated/java/org/lwjglx/opengl/ARBES3Compatibility.java index 5663fa4..6330d6a 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBES3Compatibility.java +++ b/src/generated/java/org/lwjglx/opengl/ARBES3Compatibility.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBES3Compatibility { + public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = (int) 36202; public static final int GL_COMPRESSED_R11_EAC = (int) 37488; public static final int GL_COMPRESSED_RG11_EAC = (int) 37490; diff --git a/src/generated/java/org/lwjglx/opengl/ARBEnhancedLayouts.java b/src/generated/java/org/lwjglx/opengl/ARBEnhancedLayouts.java index 6879009..1d941d7 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBEnhancedLayouts.java +++ b/src/generated/java/org/lwjglx/opengl/ARBEnhancedLayouts.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBEnhancedLayouts { + public static final int GL_LOCATION_COMPONENT = (int) 37706; public static final int GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = (int) 37707; public static final int GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = (int) 37708; diff --git a/src/generated/java/org/lwjglx/opengl/ARBExplicitUniformLocation.java b/src/generated/java/org/lwjglx/opengl/ARBExplicitUniformLocation.java index e71f984..92113b0 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBExplicitUniformLocation.java +++ b/src/generated/java/org/lwjglx/opengl/ARBExplicitUniformLocation.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBExplicitUniformLocation { + public static final int GL_MAX_UNIFORM_LOCATIONS = (int) 33390; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBFragmentProgram.java b/src/generated/java/org/lwjglx/opengl/ARBFragmentProgram.java index 74eac70..e49229d 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBFragmentProgram.java +++ b/src/generated/java/org/lwjglx/opengl/ARBFragmentProgram.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBFragmentProgram extends org.lwjglx.opengl.ARBProgram { + public static final int GL_FRAGMENT_PROGRAM_ARB = (int) 34820; public static final int GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = (int) 34827; public static final int GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = (int) 34830; diff --git a/src/generated/java/org/lwjglx/opengl/ARBFragmentShader.java b/src/generated/java/org/lwjglx/opengl/ARBFragmentShader.java index 8b8dbde..39a679a 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBFragmentShader.java +++ b/src/generated/java/org/lwjglx/opengl/ARBFragmentShader.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBFragmentShader { + public static final int GL_FRAGMENT_SHADER_ARB = (int) 35632; public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB = (int) 35723; public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = (int) 35657; diff --git a/src/generated/java/org/lwjglx/opengl/ARBFramebufferNoAttachments.java b/src/generated/java/org/lwjglx/opengl/ARBFramebufferNoAttachments.java index 1dcf4cb..a57107d 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBFramebufferNoAttachments.java +++ b/src/generated/java/org/lwjglx/opengl/ARBFramebufferNoAttachments.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBFramebufferNoAttachments { + public static final int GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = (int) 37652; public static final int GL_FRAMEBUFFER_DEFAULT_HEIGHT = (int) 37649; public static final int GL_FRAMEBUFFER_DEFAULT_LAYERS = (int) 37650; diff --git a/src/generated/java/org/lwjglx/opengl/ARBFramebufferObject.java b/src/generated/java/org/lwjglx/opengl/ARBFramebufferObject.java index 8eea71d..11d8095 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBFramebufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/ARBFramebufferObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBFramebufferObject { + public static final int GL_COLOR_ATTACHMENT0 = (int) 36064; public static final int GL_COLOR_ATTACHMENT10 = (int) 36074; public static final int GL_COLOR_ATTACHMENT11 = (int) 36075; @@ -84,19 +85,10 @@ public class ARBFramebufferObject { org.lwjgl.opengl.ARBFramebufferObject.glBindRenderbuffer(target, renderbuffer); } - public static void glBlitFramebuffer( - int srcX0, - int srcY0, - int srcX1, - int srcY1, - int dstX0, - int dstY0, - int dstX1, - int dstY1, - int mask, - int filter) { - org.lwjgl.opengl.ARBFramebufferObject.glBlitFramebuffer( - srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + public static void glBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, + int dstY1, int mask, int filter) { + org.lwjgl.opengl.ARBFramebufferObject + .glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } public static int glCheckFramebufferStatus(int target) { @@ -120,8 +112,8 @@ public class ARBFramebufferObject { } public static void glFramebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer) { - org.lwjgl.opengl.ARBFramebufferObject.glFramebufferRenderbuffer( - target, attachment, renderbuffertarget, renderbuffer); + org.lwjgl.opengl.ARBFramebufferObject + .glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); } public static void glFramebufferTexture1D(int target, int attachment, int textarget, int texture, int level) { @@ -132,10 +124,10 @@ public class ARBFramebufferObject { org.lwjgl.opengl.ARBFramebufferObject.glFramebufferTexture2D(target, attachment, textarget, texture, level); } - public static void glFramebufferTexture3D( - int target, int attachment, int textarget, int texture, int level, int layer) { - org.lwjgl.opengl.ARBFramebufferObject.glFramebufferTexture3D( - target, attachment, textarget, texture, level, layer); + public static void glFramebufferTexture3D(int target, int attachment, int textarget, int texture, int level, + int layer) { + org.lwjgl.opengl.ARBFramebufferObject + .glFramebufferTexture3D(target, attachment, textarget, texture, level, layer); } public static void glFramebufferTextureLayer(int target, int attachment, int texture, int level, int layer) { @@ -182,9 +174,9 @@ public class ARBFramebufferObject { org.lwjgl.opengl.ARBFramebufferObject.glRenderbufferStorage(target, internalformat, width, height); } - public static void glRenderbufferStorageMultisample( - int target, int samples, int internalformat, int width, int height) { - org.lwjgl.opengl.ARBFramebufferObject.glRenderbufferStorageMultisample( - target, samples, internalformat, width, height); + public static void glRenderbufferStorageMultisample(int target, int samples, int internalformat, int width, + int height) { + org.lwjgl.opengl.ARBFramebufferObject + .glRenderbufferStorageMultisample(target, samples, internalformat, width, height); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBFramebufferSRGB.java b/src/generated/java/org/lwjglx/opengl/ARBFramebufferSRGB.java index cc2eac9..2d132cc 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBFramebufferSRGB.java +++ b/src/generated/java/org/lwjglx/opengl/ARBFramebufferSRGB.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBFramebufferSRGB { + public static final int GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB = (int) 8370; public static final int GL_FRAMEBUFFER_SRGB_ARB = (int) 36281; public static final int GL_FRAMEBUFFER_SRGB_CAPABLE_ARB = (int) 36282; diff --git a/src/generated/java/org/lwjglx/opengl/ARBGeometryShader4.java b/src/generated/java/org/lwjglx/opengl/ARBGeometryShader4.java index 556f457..eb3dba9 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBGeometryShader4.java +++ b/src/generated/java/org/lwjglx/opengl/ARBGeometryShader4.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBGeometryShader4 { + public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = (int) 36263; public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_ARB = (int) 36052; public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = (int) 36265; diff --git a/src/generated/java/org/lwjglx/opengl/ARBGetProgramBinary.java b/src/generated/java/org/lwjglx/opengl/ARBGetProgramBinary.java index d18d3d5..6ddd26a 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBGetProgramBinary.java +++ b/src/generated/java/org/lwjglx/opengl/ARBGetProgramBinary.java @@ -1,13 +1,14 @@ package org.lwjglx.opengl; public class ARBGetProgramBinary { + public static final int GL_NUM_PROGRAM_BINARY_FORMATS = (int) 34814; public static final int GL_PROGRAM_BINARY_FORMATS = (int) 34815; public static final int GL_PROGRAM_BINARY_LENGTH = (int) 34625; public static final int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = (int) 33367; - public static void glGetProgramBinary( - int program, java.nio.IntBuffer length, java.nio.IntBuffer binaryFormat, java.nio.ByteBuffer binary) { + public static void glGetProgramBinary(int program, java.nio.IntBuffer length, java.nio.IntBuffer binaryFormat, + java.nio.ByteBuffer binary) { org.lwjgl.opengl.ARBGetProgramBinary.glGetProgramBinary(program, length, binaryFormat, binary); } diff --git a/src/generated/java/org/lwjglx/opengl/ARBGetTextureSubImage.java b/src/generated/java/org/lwjglx/opengl/ARBGetTextureSubImage.java index 65a5057..c52b16a 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBGetTextureSubImage.java +++ b/src/generated/java/org/lwjglx/opengl/ARBGetTextureSubImage.java @@ -1,104 +1,94 @@ package org.lwjglx.opengl; public class ARBGetTextureSubImage { - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int pixels_bufSize, - long pixels_buffer_offset) { + + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int pixels_bufSize, long pixels_buffer_offset) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels_bufSize, pixels_buffer_offset); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels_bufSize, + pixels_buffer_offset); } - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - java.nio.ByteBuffer pixels) { + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels); } - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - java.nio.DoubleBuffer pixels) { + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels); } - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - java.nio.FloatBuffer pixels) { + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels); } - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - java.nio.IntBuffer pixels) { + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, java.nio.IntBuffer pixels) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels); } - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - java.nio.ShortBuffer pixels) { + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - int pixels_bufSize, - long pixels_buffer_offset) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, int pixels_bufSize, long pixels_buffer_offset) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetTextureSubImage( texture, level, @@ -114,83 +104,83 @@ public class ARBGetTextureSubImage { pixels_buffer_offset); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ByteBuffer pixels) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.DoubleBuffer pixels) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.FloatBuffer pixels) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.IntBuffer pixels) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.IntBuffer pixels) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.ARBGetTextureSubImage.glGetTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBHalfFloatPixel.java b/src/generated/java/org/lwjglx/opengl/ARBHalfFloatPixel.java index 074761e..bd59c12 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBHalfFloatPixel.java +++ b/src/generated/java/org/lwjglx/opengl/ARBHalfFloatPixel.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBHalfFloatPixel { + public static final int GL_HALF_FLOAT_ARB = (int) 5131; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBHalfFloatVertex.java b/src/generated/java/org/lwjglx/opengl/ARBHalfFloatVertex.java index 973b900..16b1e7f 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBHalfFloatVertex.java +++ b/src/generated/java/org/lwjglx/opengl/ARBHalfFloatVertex.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBHalfFloatVertex { + public static final int GL_HALF_FLOAT = (int) 5131; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBImaging.java b/src/generated/java/org/lwjglx/opengl/ARBImaging.java index 6f2a773..b118aee 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBImaging.java +++ b/src/generated/java/org/lwjglx/opengl/ARBImaging.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBImaging { + public static final int GL_BLEND_COLOR = (int) 32773; public static final int GL_BLEND_EQUATION = (int) 32777; public static final int GL_COLOR_MATRIX = (int) 32945; @@ -82,49 +83,49 @@ public class ARBImaging { org.lwjgl.opengl.ARBImaging.glBlendEquation(mode); } - public static void glColorSubTable( - int target, int start, int count, int format, int type, long data_buffer_offset) { + public static void glColorSubTable(int target, int start, int count, int format, int type, + long data_buffer_offset) { org.lwjgl.opengl.ARBImaging.glColorSubTable(target, start, count, format, type, data_buffer_offset); } - public static void glColorSubTable( - int target, int start, int count, int format, int type, java.nio.ByteBuffer data) { + public static void glColorSubTable(int target, int start, int count, int format, int type, + java.nio.ByteBuffer data) { org.lwjgl.opengl.ARBImaging.glColorSubTable(target, start, count, format, type, data); } - public static void glColorSubTable( - int target, int start, int count, int format, int type, java.nio.DoubleBuffer data) { + public static void glColorSubTable(int target, int start, int count, int format, int type, + java.nio.DoubleBuffer data) { - org.lwjgl.opengl.ARBImaging.glColorSubTable( - target, start, count, format, type, org.lwjglx.MemoryUtil.getAddress(data)); + org.lwjgl.opengl.ARBImaging + .glColorSubTable(target, start, count, format, type, org.lwjglx.MemoryUtil.getAddress(data)); } - public static void glColorSubTable( - int target, int start, int count, int format, int type, java.nio.FloatBuffer data) { + public static void glColorSubTable(int target, int start, int count, int format, int type, + java.nio.FloatBuffer data) { - org.lwjgl.opengl.ARBImaging.glColorSubTable( - target, start, count, format, type, org.lwjglx.MemoryUtil.getAddress(data)); + org.lwjgl.opengl.ARBImaging + .glColorSubTable(target, start, count, format, type, org.lwjglx.MemoryUtil.getAddress(data)); } - public static void glColorTable( - int target, int internalFormat, int width, int format, int type, long data_buffer_offset) { + public static void glColorTable(int target, int internalFormat, int width, int format, int type, + long data_buffer_offset) { org.lwjgl.opengl.ARBImaging.glColorTable(target, internalFormat, width, format, type, data_buffer_offset); } - public static void glColorTable( - int target, int internalFormat, int width, int format, int type, java.nio.ByteBuffer data) { + public static void glColorTable(int target, int internalFormat, int width, int format, int type, + java.nio.ByteBuffer data) { org.lwjgl.opengl.ARBImaging.glColorTable(target, internalFormat, width, format, type, data); } - public static void glColorTable( - int target, int internalFormat, int width, int format, int type, java.nio.DoubleBuffer data) { + public static void glColorTable(int target, int internalFormat, int width, int format, int type, + java.nio.DoubleBuffer data) { - org.lwjgl.opengl.ARBImaging.glColorTable( - target, internalFormat, width, format, type, org.lwjglx.MemoryUtil.getAddress(data)); + org.lwjgl.opengl.ARBImaging + .glColorTable(target, internalFormat, width, format, type, org.lwjglx.MemoryUtil.getAddress(data)); } - public static void glColorTable( - int target, int internalFormat, int width, int format, int type, java.nio.FloatBuffer data) { + public static void glColorTable(int target, int internalFormat, int width, int format, int type, + java.nio.FloatBuffer data) { org.lwjgl.opengl.ARBImaging.glColorTable(target, internalFormat, width, format, type, data); } @@ -136,68 +137,100 @@ public class ARBImaging { org.lwjgl.opengl.ARBImaging.glColorTableParameteriv(target, pname, params); } - public static void glConvolutionFilter1D( - int target, int internalformat, int width, int format, int type, long image_buffer_offset) { - org.lwjgl.opengl.ARBImaging.glConvolutionFilter1D( - target, internalformat, width, format, type, image_buffer_offset); + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, + long image_buffer_offset) { + org.lwjgl.opengl.ARBImaging + .glConvolutionFilter1D(target, internalformat, width, format, type, image_buffer_offset); } - public static void glConvolutionFilter1D( - int target, int internalformat, int width, int format, int type, java.nio.ByteBuffer image) { + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, + java.nio.ByteBuffer image) { org.lwjgl.opengl.ARBImaging.glConvolutionFilter1D(target, internalformat, width, format, type, image); } - public static void glConvolutionFilter1D( - int target, int internalformat, int width, int format, int type, java.nio.DoubleBuffer image) { + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, + java.nio.DoubleBuffer image) { org.lwjgl.opengl.ARBImaging.glConvolutionFilter1D( - target, internalformat, width, format, type, org.lwjglx.MemoryUtil.getAddress(image)); + target, + internalformat, + width, + format, + type, + org.lwjglx.MemoryUtil.getAddress(image)); } - public static void glConvolutionFilter1D( - int target, int internalformat, int width, int format, int type, java.nio.FloatBuffer image) { + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, + java.nio.FloatBuffer image) { org.lwjgl.opengl.ARBImaging.glConvolutionFilter1D( - target, internalformat, width, format, type, org.lwjglx.MemoryUtil.getAddress(image)); + target, + internalformat, + width, + format, + type, + org.lwjglx.MemoryUtil.getAddress(image)); } - public static void glConvolutionFilter1D( - int target, int internalformat, int width, int format, int type, java.nio.IntBuffer image) { + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, + java.nio.IntBuffer image) { org.lwjgl.opengl.ARBImaging.glConvolutionFilter1D( - target, internalformat, width, format, type, org.lwjglx.MemoryUtil.getAddress(image)); + target, + internalformat, + width, + format, + type, + org.lwjglx.MemoryUtil.getAddress(image)); } - public static void glConvolutionFilter1D( - int target, int internalformat, int width, int format, int type, java.nio.ShortBuffer image) { + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, + java.nio.ShortBuffer image) { org.lwjgl.opengl.ARBImaging.glConvolutionFilter1D( - target, internalformat, width, format, type, org.lwjglx.MemoryUtil.getAddress(image)); + target, + internalformat, + width, + format, + type, + org.lwjglx.MemoryUtil.getAddress(image)); } - public static void glConvolutionFilter2D( - int target, int internalformat, int width, int height, int format, int type, long image_buffer_offset) { - org.lwjgl.opengl.ARBImaging.glConvolutionFilter2D( - target, internalformat, width, height, format, type, image_buffer_offset); + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, + int type, long image_buffer_offset) { + org.lwjgl.opengl.ARBImaging + .glConvolutionFilter2D(target, internalformat, width, height, format, type, image_buffer_offset); } - public static void glConvolutionFilter2D( - int target, int internalformat, int width, int height, int format, int type, java.nio.ByteBuffer image) { + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, + int type, java.nio.ByteBuffer image) { org.lwjgl.opengl.ARBImaging.glConvolutionFilter2D(target, internalformat, width, height, format, type, image); } - public static void glConvolutionFilter2D( - int target, int internalformat, int width, int height, int format, int type, java.nio.IntBuffer image) { + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, + int type, java.nio.IntBuffer image) { org.lwjgl.opengl.ARBImaging.glConvolutionFilter2D( - target, internalformat, width, height, format, type, org.lwjglx.MemoryUtil.getAddress(image)); + target, + internalformat, + width, + height, + format, + type, + org.lwjglx.MemoryUtil.getAddress(image)); } - public static void glConvolutionFilter2D( - int target, int internalformat, int width, int height, int format, int type, java.nio.ShortBuffer image) { + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, + int type, java.nio.ShortBuffer image) { org.lwjgl.opengl.ARBImaging.glConvolutionFilter2D( - target, internalformat, width, height, format, type, org.lwjglx.MemoryUtil.getAddress(image)); + target, + internalformat, + width, + height, + format, + type, + org.lwjglx.MemoryUtil.getAddress(image)); } public static void glConvolutionParameter(int target, int pname, java.nio.FloatBuffer params) { @@ -263,26 +296,26 @@ public class ARBImaging { public static void glGetConvolutionFilter(int target, int format, int type, java.nio.DoubleBuffer image) { - org.lwjgl.opengl.ARBImaging.glGetConvolutionFilter( - target, format, type, org.lwjglx.MemoryUtil.getAddress(image)); + org.lwjgl.opengl.ARBImaging + .glGetConvolutionFilter(target, format, type, org.lwjglx.MemoryUtil.getAddress(image)); } public static void glGetConvolutionFilter(int target, int format, int type, java.nio.FloatBuffer image) { - org.lwjgl.opengl.ARBImaging.glGetConvolutionFilter( - target, format, type, org.lwjglx.MemoryUtil.getAddress(image)); + org.lwjgl.opengl.ARBImaging + .glGetConvolutionFilter(target, format, type, org.lwjglx.MemoryUtil.getAddress(image)); } public static void glGetConvolutionFilter(int target, int format, int type, java.nio.IntBuffer image) { - org.lwjgl.opengl.ARBImaging.glGetConvolutionFilter( - target, format, type, org.lwjglx.MemoryUtil.getAddress(image)); + org.lwjgl.opengl.ARBImaging + .glGetConvolutionFilter(target, format, type, org.lwjglx.MemoryUtil.getAddress(image)); } public static void glGetConvolutionFilter(int target, int format, int type, java.nio.ShortBuffer image) { - org.lwjgl.opengl.ARBImaging.glGetConvolutionFilter( - target, format, type, org.lwjglx.MemoryUtil.getAddress(image)); + org.lwjgl.opengl.ARBImaging + .glGetConvolutionFilter(target, format, type, org.lwjglx.MemoryUtil.getAddress(image)); } public static void glGetConvolutionParameter(int target, int pname, java.nio.FloatBuffer params) { @@ -303,26 +336,26 @@ public class ARBImaging { public static void glGetHistogram(int target, boolean reset, int format, int type, java.nio.DoubleBuffer values) { - org.lwjgl.opengl.ARBImaging.glGetHistogram( - target, reset, format, type, org.lwjglx.MemoryUtil.getAddress(values)); + org.lwjgl.opengl.ARBImaging + .glGetHistogram(target, reset, format, type, org.lwjglx.MemoryUtil.getAddress(values)); } public static void glGetHistogram(int target, boolean reset, int format, int type, java.nio.FloatBuffer values) { - org.lwjgl.opengl.ARBImaging.glGetHistogram( - target, reset, format, type, org.lwjglx.MemoryUtil.getAddress(values)); + org.lwjgl.opengl.ARBImaging + .glGetHistogram(target, reset, format, type, org.lwjglx.MemoryUtil.getAddress(values)); } public static void glGetHistogram(int target, boolean reset, int format, int type, java.nio.IntBuffer values) { - org.lwjgl.opengl.ARBImaging.glGetHistogram( - target, reset, format, type, org.lwjglx.MemoryUtil.getAddress(values)); + org.lwjgl.opengl.ARBImaging + .glGetHistogram(target, reset, format, type, org.lwjglx.MemoryUtil.getAddress(values)); } public static void glGetHistogram(int target, boolean reset, int format, int type, java.nio.ShortBuffer values) { - org.lwjgl.opengl.ARBImaging.glGetHistogram( - target, reset, format, type, org.lwjglx.MemoryUtil.getAddress(values)); + org.lwjgl.opengl.ARBImaging + .glGetHistogram(target, reset, format, type, org.lwjglx.MemoryUtil.getAddress(values)); } public static void glGetHistogramParameter(int target, int pname, java.nio.FloatBuffer params) { @@ -369,23 +402,13 @@ public class ARBImaging { org.lwjgl.opengl.ARBImaging.glGetMinmaxParameteriv(target, pname, params); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.ByteBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.ByteBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter(target, format, type, row, column, span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.ByteBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.ByteBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -398,13 +421,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.ByteBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.ByteBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -417,13 +435,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.ByteBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.ByteBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -436,13 +449,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.DoubleBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.DoubleBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -453,13 +461,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.DoubleBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.DoubleBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -472,13 +475,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.DoubleBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.DoubleBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -491,13 +489,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.DoubleBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.DoubleBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -510,13 +503,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.IntBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.IntBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -527,13 +515,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.IntBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.IntBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -546,13 +529,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.IntBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.IntBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -565,13 +543,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.IntBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.IntBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -584,13 +557,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.ShortBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.ShortBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -601,13 +569,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.ShortBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.ShortBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -620,13 +583,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.ShortBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.ShortBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -639,13 +597,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.ShortBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.ShortBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -658,13 +611,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.ByteBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.ByteBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -675,13 +623,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.ByteBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.ByteBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -694,13 +637,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.ByteBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.ByteBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -713,13 +651,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.ByteBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.ByteBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -732,13 +665,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.DoubleBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.DoubleBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -749,13 +677,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.DoubleBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.DoubleBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -768,13 +691,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.DoubleBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.DoubleBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -787,13 +705,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.DoubleBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.DoubleBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -806,13 +719,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.IntBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.IntBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -823,13 +731,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.IntBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.IntBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -842,13 +745,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.IntBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.IntBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -861,13 +759,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.IntBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.IntBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -880,13 +773,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.ShortBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.ShortBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -897,13 +785,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.ShortBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.ShortBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -916,13 +799,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.ShortBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.ShortBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -935,13 +813,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.ShortBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.DoubleBuffer row, + java.nio.ShortBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -954,13 +827,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.ByteBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.ByteBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -971,13 +839,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.ByteBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.ByteBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -990,13 +853,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.ByteBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.ByteBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1009,13 +867,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.ByteBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.ByteBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1028,13 +881,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.DoubleBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.DoubleBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -1045,13 +893,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.DoubleBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.DoubleBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1064,13 +907,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.DoubleBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.DoubleBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1083,13 +921,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.DoubleBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.DoubleBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1102,13 +935,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.IntBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.IntBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -1119,13 +947,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.IntBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.IntBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1138,13 +961,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.IntBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.IntBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1157,13 +975,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.IntBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.IntBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1176,13 +989,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.ShortBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.ShortBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -1193,13 +1001,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.ShortBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.ShortBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1212,13 +1015,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.ShortBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.ShortBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1231,13 +1029,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.ShortBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.FloatBuffer row, + java.nio.ShortBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1250,13 +1043,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.ByteBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.ByteBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -1267,13 +1055,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.ByteBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.ByteBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1286,13 +1069,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.ByteBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.ByteBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1305,13 +1083,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.ByteBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.ByteBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1324,13 +1097,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.DoubleBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.DoubleBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -1341,13 +1109,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.DoubleBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.DoubleBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1360,13 +1123,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.DoubleBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.DoubleBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1379,13 +1137,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.DoubleBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.DoubleBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1398,13 +1151,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.IntBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.IntBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -1415,13 +1163,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.IntBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.IntBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1434,13 +1177,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.IntBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.IntBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1453,13 +1191,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.IntBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.IntBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1472,13 +1205,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.ShortBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.ShortBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -1489,13 +1217,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.ShortBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.ShortBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1508,13 +1231,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.ShortBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.ShortBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1527,13 +1245,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.IntBuffer row, - java.nio.ShortBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.IntBuffer row, + java.nio.ShortBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1546,13 +1259,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.ByteBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.ByteBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -1563,13 +1271,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.ByteBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.ByteBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1582,13 +1285,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.ByteBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.ByteBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1601,13 +1299,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.ByteBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.ByteBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1620,13 +1313,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.DoubleBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.DoubleBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -1637,13 +1325,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.DoubleBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.DoubleBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1656,13 +1339,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.DoubleBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.DoubleBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1675,13 +1353,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.DoubleBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.DoubleBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1694,13 +1367,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.IntBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.IntBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -1711,13 +1379,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.IntBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.IntBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1730,13 +1393,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.IntBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.IntBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1749,13 +1407,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.IntBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.IntBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1768,13 +1421,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.ShortBuffer column, - java.nio.ByteBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.ShortBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( target, @@ -1785,13 +1433,8 @@ public class ARBImaging { span); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.ShortBuffer column, - java.nio.DoubleBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.ShortBuffer column, java.nio.DoubleBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1804,13 +1447,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.ShortBuffer column, - java.nio.IntBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.ShortBuffer column, java.nio.IntBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1823,13 +1461,8 @@ public class ARBImaging { me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(span, wrappedArg5); } - public static void glGetSeparableFilter( - int target, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.ShortBuffer column, - java.nio.ShortBuffer span) { + public static void glGetSeparableFilter(int target, int format, int type, java.nio.ShortBuffer row, + java.nio.ShortBuffer column, java.nio.ShortBuffer span) { final java.nio.ByteBuffer wrappedArg5 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(span); org.lwjgl.opengl.ARBImaging.glGetSeparableFilter( @@ -1858,41 +1491,27 @@ public class ARBImaging { org.lwjgl.opengl.ARBImaging.glResetMinmax(target); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - long row_buffer_offset, - long column_buffer_offset) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + long row_buffer_offset, long column_buffer_offset) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( - target, internalformat, width, height, format, type, row_buffer_offset, column_buffer_offset); + target, + internalformat, + width, + height, + format, + type, + row_buffer_offset, + column_buffer_offset); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.ByteBuffer column) { - org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( - target, internalformat, width, height, format, type, row, column); + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.ByteBuffer row, java.nio.ByteBuffer column) { + org.lwjgl.opengl.ARBImaging + .glSeparableFilter2D(target, internalformat, width, height, format, type, row, column); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.DoubleBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.ByteBuffer row, java.nio.DoubleBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -1905,15 +1524,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.FloatBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.ByteBuffer row, java.nio.FloatBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -1926,15 +1538,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.IntBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.ByteBuffer row, java.nio.IntBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -1947,15 +1552,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.ShortBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.ByteBuffer row, java.nio.ShortBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -1968,15 +1566,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.ByteBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.DoubleBuffer row, java.nio.ByteBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -1989,15 +1580,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.DoubleBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.DoubleBuffer row, java.nio.DoubleBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2010,15 +1594,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.FloatBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.DoubleBuffer row, java.nio.FloatBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2031,15 +1608,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.IntBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.DoubleBuffer row, java.nio.IntBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2052,15 +1622,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.DoubleBuffer row, - java.nio.ShortBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.DoubleBuffer row, java.nio.ShortBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2073,15 +1636,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.ByteBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.FloatBuffer row, java.nio.ByteBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2094,15 +1650,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.DoubleBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.FloatBuffer row, java.nio.DoubleBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2115,15 +1664,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.FloatBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.FloatBuffer row, java.nio.FloatBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2136,15 +1678,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.IntBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.FloatBuffer row, java.nio.IntBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2157,15 +1692,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.FloatBuffer row, - java.nio.ShortBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.FloatBuffer row, java.nio.ShortBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2178,15 +1706,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.IntBuffer row, - java.nio.ByteBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.IntBuffer row, java.nio.ByteBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2199,15 +1720,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.IntBuffer row, - java.nio.DoubleBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.IntBuffer row, java.nio.DoubleBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2220,15 +1734,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.IntBuffer row, - java.nio.FloatBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.IntBuffer row, java.nio.FloatBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2241,15 +1748,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.IntBuffer row, - java.nio.IntBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.IntBuffer row, java.nio.IntBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2262,15 +1762,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.IntBuffer row, - java.nio.ShortBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.IntBuffer row, java.nio.ShortBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2283,15 +1776,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.ByteBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.ShortBuffer row, java.nio.ByteBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2304,15 +1790,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.DoubleBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.ShortBuffer row, java.nio.DoubleBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2325,15 +1804,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.FloatBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.ShortBuffer row, java.nio.FloatBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2346,15 +1818,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.IntBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.ShortBuffer row, java.nio.IntBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, @@ -2367,15 +1832,8 @@ public class ARBImaging { org.lwjglx.MemoryUtil.getAddress(column)); } - public static void glSeparableFilter2D( - int target, - int internalformat, - int width, - int height, - int format, - int type, - java.nio.ShortBuffer row, - java.nio.ShortBuffer column) { + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, + java.nio.ShortBuffer row, java.nio.ShortBuffer column) { org.lwjgl.opengl.ARBImaging.glSeparableFilter2D( target, diff --git a/src/generated/java/org/lwjglx/opengl/ARBIndirectParameters.java b/src/generated/java/org/lwjglx/opengl/ARBIndirectParameters.java index 0c77955..013d760 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBIndirectParameters.java +++ b/src/generated/java/org/lwjglx/opengl/ARBIndirectParameters.java @@ -1,42 +1,48 @@ package org.lwjglx.opengl; public class ARBIndirectParameters { + public static final int GL_PARAMETER_BUFFER_ARB = (int) 33006; public static final int GL_PARAMETER_BUFFER_BINDING_ARB = (int) 33007; - public static void glMultiDrawArraysIndirectCountARB( - int mode, long indirect_buffer_offset, long drawcount, int maxdrawcount, int stride) { - org.lwjgl.opengl.ARBIndirectParameters.glMultiDrawArraysIndirectCountARB( - mode, indirect_buffer_offset, drawcount, maxdrawcount, stride); + public static void glMultiDrawArraysIndirectCountARB(int mode, long indirect_buffer_offset, long drawcount, + int maxdrawcount, int stride) { + org.lwjgl.opengl.ARBIndirectParameters + .glMultiDrawArraysIndirectCountARB(mode, indirect_buffer_offset, drawcount, maxdrawcount, stride); } - public static void glMultiDrawArraysIndirectCountARB( - int mode, java.nio.ByteBuffer indirect, long drawcount, int maxdrawcount, int stride) { - org.lwjgl.opengl.ARBIndirectParameters.glMultiDrawArraysIndirectCountARB( - mode, indirect, drawcount, maxdrawcount, stride); + public static void glMultiDrawArraysIndirectCountARB(int mode, java.nio.ByteBuffer indirect, long drawcount, + int maxdrawcount, int stride) { + org.lwjgl.opengl.ARBIndirectParameters + .glMultiDrawArraysIndirectCountARB(mode, indirect, drawcount, maxdrawcount, stride); } - public static void glMultiDrawArraysIndirectCountARB( - int mode, java.nio.IntBuffer indirect, long drawcount, int maxdrawcount, int stride) { - org.lwjgl.opengl.ARBIndirectParameters.glMultiDrawArraysIndirectCountARB( - mode, indirect, drawcount, maxdrawcount, stride); + public static void glMultiDrawArraysIndirectCountARB(int mode, java.nio.IntBuffer indirect, long drawcount, + int maxdrawcount, int stride) { + org.lwjgl.opengl.ARBIndirectParameters + .glMultiDrawArraysIndirectCountARB(mode, indirect, drawcount, maxdrawcount, stride); } - public static void glMultiDrawElementsIndirectCountARB( - int mode, int type, long indirect_buffer_offset, long drawcount, int maxdrawcount, int stride) { + public static void glMultiDrawElementsIndirectCountARB(int mode, int type, long indirect_buffer_offset, + long drawcount, int maxdrawcount, int stride) { org.lwjgl.opengl.ARBIndirectParameters.glMultiDrawElementsIndirectCountARB( - mode, type, indirect_buffer_offset, drawcount, maxdrawcount, stride); + mode, + type, + indirect_buffer_offset, + drawcount, + maxdrawcount, + stride); } - public static void glMultiDrawElementsIndirectCountARB( - int mode, int type, java.nio.ByteBuffer indirect, long drawcount, int maxdrawcount, int stride) { - org.lwjgl.opengl.ARBIndirectParameters.glMultiDrawElementsIndirectCountARB( - mode, type, indirect, drawcount, maxdrawcount, stride); + public static void glMultiDrawElementsIndirectCountARB(int mode, int type, java.nio.ByteBuffer indirect, + long drawcount, int maxdrawcount, int stride) { + org.lwjgl.opengl.ARBIndirectParameters + .glMultiDrawElementsIndirectCountARB(mode, type, indirect, drawcount, maxdrawcount, stride); } - public static void glMultiDrawElementsIndirectCountARB( - int mode, int type, java.nio.IntBuffer indirect, long drawcount, int maxdrawcount, int stride) { - org.lwjgl.opengl.ARBIndirectParameters.glMultiDrawElementsIndirectCountARB( - mode, type, indirect, drawcount, maxdrawcount, stride); + public static void glMultiDrawElementsIndirectCountARB(int mode, int type, java.nio.IntBuffer indirect, + long drawcount, int maxdrawcount, int stride) { + org.lwjgl.opengl.ARBIndirectParameters + .glMultiDrawElementsIndirectCountARB(mode, type, indirect, drawcount, maxdrawcount, stride); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBInstancedArrays.java b/src/generated/java/org/lwjglx/opengl/ARBInstancedArrays.java index b786f3f..1857ce7 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBInstancedArrays.java +++ b/src/generated/java/org/lwjglx/opengl/ARBInstancedArrays.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBInstancedArrays { + public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB = (int) 35070; public static void glVertexAttribDivisorARB(int index, int divisor) { diff --git a/src/generated/java/org/lwjglx/opengl/ARBInternalformatQuery.java b/src/generated/java/org/lwjglx/opengl/ARBInternalformatQuery.java index 9f60d92..a51471d 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBInternalformatQuery.java +++ b/src/generated/java/org/lwjglx/opengl/ARBInternalformatQuery.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBInternalformatQuery { + public static final int GL_NUM_SAMPLE_COUNTS = (int) 37760; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBInternalformatQuery2.java b/src/generated/java/org/lwjglx/opengl/ARBInternalformatQuery2.java index 13cb147..80f4195 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBInternalformatQuery2.java +++ b/src/generated/java/org/lwjglx/opengl/ARBInternalformatQuery2.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBInternalformatQuery2 { + public static final int GL_AUTO_GENERATE_MIPMAP = (int) 33429; public static final int GL_CAVEAT_SUPPORT = (int) 33464; public static final int GL_CLEAR_BUFFER = (int) 33460; diff --git a/src/generated/java/org/lwjglx/opengl/ARBInvalidateSubdata.java b/src/generated/java/org/lwjglx/opengl/ARBInvalidateSubdata.java index fe02460..a1a788e 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBInvalidateSubdata.java +++ b/src/generated/java/org/lwjglx/opengl/ARBInvalidateSubdata.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBInvalidateSubdata { + public static void glInvalidateBufferData(int buffer) { org.lwjgl.opengl.ARBInvalidateSubdata.glInvalidateBufferData(buffer); } @@ -13,8 +14,8 @@ public class ARBInvalidateSubdata { org.lwjgl.opengl.ARBInvalidateSubdata.glInvalidateFramebuffer(target, attachments); } - public static void glInvalidateSubFramebuffer( - int target, java.nio.IntBuffer attachments, int x, int y, int width, int height) { + public static void glInvalidateSubFramebuffer(int target, java.nio.IntBuffer attachments, int x, int y, int width, + int height) { org.lwjgl.opengl.ARBInvalidateSubdata.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); } @@ -22,9 +23,9 @@ public class ARBInvalidateSubdata { org.lwjgl.opengl.ARBInvalidateSubdata.glInvalidateTexImage(texture, level); } - public static void glInvalidateTexSubImage( - int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth) { - org.lwjgl.opengl.ARBInvalidateSubdata.glInvalidateTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth); + public static void glInvalidateTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth) { + org.lwjgl.opengl.ARBInvalidateSubdata + .glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBMapBufferAlignment.java b/src/generated/java/org/lwjglx/opengl/ARBMapBufferAlignment.java index 9810699..7b9597f 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBMapBufferAlignment.java +++ b/src/generated/java/org/lwjglx/opengl/ARBMapBufferAlignment.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBMapBufferAlignment { + public static final int GL_MIN_MAP_BUFFER_ALIGNMENT = (int) 37052; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBMapBufferRange.java b/src/generated/java/org/lwjglx/opengl/ARBMapBufferRange.java index 86574e4..460aa5d 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBMapBufferRange.java +++ b/src/generated/java/org/lwjglx/opengl/ARBMapBufferRange.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBMapBufferRange { + public static final int GL_MAP_FLUSH_EXPLICIT_BIT = (int) 16; public static final int GL_MAP_INVALIDATE_BUFFER_BIT = (int) 8; public static final int GL_MAP_INVALIDATE_RANGE_BIT = (int) 4; @@ -12,8 +13,8 @@ public class ARBMapBufferRange { org.lwjgl.opengl.ARBMapBufferRange.glFlushMappedBufferRange(target, offset, length); } - public static java.nio.ByteBuffer glMapBufferRange( - int target, long offset, long length, int access, java.nio.ByteBuffer old_buffer) { + public static java.nio.ByteBuffer glMapBufferRange(int target, long offset, long length, int access, + java.nio.ByteBuffer old_buffer) { return org.lwjgl.opengl.ARBMapBufferRange.glMapBufferRange(target, offset, length, access, old_buffer); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBMatrixPalette.java b/src/generated/java/org/lwjglx/opengl/ARBMatrixPalette.java index ea75e7f..85f0809 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBMatrixPalette.java +++ b/src/generated/java/org/lwjglx/opengl/ARBMatrixPalette.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBMatrixPalette { + public static final int GL_CURRENT_MATRIX_INDEX_ARB = (int) 34885; public static final int GL_CURRENT_PALETTE_MATRIX_ARB = (int) 34883; public static final int GL_MATRIX_INDEX_ARRAY_ARB = (int) 34884; diff --git a/src/generated/java/org/lwjglx/opengl/ARBMultiBind.java b/src/generated/java/org/lwjglx/opengl/ARBMultiBind.java index 5973f56..7cd26af 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBMultiBind.java +++ b/src/generated/java/org/lwjglx/opengl/ARBMultiBind.java @@ -1,3 +1,4 @@ package org.lwjglx.opengl; -public class ARBMultiBind {} +public class ARBMultiBind { +} diff --git a/src/generated/java/org/lwjglx/opengl/ARBMultiDrawIndirect.java b/src/generated/java/org/lwjglx/opengl/ARBMultiDrawIndirect.java index 80c946a..9cf411b 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBMultiDrawIndirect.java +++ b/src/generated/java/org/lwjglx/opengl/ARBMultiDrawIndirect.java @@ -1,9 +1,10 @@ package org.lwjglx.opengl; public class ARBMultiDrawIndirect { + public static void glMultiDrawArraysIndirect(int mode, long indirect_buffer_offset, int primcount, int stride) { - org.lwjgl.opengl.ARBMultiDrawIndirect.glMultiDrawArraysIndirect( - mode, indirect_buffer_offset, primcount, stride); + org.lwjgl.opengl.ARBMultiDrawIndirect + .glMultiDrawArraysIndirect(mode, indirect_buffer_offset, primcount, stride); } public static void glMultiDrawArraysIndirect(int mode, java.nio.ByteBuffer indirect, int primcount, int stride) { @@ -14,19 +15,19 @@ public class ARBMultiDrawIndirect { org.lwjgl.opengl.ARBMultiDrawIndirect.glMultiDrawArraysIndirect(mode, indirect, primcount, stride); } - public static void glMultiDrawElementsIndirect( - int mode, int type, long indirect_buffer_offset, int primcount, int stride) { - org.lwjgl.opengl.ARBMultiDrawIndirect.glMultiDrawElementsIndirect( - mode, type, indirect_buffer_offset, primcount, stride); + public static void glMultiDrawElementsIndirect(int mode, int type, long indirect_buffer_offset, int primcount, + int stride) { + org.lwjgl.opengl.ARBMultiDrawIndirect + .glMultiDrawElementsIndirect(mode, type, indirect_buffer_offset, primcount, stride); } - public static void glMultiDrawElementsIndirect( - int mode, int type, java.nio.ByteBuffer indirect, int primcount, int stride) { + public static void glMultiDrawElementsIndirect(int mode, int type, java.nio.ByteBuffer indirect, int primcount, + int stride) { org.lwjgl.opengl.ARBMultiDrawIndirect.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride); } - public static void glMultiDrawElementsIndirect( - int mode, int type, java.nio.IntBuffer indirect, int primcount, int stride) { + public static void glMultiDrawElementsIndirect(int mode, int type, java.nio.IntBuffer indirect, int primcount, + int stride) { org.lwjgl.opengl.ARBMultiDrawIndirect.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBMultisample.java b/src/generated/java/org/lwjglx/opengl/ARBMultisample.java index 606db55..4d99c5a 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBMultisample.java +++ b/src/generated/java/org/lwjglx/opengl/ARBMultisample.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBMultisample { + public static final int GL_MULTISAMPLE_ARB = (int) 32925; public static final int GL_MULTISAMPLE_BIT_ARB = (int) 536870912; public static final int GL_SAMPLES_ARB = (int) 32937; diff --git a/src/generated/java/org/lwjglx/opengl/ARBMultitexture.java b/src/generated/java/org/lwjglx/opengl/ARBMultitexture.java index cdcb5a2..feac6b4 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBMultitexture.java +++ b/src/generated/java/org/lwjglx/opengl/ARBMultitexture.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBMultitexture { + public static final int GL_ACTIVE_TEXTURE_ARB = (int) 34016; public static final int GL_CLIENT_ACTIVE_TEXTURE_ARB = (int) 34017; public static final int GL_MAX_TEXTURE_UNITS_ARB = (int) 34018; diff --git a/src/generated/java/org/lwjglx/opengl/ARBOcclusionQuery.java b/src/generated/java/org/lwjglx/opengl/ARBOcclusionQuery.java index d2746f5..ec08238 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBOcclusionQuery.java +++ b/src/generated/java/org/lwjglx/opengl/ARBOcclusionQuery.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBOcclusionQuery { + public static final int GL_CURRENT_QUERY_ARB = (int) 34917; public static final int GL_QUERY_COUNTER_BITS_ARB = (int) 34916; public static final int GL_QUERY_RESULT_ARB = (int) 34918; diff --git a/src/generated/java/org/lwjglx/opengl/ARBOcclusionQuery2.java b/src/generated/java/org/lwjglx/opengl/ARBOcclusionQuery2.java index 73e324b..fe996c1 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBOcclusionQuery2.java +++ b/src/generated/java/org/lwjglx/opengl/ARBOcclusionQuery2.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBOcclusionQuery2 { + public static final int GL_ANY_SAMPLES_PASSED = (int) 35887; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBPipelineStatisticsQuery.java b/src/generated/java/org/lwjglx/opengl/ARBPipelineStatisticsQuery.java index 3c91f8d..efe79ee 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBPipelineStatisticsQuery.java +++ b/src/generated/java/org/lwjglx/opengl/ARBPipelineStatisticsQuery.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBPipelineStatisticsQuery { + public static final int GL_CLIPPING_INPUT_PRIMITIVES_ARB = (int) 33526; public static final int GL_CLIPPING_OUTPUT_PRIMITIVES_ARB = (int) 33527; public static final int GL_COMPUTE_SHADER_INVOCATIONS_ARB = (int) 33525; diff --git a/src/generated/java/org/lwjglx/opengl/ARBPixelBufferObject.java b/src/generated/java/org/lwjglx/opengl/ARBPixelBufferObject.java index 5d56290..de66f24 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBPixelBufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/ARBPixelBufferObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBPixelBufferObject extends org.lwjglx.opengl.ARBBufferObject { + public static final int GL_PIXEL_PACK_BUFFER_ARB = (int) 35051; public static final int GL_PIXEL_PACK_BUFFER_BINDING_ARB = (int) 35053; public static final int GL_PIXEL_UNPACK_BUFFER_ARB = (int) 35052; diff --git a/src/generated/java/org/lwjglx/opengl/ARBPointParameters.java b/src/generated/java/org/lwjglx/opengl/ARBPointParameters.java index d9a746e..4207454 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBPointParameters.java +++ b/src/generated/java/org/lwjglx/opengl/ARBPointParameters.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBPointParameters { + public static final int GL_POINT_DISTANCE_ATTENUATION_ARB = (int) 33065; public static final int GL_POINT_FADE_THRESHOLD_SIZE_ARB = (int) 33064; public static final int GL_POINT_SIZE_MAX_ARB = (int) 33063; diff --git a/src/generated/java/org/lwjglx/opengl/ARBPointSprite.java b/src/generated/java/org/lwjglx/opengl/ARBPointSprite.java index 745c014..185bc0f 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBPointSprite.java +++ b/src/generated/java/org/lwjglx/opengl/ARBPointSprite.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBPointSprite { + public static final int GL_COORD_REPLACE_ARB = (int) 34914; public static final int GL_POINT_SPRITE_ARB = (int) 34913; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBProgramInterfaceQuery.java b/src/generated/java/org/lwjglx/opengl/ARBProgramInterfaceQuery.java index 7539c88..7d93880 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBProgramInterfaceQuery.java +++ b/src/generated/java/org/lwjglx/opengl/ARBProgramInterfaceQuery.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBProgramInterfaceQuery { + public static final int GL_ACTIVE_RESOURCES = (int) 37621; public static final int GL_ACTIVE_VARIABLES = (int) 37637; public static final int GL_ARRAY_SIZE = (int) 37627; @@ -69,25 +70,25 @@ public class ARBProgramInterfaceQuery { return org.lwjgl.opengl.ARBProgramInterfaceQuery.glGetProgramResourceLocation(program, programInterface, name); } - public static int glGetProgramResourceLocationIndex( - int program, int programInterface, java.lang.CharSequence name) { - return org.lwjgl.opengl.ARBProgramInterfaceQuery.glGetProgramResourceLocationIndex( - program, programInterface, name); + public static int glGetProgramResourceLocationIndex(int program, int programInterface, + java.lang.CharSequence name) { + return org.lwjgl.opengl.ARBProgramInterfaceQuery + .glGetProgramResourceLocationIndex(program, programInterface, name); } public static int glGetProgramResourceLocationIndex(int program, int programInterface, java.nio.ByteBuffer name) { - return org.lwjgl.opengl.ARBProgramInterfaceQuery.glGetProgramResourceLocationIndex( - program, programInterface, name); + return org.lwjgl.opengl.ARBProgramInterfaceQuery + .glGetProgramResourceLocationIndex(program, programInterface, name); } public static java.lang.String glGetProgramResourceName(int program, int programInterface, int index, int bufSize) { - return org.lwjgl.opengl.ARBProgramInterfaceQuery.glGetProgramResourceName( - program, programInterface, index, bufSize); + return org.lwjgl.opengl.ARBProgramInterfaceQuery + .glGetProgramResourceName(program, programInterface, index, bufSize); } - public static void glGetProgramResourceName( - int program, int programInterface, int index, java.nio.IntBuffer length, java.nio.ByteBuffer name) { - org.lwjgl.opengl.ARBProgramInterfaceQuery.glGetProgramResourceName( - program, programInterface, index, length, name); + public static void glGetProgramResourceName(int program, int programInterface, int index, java.nio.IntBuffer length, + java.nio.ByteBuffer name) { + org.lwjgl.opengl.ARBProgramInterfaceQuery + .glGetProgramResourceName(program, programInterface, index, length, name); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBProvokingVertex.java b/src/generated/java/org/lwjglx/opengl/ARBProvokingVertex.java index e147262..c89cd22 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBProvokingVertex.java +++ b/src/generated/java/org/lwjglx/opengl/ARBProvokingVertex.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBProvokingVertex { + public static final int GL_FIRST_VERTEX_CONVENTION = (int) 36429; public static final int GL_LAST_VERTEX_CONVENTION = (int) 36430; public static final int GL_PROVOKING_VERTEX = (int) 36431; diff --git a/src/generated/java/org/lwjglx/opengl/ARBQueryBufferObject.java b/src/generated/java/org/lwjglx/opengl/ARBQueryBufferObject.java index 63eb2d2..b6bc605 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBQueryBufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/ARBQueryBufferObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBQueryBufferObject { + public static final int GL_QUERY_BUFFER = (int) 37266; public static final int GL_QUERY_BUFFER_BARRIER_BIT = (int) 32768; public static final int GL_QUERY_BUFFER_BINDING = (int) 37267; diff --git a/src/generated/java/org/lwjglx/opengl/ARBRobustness.java b/src/generated/java/org/lwjglx/opengl/ARBRobustness.java index 30335c4..51b9991 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBRobustness.java +++ b/src/generated/java/org/lwjglx/opengl/ARBRobustness.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBRobustness { + public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB = (int) 4; public static final int GL_GUILTY_CONTEXT_RESET_ARB = (int) 33363; public static final int GL_INNOCENT_CONTEXT_RESET_ARB = (int) 33364; @@ -29,20 +30,20 @@ public class ARBRobustness { org.lwjgl.opengl.ARBRobustness.glGetnCompressedTexImageARB(target, lod, img); } - public static void glGetnConvolutionFilterARB( - int target, int format, int type, int image_bufSize, long image_buffer_offset) { - org.lwjgl.opengl.ARBRobustness.glGetnConvolutionFilterARB( - target, format, type, image_bufSize, image_buffer_offset); + public static void glGetnConvolutionFilterARB(int target, int format, int type, int image_bufSize, + long image_buffer_offset) { + org.lwjgl.opengl.ARBRobustness + .glGetnConvolutionFilterARB(target, format, type, image_bufSize, image_buffer_offset); } public static void glGetnConvolutionFilterARB(int target, int format, int type, java.nio.ByteBuffer image) { org.lwjgl.opengl.ARBRobustness.glGetnConvolutionFilterARB(target, format, type, image); } - public static void glGetnHistogramARB( - int target, boolean reset, int format, int type, int values_bufSize, long values_buffer_offset) { - org.lwjgl.opengl.ARBRobustness.glGetnHistogramARB( - target, reset, format, type, values_bufSize, values_buffer_offset); + public static void glGetnHistogramARB(int target, boolean reset, int format, int type, int values_bufSize, + long values_buffer_offset) { + org.lwjgl.opengl.ARBRobustness + .glGetnHistogramARB(target, reset, format, type, values_bufSize, values_buffer_offset); } public static void glGetnHistogramARB(int target, boolean reset, int format, int type, java.nio.ByteBuffer values) { @@ -61,10 +62,10 @@ public class ARBRobustness { org.lwjgl.opengl.ARBRobustness.glGetnMapivARB(target, query, v); } - public static void glGetnMinmaxARB( - int target, boolean reset, int format, int type, int values_bufSize, long values_buffer_offset) { - org.lwjgl.opengl.ARBRobustness.glGetnMinmaxARB( - target, reset, format, type, values_bufSize, values_buffer_offset); + public static void glGetnMinmaxARB(int target, boolean reset, int format, int type, int values_bufSize, + long values_buffer_offset) { + org.lwjgl.opengl.ARBRobustness + .glGetnMinmaxARB(target, reset, format, type, values_bufSize, values_buffer_offset); } public static void glGetnMinmaxARB(int target, boolean reset, int format, int type, java.nio.ByteBuffer values) { @@ -87,18 +88,13 @@ public class ARBRobustness { org.lwjgl.opengl.ARBRobustness.glGetnPolygonStippleARB(pattern); } - public static void glGetnSeparableFilterARB( - int target, - int format, - int type, - java.nio.ByteBuffer row, - java.nio.ByteBuffer column, - java.nio.ByteBuffer span) { + public static void glGetnSeparableFilterARB(int target, int format, int type, java.nio.ByteBuffer row, + java.nio.ByteBuffer column, java.nio.ByteBuffer span) { org.lwjgl.opengl.ARBRobustness.glGetnSeparableFilterARB(target, format, type, row, column, span); } - public static void glGetnTexImageARB( - int target, int level, int format, int type, int img_bufSize, long img_buffer_offset) { + public static void glGetnTexImageARB(int target, int level, int format, int type, int img_bufSize, + long img_buffer_offset) { org.lwjgl.opengl.ARBRobustness.glGetnTexImageARB(target, level, format, type, img_bufSize, img_buffer_offset); } @@ -138,29 +134,29 @@ public class ARBRobustness { org.lwjgl.opengl.ARBRobustness.glGetnUniformuivARB(program, location, params); } - public static void glReadnPixelsARB( - int x, int y, int width, int height, int format, int type, int data_bufSize, long data_buffer_offset) { - org.lwjgl.opengl.ARBRobustness.glReadnPixelsARB( - x, y, width, height, format, type, data_bufSize, data_buffer_offset); + public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, int data_bufSize, + long data_buffer_offset) { + org.lwjgl.opengl.ARBRobustness + .glReadnPixelsARB(x, y, width, height, format, type, data_bufSize, data_buffer_offset); } - public static void glReadnPixelsARB( - int x, int y, int width, int height, int format, int type, java.nio.ByteBuffer data) { + public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, + java.nio.ByteBuffer data) { org.lwjgl.opengl.ARBRobustness.glReadnPixelsARB(x, y, width, height, format, type, data); } - public static void glReadnPixelsARB( - int x, int y, int width, int height, int format, int type, java.nio.FloatBuffer data) { + public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, + java.nio.FloatBuffer data) { org.lwjgl.opengl.ARBRobustness.glReadnPixelsARB(x, y, width, height, format, type, data); } - public static void glReadnPixelsARB( - int x, int y, int width, int height, int format, int type, java.nio.IntBuffer data) { + public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, + java.nio.IntBuffer data) { org.lwjgl.opengl.ARBRobustness.glReadnPixelsARB(x, y, width, height, format, type, data); } - public static void glReadnPixelsARB( - int x, int y, int width, int height, int format, int type, java.nio.ShortBuffer data) { + public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, + java.nio.ShortBuffer data) { org.lwjgl.opengl.ARBRobustness.glReadnPixelsARB(x, y, width, height, format, type, data); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBSampleShading.java b/src/generated/java/org/lwjglx/opengl/ARBSampleShading.java index 493c023..418e579 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBSampleShading.java +++ b/src/generated/java/org/lwjglx/opengl/ARBSampleShading.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBSampleShading { + public static final int GL_MIN_SAMPLE_SHADING_VALUE_ARB = (int) 35895; public static final int GL_SAMPLE_SHADING_ARB = (int) 35894; diff --git a/src/generated/java/org/lwjglx/opengl/ARBSamplerObjects.java b/src/generated/java/org/lwjglx/opengl/ARBSamplerObjects.java index 53cb948..4542258 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBSamplerObjects.java +++ b/src/generated/java/org/lwjglx/opengl/ARBSamplerObjects.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBSamplerObjects { + public static final int GL_SAMPLER_BINDING = (int) 35097; public static void glBindSampler(int unit, int sampler) { diff --git a/src/generated/java/org/lwjglx/opengl/ARBSeamlessCubeMap.java b/src/generated/java/org/lwjglx/opengl/ARBSeamlessCubeMap.java index cfdacdf..6d0366d 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBSeamlessCubeMap.java +++ b/src/generated/java/org/lwjglx/opengl/ARBSeamlessCubeMap.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBSeamlessCubeMap { + public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = (int) 34895; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBSeamlessCubemapPerTexture.java b/src/generated/java/org/lwjglx/opengl/ARBSeamlessCubemapPerTexture.java index cbc3794..6694ef6 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBSeamlessCubemapPerTexture.java +++ b/src/generated/java/org/lwjglx/opengl/ARBSeamlessCubemapPerTexture.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBSeamlessCubemapPerTexture { + public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = (int) 34895; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBSeparateShaderObjects.java b/src/generated/java/org/lwjglx/opengl/ARBSeparateShaderObjects.java index 63f6d4e..0f1ab61 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBSeparateShaderObjects.java +++ b/src/generated/java/org/lwjglx/opengl/ARBSeparateShaderObjects.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBSeparateShaderObjects { + public static final int GL_ACTIVE_PROGRAM = (int) 33369; public static final int GL_ALL_SHADER_BITS = (int) -1; public static final int GL_FRAGMENT_SHADER_BIT = (int) 2; @@ -39,8 +40,8 @@ public class ARBSeparateShaderObjects { return org.lwjgl.opengl.ARBSeparateShaderObjects.glGetProgramPipelineInfoLog(pipeline, bufSize); } - public static void glGetProgramPipelineInfoLog( - int pipeline, java.nio.IntBuffer length, java.nio.ByteBuffer infoLog) { + public static void glGetProgramPipelineInfoLog(int pipeline, java.nio.IntBuffer length, + java.nio.ByteBuffer infoLog) { org.lwjgl.opengl.ARBSeparateShaderObjects.glGetProgramPipelineInfoLog(pipeline, length, infoLog); } diff --git a/src/generated/java/org/lwjglx/opengl/ARBShaderAtomicCounters.java b/src/generated/java/org/lwjglx/opengl/ARBShaderAtomicCounters.java index a60afe9..bacc015 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBShaderAtomicCounters.java +++ b/src/generated/java/org/lwjglx/opengl/ARBShaderAtomicCounters.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBShaderAtomicCounters { + public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = (int) 37593; public static final int GL_ATOMIC_COUNTER_BUFFER = (int) 37568; public static final int GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = (int) 37573; diff --git a/src/generated/java/org/lwjglx/opengl/ARBShaderImageLoadStore.java b/src/generated/java/org/lwjglx/opengl/ARBShaderImageLoadStore.java index d480a0b..84c91b8 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBShaderImageLoadStore.java +++ b/src/generated/java/org/lwjglx/opengl/ARBShaderImageLoadStore.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBShaderImageLoadStore { + public static final int GL_ALL_BARRIER_BITS = (int) -1; public static final int GL_ATOMIC_COUNTER_BARRIER_BIT = (int) 4096; public static final int GL_BUFFER_UPDATE_BARRIER_BIT = (int) 512; @@ -66,10 +67,10 @@ public class ARBShaderImageLoadStore { public static final int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = (int) 1; public static final int IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = (int) 37065; - public static void glBindImageTexture( - int unit, int texture, int level, boolean layered, int layer, int access, int format) { - org.lwjgl.opengl.ARBShaderImageLoadStore.glBindImageTexture( - unit, texture, level, layered, layer, access, format); + public static void glBindImageTexture(int unit, int texture, int level, boolean layered, int layer, int access, + int format) { + org.lwjgl.opengl.ARBShaderImageLoadStore + .glBindImageTexture(unit, texture, level, layered, layer, access, format); } public static void glMemoryBarrier(int barriers) { diff --git a/src/generated/java/org/lwjglx/opengl/ARBShaderObjects.java b/src/generated/java/org/lwjglx/opengl/ARBShaderObjects.java index 58b1ae9..cd59c25 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBShaderObjects.java +++ b/src/generated/java/org/lwjglx/opengl/ARBShaderObjects.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBShaderObjects { + public static final int GL_BOOL_ARB = (int) 35670; public static final int GL_BOOL_VEC2_ARB = (int) 35671; public static final int GL_BOOL_VEC3_ARB = (int) 35672; @@ -60,13 +61,8 @@ public class ARBShaderObjects { org.lwjgl.opengl.ARBShaderObjects.glDetachObjectARB(containerObj, attachedObj); } - public static void glGetActiveUniformARB( - int programObj, - int index, - java.nio.IntBuffer length, - java.nio.IntBuffer size, - java.nio.IntBuffer type, - java.nio.ByteBuffer name) { + public static void glGetActiveUniformARB(int programObj, int index, java.nio.IntBuffer length, + java.nio.IntBuffer size, java.nio.IntBuffer type, java.nio.ByteBuffer name) { org.lwjgl.opengl.ARBShaderObjects.glGetActiveUniformARB(programObj, index, length, size, type, name); } @@ -132,8 +128,8 @@ public class ARBShaderObjects { public static void glShaderSourceARB(int shader, java.nio.ByteBuffer string) { - org.lwjgl.opengl.ARBShaderObjects.glShaderSourceARB( - shader, me.eigenraven.lwjgl3ify.BufferCasts.bufferToCharSeq(string)); + org.lwjgl.opengl.ARBShaderObjects + .glShaderSourceARB(shader, me.eigenraven.lwjgl3ify.BufferCasts.bufferToCharSeq(string)); } public static void glShaderSourceARB(int shader, java.lang.CharSequence[] strings) { diff --git a/src/generated/java/org/lwjglx/opengl/ARBShaderStorageBufferObject.java b/src/generated/java/org/lwjglx/opengl/ARBShaderStorageBufferObject.java index f87f240..bbcab50 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBShaderStorageBufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/ARBShaderStorageBufferObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBShaderStorageBufferObject { + public static final int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = (int) 36665; public static final int GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = (int) 37084; public static final int GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = (int) 37083; @@ -19,7 +20,7 @@ public class ARBShaderStorageBufferObject { public static final int GL_SHADER_STORAGE_BUFFER_START = (int) 37076; public static void glShaderStorageBlockBinding(int program, int storageBlockIndex, int storageBlockBinding) { - org.lwjgl.opengl.ARBShaderStorageBufferObject.glShaderStorageBlockBinding( - program, storageBlockIndex, storageBlockBinding); + org.lwjgl.opengl.ARBShaderStorageBufferObject + .glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBShaderSubroutine.java b/src/generated/java/org/lwjglx/opengl/ARBShaderSubroutine.java index faf3a49..98d39f9 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBShaderSubroutine.java +++ b/src/generated/java/org/lwjglx/opengl/ARBShaderSubroutine.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBShaderSubroutine { + public static final int GL_ACTIVE_SUBROUTINES = (int) 36325; public static final int GL_ACTIVE_SUBROUTINE_MAX_LENGTH = (int) 36424; public static final int GL_ACTIVE_SUBROUTINE_UNIFORMS = (int) 36326; @@ -15,19 +16,19 @@ public class ARBShaderSubroutine { return org.lwjgl.opengl.ARBShaderSubroutine.glGetActiveSubroutineName(program, shadertype, index, bufsize); } - public static void glGetActiveSubroutineName( - int program, int shadertype, int index, java.nio.IntBuffer length, java.nio.ByteBuffer name) { + public static void glGetActiveSubroutineName(int program, int shadertype, int index, java.nio.IntBuffer length, + java.nio.ByteBuffer name) { org.lwjgl.opengl.ARBShaderSubroutine.glGetActiveSubroutineName(program, shadertype, index, length, name); } - public static java.lang.String glGetActiveSubroutineUniformName( - int program, int shadertype, int index, int bufsize) { - return org.lwjgl.opengl.ARBShaderSubroutine.glGetActiveSubroutineUniformName( - program, shadertype, index, bufsize); + public static java.lang.String glGetActiveSubroutineUniformName(int program, int shadertype, int index, + int bufsize) { + return org.lwjgl.opengl.ARBShaderSubroutine + .glGetActiveSubroutineUniformName(program, shadertype, index, bufsize); } - public static void glGetActiveSubroutineUniformName( - int program, int shadertype, int index, java.nio.IntBuffer length, java.nio.ByteBuffer name) { + public static void glGetActiveSubroutineUniformName(int program, int shadertype, int index, + java.nio.IntBuffer length, java.nio.ByteBuffer name) { org.lwjgl.opengl.ARBShaderSubroutine.glGetActiveSubroutineUniformName(program, shadertype, index, length, name); } diff --git a/src/generated/java/org/lwjglx/opengl/ARBShadingLanguage100.java b/src/generated/java/org/lwjglx/opengl/ARBShadingLanguage100.java index 09ed187..07747f9 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBShadingLanguage100.java +++ b/src/generated/java/org/lwjglx/opengl/ARBShadingLanguage100.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBShadingLanguage100 { + public static final int GL_SHADING_LANGUAGE_VERSION_ARB = (int) 35724; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBShadingLanguageInclude.java b/src/generated/java/org/lwjglx/opengl/ARBShadingLanguageInclude.java index 9fbd6cd..f31de7b 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBShadingLanguageInclude.java +++ b/src/generated/java/org/lwjglx/opengl/ARBShadingLanguageInclude.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBShadingLanguageInclude { + public static final int GL_NAMED_STRING_LENGTH_ARB = (int) 36329; public static final int GL_NAMED_STRING_TYPE_ARB = (int) 36330; public static final int GL_SHADER_INCLUDE_ARB = (int) 36270; @@ -17,8 +18,8 @@ public class ARBShadingLanguageInclude { return org.lwjgl.opengl.ARBShadingLanguageInclude.glGetNamedStringARB(name, bufSize); } - public static void glGetNamedStringARB( - java.lang.CharSequence name, java.nio.IntBuffer stringlen, java.nio.ByteBuffer string) { + public static void glGetNamedStringARB(java.lang.CharSequence name, java.nio.IntBuffer stringlen, + java.nio.ByteBuffer string) { org.lwjgl.opengl.ARBShadingLanguageInclude.glGetNamedStringARB(name, stringlen, string); } @@ -26,8 +27,8 @@ public class ARBShadingLanguageInclude { org.lwjgl.opengl.ARBShadingLanguageInclude.glGetNamedStringivARB(name, pname, params); } - public static void glGetNamedStringARB( - java.nio.ByteBuffer name, java.nio.IntBuffer stringlen, java.nio.ByteBuffer string) { + public static void glGetNamedStringARB(java.nio.ByteBuffer name, java.nio.IntBuffer stringlen, + java.nio.ByteBuffer string) { org.lwjgl.opengl.ARBShadingLanguageInclude.glGetNamedStringARB(name, stringlen, string); } diff --git a/src/generated/java/org/lwjglx/opengl/ARBShadow.java b/src/generated/java/org/lwjglx/opengl/ARBShadow.java index c3f5dd2..46bd5a3 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBShadow.java +++ b/src/generated/java/org/lwjglx/opengl/ARBShadow.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBShadow { + public static final int GL_COMPARE_R_TO_TEXTURE_ARB = (int) 34894; public static final int GL_TEXTURE_COMPARE_FUNC_ARB = (int) 34893; public static final int GL_TEXTURE_COMPARE_MODE_ARB = (int) 34892; diff --git a/src/generated/java/org/lwjglx/opengl/ARBShadowAmbient.java b/src/generated/java/org/lwjglx/opengl/ARBShadowAmbient.java index 614e38f..0cf9cce 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBShadowAmbient.java +++ b/src/generated/java/org/lwjglx/opengl/ARBShadowAmbient.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBShadowAmbient { + public static final int GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = (int) 32959; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBSparseBuffer.java b/src/generated/java/org/lwjglx/opengl/ARBSparseBuffer.java index 2024d15..c899777 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBSparseBuffer.java +++ b/src/generated/java/org/lwjglx/opengl/ARBSparseBuffer.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBSparseBuffer { + public static final int GL_SPARSE_BUFFER_PAGE_SIZE_ARB = (int) 33528; public static final int GL_SPARSE_STORAGE_BIT_ARB = (int) 1024; diff --git a/src/generated/java/org/lwjglx/opengl/ARBSparseTexture.java b/src/generated/java/org/lwjglx/opengl/ARBSparseTexture.java index 717c23f..56e64ae 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBSparseTexture.java +++ b/src/generated/java/org/lwjglx/opengl/ARBSparseTexture.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBSparseTexture { + public static final int GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB = (int) 37273; public static final int GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB = (int) 37274; public static final int GL_MAX_SPARSE_TEXTURE_SIZE_ARB = (int) 37272; @@ -13,17 +14,9 @@ public class ARBSparseTexture { public static final int GL_VIRTUAL_PAGE_SIZE_Y_ARB = (int) 37270; public static final int GL_VIRTUAL_PAGE_SIZE_Z_ARB = (int) 37271; - public static void glTexPageCommitmentARB( - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - boolean commit) { - org.lwjgl.opengl.ARBSparseTexture.glTexPageCommitmentARB( - target, level, xoffset, yoffset, zoffset, width, height, depth, commit); + public static void glTexPageCommitmentARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, boolean commit) { + org.lwjgl.opengl.ARBSparseTexture + .glTexPageCommitmentARB(target, level, xoffset, yoffset, zoffset, width, height, depth, commit); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBStencilTexturing.java b/src/generated/java/org/lwjglx/opengl/ARBStencilTexturing.java index 117ee98..7ec5bbc 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBStencilTexturing.java +++ b/src/generated/java/org/lwjglx/opengl/ARBStencilTexturing.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBStencilTexturing { + public static final int GL_DEPTH_STENCIL_TEXTURE_MODE = (int) 37098; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBSync.java b/src/generated/java/org/lwjglx/opengl/ARBSync.java index c667abd..a3a9bbf 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBSync.java +++ b/src/generated/java/org/lwjglx/opengl/ARBSync.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBSync { + public static final int GL_ALREADY_SIGNALED = (int) 37146; public static final int GL_CONDITION_SATISFIED = (int) 37148; public static final int GL_MAX_SERVER_WAIT_TIMEOUT = (int) 37137; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTessellationShader.java b/src/generated/java/org/lwjglx/opengl/ARBTessellationShader.java index 16f98e4..27ce994 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTessellationShader.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTessellationShader.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTessellationShader { + public static final int GL_FRACTIONAL_EVEN = (int) 36476; public static final int GL_FRACTIONAL_ODD = (int) 36475; public static final int GL_ISOLINES = (int) 36474; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureBarrier.java b/src/generated/java/org/lwjglx/opengl/ARBTextureBarrier.java index 0f820b6..116b20e 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureBarrier.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureBarrier.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureBarrier { + public static void glTextureBarrier() { org.lwjgl.opengl.ARBTextureBarrier.glTextureBarrier(); } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureBorderClamp.java b/src/generated/java/org/lwjglx/opengl/ARBTextureBorderClamp.java index 1ce3e40..0c28fc0 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureBorderClamp.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureBorderClamp.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBTextureBorderClamp { + public static final int GL_CLAMP_TO_BORDER_ARB = (int) 33069; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureBufferObject.java b/src/generated/java/org/lwjglx/opengl/ARBTextureBufferObject.java index 6bee78c..cf6ea86 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureBufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureBufferObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureBufferObject { + public static final int GL_MAX_TEXTURE_BUFFER_SIZE_ARB = (int) 35883; public static final int GL_TEXTURE_BINDING_BUFFER_ARB = (int) 35884; public static final int GL_TEXTURE_BUFFER_ARB = (int) 35882; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureBufferRange.java b/src/generated/java/org/lwjglx/opengl/ARBTextureBufferRange.java index 66c9557..dc840d4 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureBufferRange.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureBufferRange.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureBufferRange { + public static final int GL_TEXTURE_BUFFER_OFFSET = (int) 37277; public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = (int) 37279; public static final int GL_TEXTURE_BUFFER_SIZE = (int) 37278; @@ -9,9 +10,9 @@ public class ARBTextureBufferRange { org.lwjgl.opengl.ARBTextureBufferRange.glTexBufferRange(target, internalformat, buffer, offset, size); } - public static void glTextureBufferRangeEXT( - int texture, int target, int internalformat, int buffer, long offset, long size) { - org.lwjgl.opengl.ARBTextureBufferRange.glTextureBufferRangeEXT( - texture, target, internalformat, buffer, offset, size); + public static void glTextureBufferRangeEXT(int texture, int target, int internalformat, int buffer, long offset, + long size) { + org.lwjgl.opengl.ARBTextureBufferRange + .glTextureBufferRangeEXT(texture, target, internalformat, buffer, offset, size); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureCompression.java b/src/generated/java/org/lwjglx/opengl/ARBTextureCompression.java index 888cf43..b5aa10f 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureCompression.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureCompression.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureCompression { + public static final int GL_COMPRESSED_ALPHA_ARB = (int) 34025; public static final int GL_COMPRESSED_INTENSITY_ARB = (int) 34028; public static final int GL_COMPRESSED_LUMINANCE_ALPHA_ARB = (int) 34027; @@ -13,96 +14,85 @@ public class ARBTextureCompression { public static final int GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = (int) 34464; public static final int GL_TEXTURE_COMPRESSION_HINT_ARB = (int) 34031; - public static void glCompressedTexImage1DARB( - int target, - int level, - int internalformat, - int width, - int border, - int pData_imageSize, - long pData_buffer_offset) { + public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, + int pData_imageSize, long pData_buffer_offset) { org.lwjgl.opengl.ARBTextureCompression.glCompressedTexImage1DARB( - target, level, internalformat, width, border, pData_imageSize, pData_buffer_offset); + target, + level, + internalformat, + width, + border, + pData_imageSize, + pData_buffer_offset); } - public static void glCompressedTexImage2DARB( - int target, - int level, - int internalformat, - int width, - int height, - int border, - int pData_imageSize, - long pData_buffer_offset) { + public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, + int border, int pData_imageSize, long pData_buffer_offset) { org.lwjgl.opengl.ARBTextureCompression.glCompressedTexImage2DARB( - target, level, internalformat, width, height, border, pData_imageSize, pData_buffer_offset); + target, + level, + internalformat, + width, + height, + border, + pData_imageSize, + pData_buffer_offset); } - public static void glCompressedTexImage3DARB( - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int pData_imageSize, - long pData_buffer_offset) { + public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, + int depth, int border, int pData_imageSize, long pData_buffer_offset) { org.lwjgl.opengl.ARBTextureCompression.glCompressedTexImage3DARB( - target, level, internalformat, width, height, depth, border, pData_imageSize, pData_buffer_offset); + target, + level, + internalformat, + width, + height, + depth, + border, + pData_imageSize, + pData_buffer_offset); } - public static void glCompressedTexSubImage1DARB( - int target, int level, int xoffset, int width, int format, int pData_imageSize, long pData_buffer_offset) { + public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, + int pData_imageSize, long pData_buffer_offset) { org.lwjgl.opengl.ARBTextureCompression.glCompressedTexSubImage1DARB( - target, level, xoffset, width, format, pData_imageSize, pData_buffer_offset); + target, + level, + xoffset, + width, + format, + pData_imageSize, + pData_buffer_offset); } - public static void glCompressedTexSubImage1DARB( - int target, int level, int xoffset, int width, int format, java.nio.ByteBuffer pData) { - org.lwjgl.opengl.ARBTextureCompression.glCompressedTexSubImage1DARB( - target, level, xoffset, width, format, pData); - } - - public static void glCompressedTexSubImage2DARB( - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int pData_imageSize, - long pData_buffer_offset) { - org.lwjgl.opengl.ARBTextureCompression.glCompressedTexSubImage2DARB( - target, level, xoffset, yoffset, width, height, format, pData_imageSize, pData_buffer_offset); - } - - public static void glCompressedTexSubImage2DARB( - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, + public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, java.nio.ByteBuffer pData) { - org.lwjgl.opengl.ARBTextureCompression.glCompressedTexSubImage2DARB( - target, level, xoffset, yoffset, width, height, format, pData); + org.lwjgl.opengl.ARBTextureCompression + .glCompressedTexSubImage1DARB(target, level, xoffset, width, format, pData); } - public static void glCompressedTexSubImage3DARB( - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int pData_imageSize, - long pData_buffer_offset) { + public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, + int height, int format, int pData_imageSize, long pData_buffer_offset) { + org.lwjgl.opengl.ARBTextureCompression.glCompressedTexSubImage2DARB( + target, + level, + xoffset, + yoffset, + width, + height, + format, + pData_imageSize, + pData_buffer_offset); + } + + public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, + int height, int format, java.nio.ByteBuffer pData) { + org.lwjgl.opengl.ARBTextureCompression + .glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, pData); + } + + public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, int pData_imageSize, long pData_buffer_offset) { org.lwjgl.opengl.ARBTextureCompression.glCompressedTexSubImage3DARB( target, level, @@ -117,19 +107,19 @@ public class ARBTextureCompression { pData_buffer_offset); } - public static void glCompressedTexSubImage3DARB( - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - java.nio.ByteBuffer pData) { + public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, java.nio.ByteBuffer pData) { org.lwjgl.opengl.ARBTextureCompression.glCompressedTexSubImage3DARB( - target, level, xoffset, yoffset, zoffset, width, height, depth, format, pData); + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + pData); } public static void glGetCompressedTexImageARB(int target, int lod, long pImg_buffer_offset) { diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureCompressionBPTC.java b/src/generated/java/org/lwjglx/opengl/ARBTextureCompressionBPTC.java index 7e749a8..ffd94d1 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureCompressionBPTC.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureCompressionBPTC.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureCompressionBPTC { + public static final int GL_COMPRESSED_RGBA_BPTC_UNORM_ARB = (int) 36492; public static final int GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB = (int) 36494; public static final int GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB = (int) 36495; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureCompressionRGTC.java b/src/generated/java/org/lwjglx/opengl/ARBTextureCompressionRGTC.java index 562de15..21baa30 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureCompressionRGTC.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureCompressionRGTC.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureCompressionRGTC { + public static final int GL_COMPRESSED_RED_RGTC1 = (int) 36283; public static final int GL_COMPRESSED_RG_RGTC2 = (int) 36285; public static final int GL_COMPRESSED_SIGNED_RED_RGTC1 = (int) 36284; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureCubeMap.java b/src/generated/java/org/lwjglx/opengl/ARBTextureCubeMap.java index f56e996..5b2ff58 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureCubeMap.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureCubeMap.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureCubeMap { + public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = (int) 34076; public static final int GL_NORMAL_MAP_ARB = (int) 34065; public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARB = (int) 34075; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureCubeMapArray.java b/src/generated/java/org/lwjglx/opengl/ARBTextureCubeMapArray.java index 4118158..4f1e4f4 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureCubeMapArray.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureCubeMapArray.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureCubeMapArray { + public static final int GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = (int) 36878; public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB = (int) 36875; public static final int GL_SAMPLER_CUBE_MAP_ARRAY_ARB = (int) 36876; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureEnvCombine.java b/src/generated/java/org/lwjglx/opengl/ARBTextureEnvCombine.java index 2325ff6..202ac91 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureEnvCombine.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureEnvCombine.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureEnvCombine { + public static final int GL_ADD_SIGNED_ARB = (int) 34164; public static final int GL_COMBINE_ALPHA_ARB = (int) 34162; public static final int GL_COMBINE_ARB = (int) 34160; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureEnvDot3.java b/src/generated/java/org/lwjglx/opengl/ARBTextureEnvDot3.java index 53abe6a..27e0aad 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureEnvDot3.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureEnvDot3.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureEnvDot3 { + public static final int GL_DOT3_RGBA_ARB = (int) 34479; public static final int GL_DOT3_RGB_ARB = (int) 34478; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureFloat.java b/src/generated/java/org/lwjglx/opengl/ARBTextureFloat.java index 221c4ef..5d1d91b 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureFloat.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureFloat.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureFloat { + public static final int GL_ALPHA16F_ARB = (int) 34844; public static final int GL_ALPHA32F_ARB = (int) 34838; public static final int GL_INTENSITY16F_ARB = (int) 34845; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureGather.java b/src/generated/java/org/lwjglx/opengl/ARBTextureGather.java index 200b568..626e463 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureGather.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureGather.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureGather { + public static final int GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = (int) 36767; public static final int GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = (int) 36447; public static final int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = (int) 36446; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureMirrorClampToEdge.java b/src/generated/java/org/lwjglx/opengl/ARBTextureMirrorClampToEdge.java index c0318cf..ec7e561 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureMirrorClampToEdge.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureMirrorClampToEdge.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBTextureMirrorClampToEdge { + public static final int GL_MIRROR_CLAMP_TO_EDGE = (int) 34627; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureMirroredRepeat.java b/src/generated/java/org/lwjglx/opengl/ARBTextureMirroredRepeat.java index 0918af1..987a4e2 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureMirroredRepeat.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureMirroredRepeat.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBTextureMirroredRepeat { + public static final int GL_MIRRORED_REPEAT_ARB = (int) 33648; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureMultisample.java b/src/generated/java/org/lwjglx/opengl/ARBTextureMultisample.java index 309acc2..b69ca0b 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureMultisample.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureMultisample.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureMultisample { + public static final int GL_INT_SAMPLER_2D_MULTISAMPLE = (int) 37129; public static final int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = (int) 37132; public static final int GL_MAX_COLOR_TEXTURE_SAMPLES = (int) 37134; @@ -27,21 +28,15 @@ public class ARBTextureMultisample { org.lwjgl.opengl.ARBTextureMultisample.glSampleMaski(index, mask); } - public static void glTexImage2DMultisample( - int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { - org.lwjgl.opengl.ARBTextureMultisample.glTexImage2DMultisample( - target, samples, internalformat, width, height, fixedsamplelocations); + public static void glTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, + boolean fixedsamplelocations) { + org.lwjgl.opengl.ARBTextureMultisample + .glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); } - public static void glTexImage3DMultisample( - int target, - int samples, - int internalformat, - int width, - int height, - int depth, - boolean fixedsamplelocations) { - org.lwjgl.opengl.ARBTextureMultisample.glTexImage3DMultisample( - target, samples, internalformat, width, height, depth, fixedsamplelocations); + public static void glTexImage3DMultisample(int target, int samples, int internalformat, int width, int height, + int depth, boolean fixedsamplelocations) { + org.lwjgl.opengl.ARBTextureMultisample + .glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureRGB10_A2UI.java b/src/generated/java/org/lwjglx/opengl/ARBTextureRGB10_A2UI.java index c3ae9fc..c5d0906 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureRGB10_A2UI.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureRGB10_A2UI.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ARBTextureRGB10_A2UI { + public static final int GL_RGB10_A2UI = (int) 36975; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureRectangle.java b/src/generated/java/org/lwjglx/opengl/ARBTextureRectangle.java index 40a32e8..18ee048 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureRectangle.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureRectangle.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureRectangle { + public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB = (int) 34040; public static final int GL_PROXY_TEXTURE_RECTANGLE_ARB = (int) 34039; public static final int GL_SAMPLER_2D_RECT_ARB = (int) 35683; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureStorage.java b/src/generated/java/org/lwjglx/opengl/ARBTextureStorage.java index f06cf0c..0cf084f 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureStorage.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureStorage.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureStorage { + public static final int GL_TEXTURE_IMMUTABLE_FORMAT = (int) 37167; public static void glTexStorage1D(int target, int levels, int internalformat, int width) { @@ -19,15 +20,15 @@ public class ARBTextureStorage { org.lwjgl.opengl.ARBTextureStorage.glTextureStorage1DEXT(texture, target, levels, internalformat, width); } - public static void glTextureStorage2DEXT( - int texture, int target, int levels, int internalformat, int width, int height) { - org.lwjgl.opengl.ARBTextureStorage.glTextureStorage2DEXT( - texture, target, levels, internalformat, width, height); + public static void glTextureStorage2DEXT(int texture, int target, int levels, int internalformat, int width, + int height) { + org.lwjgl.opengl.ARBTextureStorage + .glTextureStorage2DEXT(texture, target, levels, internalformat, width, height); } - public static void glTextureStorage3DEXT( - int texture, int target, int levels, int internalformat, int width, int height, int depth) { - org.lwjgl.opengl.ARBTextureStorage.glTextureStorage3DEXT( - texture, target, levels, internalformat, width, height, depth); + public static void glTextureStorage3DEXT(int texture, int target, int levels, int internalformat, int width, + int height, int depth) { + org.lwjgl.opengl.ARBTextureStorage + .glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureStorageMultisample.java b/src/generated/java/org/lwjglx/opengl/ARBTextureStorageMultisample.java index 533a762..b5c503e 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureStorageMultisample.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureStorageMultisample.java @@ -1,46 +1,41 @@ package org.lwjglx.opengl; public class ARBTextureStorageMultisample { - public static void glTexStorage2DMultisample( - int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { - org.lwjgl.opengl.ARBTextureStorageMultisample.glTexStorage2DMultisample( - target, samples, internalformat, width, height, fixedsamplelocations); + + public static void glTexStorage2DMultisample(int target, int samples, int internalformat, int width, int height, + boolean fixedsamplelocations) { + org.lwjgl.opengl.ARBTextureStorageMultisample + .glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); } - public static void glTexStorage3DMultisample( - int target, - int samples, - int internalformat, - int width, - int height, - int depth, - boolean fixedsamplelocations) { - org.lwjgl.opengl.ARBTextureStorageMultisample.glTexStorage3DMultisample( - target, samples, internalformat, width, height, depth, fixedsamplelocations); + public static void glTexStorage3DMultisample(int target, int samples, int internalformat, int width, int height, + int depth, boolean fixedsamplelocations) { + org.lwjgl.opengl.ARBTextureStorageMultisample + .glTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); } - public static void glTextureStorage2DMultisampleEXT( - int texture, - int target, - int samples, - int internalformat, - int width, - int height, - boolean fixedsamplelocations) { + public static void glTextureStorage2DMultisampleEXT(int texture, int target, int samples, int internalformat, + int width, int height, boolean fixedsamplelocations) { org.lwjgl.opengl.ARBTextureStorageMultisample.glTextureStorage2DMultisampleEXT( - texture, target, samples, internalformat, width, height, fixedsamplelocations); + texture, + target, + samples, + internalformat, + width, + height, + fixedsamplelocations); } - public static void glTextureStorage3DMultisampleEXT( - int texture, - int target, - int samples, - int internalformat, - int width, - int height, - int depth, - boolean fixedsamplelocations) { + public static void glTextureStorage3DMultisampleEXT(int texture, int target, int samples, int internalformat, + int width, int height, int depth, boolean fixedsamplelocations) { org.lwjgl.opengl.ARBTextureStorageMultisample.glTextureStorage3DMultisampleEXT( - texture, target, samples, internalformat, width, height, depth, fixedsamplelocations); + texture, + target, + samples, + internalformat, + width, + height, + depth, + fixedsamplelocations); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureSwizzle.java b/src/generated/java/org/lwjglx/opengl/ARBTextureSwizzle.java index 5eeb6b5..7b58d9d 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureSwizzle.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureSwizzle.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTextureSwizzle { + public static final int GL_TEXTURE_SWIZZLE_A = (int) 36421; public static final int GL_TEXTURE_SWIZZLE_B = (int) 36420; public static final int GL_TEXTURE_SWIZZLE_G = (int) 36419; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTextureView.java b/src/generated/java/org/lwjglx/opengl/ARBTextureView.java index e6c134b..c72babc 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTextureView.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTextureView.java @@ -1,22 +1,16 @@ package org.lwjglx.opengl; public class ARBTextureView { + public static final int GL_TEXTURE_IMMUTABLE_LEVELS = (int) 33503; public static final int GL_TEXTURE_VIEW_MIN_LAYER = (int) 33501; public static final int GL_TEXTURE_VIEW_MIN_LEVEL = (int) 33499; public static final int GL_TEXTURE_VIEW_NUM_LAYERS = (int) 33502; public static final int GL_TEXTURE_VIEW_NUM_LEVELS = (int) 33500; - public static void glTextureView( - int texture, - int target, - int origtexture, - int internalformat, - int minlevel, - int numlevels, - int minlayer, - int numlayers) { - org.lwjgl.opengl.ARBTextureView.glTextureView( - texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); + public static void glTextureView(int texture, int target, int origtexture, int internalformat, int minlevel, + int numlevels, int minlayer, int numlayers) { + org.lwjgl.opengl.ARBTextureView + .glTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTimerQuery.java b/src/generated/java/org/lwjglx/opengl/ARBTimerQuery.java index 9d97591..521ecf2 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTimerQuery.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTimerQuery.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTimerQuery { + public static final int GL_TIMESTAMP = (int) 36392; public static final int GL_TIME_ELAPSED = (int) 35007; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTransformFeedback2.java b/src/generated/java/org/lwjglx/opengl/ARBTransformFeedback2.java index 37b39e7..c74f509 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTransformFeedback2.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTransformFeedback2.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTransformFeedback2 { + public static final int GL_TRANSFORM_FEEDBACK = (int) 36386; public static final int GL_TRANSFORM_FEEDBACK_BINDING = (int) 36389; public static final int GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = (int) 36388; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTransformFeedback3.java b/src/generated/java/org/lwjglx/opengl/ARBTransformFeedback3.java index bc73e13..bcf2da6 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTransformFeedback3.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTransformFeedback3.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTransformFeedback3 { + public static final int GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = (int) 36464; public static final int GL_MAX_VERTEX_STREAMS = (int) 36465; diff --git a/src/generated/java/org/lwjglx/opengl/ARBTransformFeedbackInstanced.java b/src/generated/java/org/lwjglx/opengl/ARBTransformFeedbackInstanced.java index e9d99c3..89969db 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTransformFeedbackInstanced.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTransformFeedbackInstanced.java @@ -1,12 +1,13 @@ package org.lwjglx.opengl; public class ARBTransformFeedbackInstanced { + public static void glDrawTransformFeedbackInstanced(int mode, int id, int primcount) { org.lwjgl.opengl.ARBTransformFeedbackInstanced.glDrawTransformFeedbackInstanced(mode, id, primcount); } public static void glDrawTransformFeedbackStreamInstanced(int mode, int id, int stream, int primcount) { - org.lwjgl.opengl.ARBTransformFeedbackInstanced.glDrawTransformFeedbackStreamInstanced( - mode, id, stream, primcount); + org.lwjgl.opengl.ARBTransformFeedbackInstanced + .glDrawTransformFeedbackStreamInstanced(mode, id, stream, primcount); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTransformFeedbackOverflowQuery.java b/src/generated/java/org/lwjglx/opengl/ARBTransformFeedbackOverflowQuery.java index 2426560..f17703c 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTransformFeedbackOverflowQuery.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTransformFeedbackOverflowQuery.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTransformFeedbackOverflowQuery { + public static final int GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB = (int) 33516; public static final int GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB = (int) 33517; } diff --git a/src/generated/java/org/lwjglx/opengl/ARBTransposeMatrix.java b/src/generated/java/org/lwjglx/opengl/ARBTransposeMatrix.java index 48711ce..ed3b256 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBTransposeMatrix.java +++ b/src/generated/java/org/lwjglx/opengl/ARBTransposeMatrix.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBTransposeMatrix { + public static final int GL_TRANSPOSE_COLOR_MATRIX_ARB = (int) 34022; public static final int GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = (int) 34019; public static final int GL_TRANSPOSE_PROJECTION_MATRIX_ARB = (int) 34020; diff --git a/src/generated/java/org/lwjglx/opengl/ARBUniformBufferObject.java b/src/generated/java/org/lwjglx/opengl/ARBUniformBufferObject.java index 8cd0ea3..64ded7f 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBUniformBufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/ARBUniformBufferObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBUniformBufferObject { + public static final int GL_ACTIVE_UNIFORM_BLOCKS = (int) 35382; public static final int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = (int) 35381; public static final int GL_INVALID_INDEX = (int) -1; @@ -47,10 +48,10 @@ public class ARBUniformBufferObject { return org.lwjgl.opengl.ARBUniformBufferObject.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize); } - public static void glGetActiveUniformBlockName( - int program, int uniformBlockIndex, java.nio.IntBuffer length, java.nio.ByteBuffer uniformBlockName) { - org.lwjgl.opengl.ARBUniformBufferObject.glGetActiveUniformBlockName( - program, uniformBlockIndex, length, uniformBlockName); + public static void glGetActiveUniformBlockName(int program, int uniformBlockIndex, java.nio.IntBuffer length, + java.nio.ByteBuffer uniformBlockName) { + org.lwjgl.opengl.ARBUniformBufferObject + .glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName); } public static int glGetActiveUniformBlocki(int program, int uniformBlockIndex, int pname) { @@ -61,8 +62,8 @@ public class ARBUniformBufferObject { return org.lwjgl.opengl.ARBUniformBufferObject.glGetActiveUniformName(program, uniformIndex, bufSize); } - public static void glGetActiveUniformName( - int program, int uniformIndex, java.nio.IntBuffer length, java.nio.ByteBuffer uniformName) { + public static void glGetActiveUniformName(int program, int uniformIndex, java.nio.IntBuffer length, + java.nio.ByteBuffer uniformName) { org.lwjgl.opengl.ARBUniformBufferObject.glGetActiveUniformName(program, uniformIndex, length, uniformName); } @@ -78,8 +79,8 @@ public class ARBUniformBufferObject { return org.lwjgl.opengl.ARBUniformBufferObject.glGetUniformBlockIndex(program, uniformBlockName); } - public static void glGetUniformIndices( - int program, java.lang.CharSequence[] uniformNames, java.nio.IntBuffer uniformIndices) { + public static void glGetUniformIndices(int program, java.lang.CharSequence[] uniformNames, + java.nio.IntBuffer uniformIndices) { org.lwjgl.opengl.ARBUniformBufferObject.glGetUniformIndices(program, uniformNames, uniformIndices); } diff --git a/src/generated/java/org/lwjglx/opengl/ARBVertexArrayObject.java b/src/generated/java/org/lwjglx/opengl/ARBVertexArrayObject.java index 506ac95..e303e94 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBVertexArrayObject.java +++ b/src/generated/java/org/lwjglx/opengl/ARBVertexArrayObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBVertexArrayObject { + public static final int GL_VERTEX_ARRAY_BINDING = (int) 34229; public static void glBindVertexArray(int array) { diff --git a/src/generated/java/org/lwjglx/opengl/ARBVertexAttribBinding.java b/src/generated/java/org/lwjglx/opengl/ARBVertexAttribBinding.java index 3e3d9dc..2b10f17 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBVertexAttribBinding.java +++ b/src/generated/java/org/lwjglx/opengl/ARBVertexAttribBinding.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBVertexAttribBinding { + public static final int GL_MAX_VERTEX_ATTRIB_BINDINGS = (int) 33498; public static final int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = (int) 33497; public static final int GL_VERTEX_ATTRIB_BINDING = (int) 33492; @@ -17,10 +18,10 @@ public class ARBVertexAttribBinding { org.lwjgl.opengl.ARBVertexAttribBinding.glVertexAttribBinding(attribindex, bindingindex); } - public static void glVertexAttribFormat( - int attribindex, int size, int type, boolean normalized, int relativeoffset) { - org.lwjgl.opengl.ARBVertexAttribBinding.glVertexAttribFormat( - attribindex, size, type, normalized, relativeoffset); + public static void glVertexAttribFormat(int attribindex, int size, int type, boolean normalized, + int relativeoffset) { + org.lwjgl.opengl.ARBVertexAttribBinding + .glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); } public static void glVertexAttribIFormat(int attribindex, int size, int type, int relativeoffset) { diff --git a/src/generated/java/org/lwjglx/opengl/ARBVertexBlend.java b/src/generated/java/org/lwjglx/opengl/ARBVertexBlend.java index 55b3cf0..eea23f8 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBVertexBlend.java +++ b/src/generated/java/org/lwjglx/opengl/ARBVertexBlend.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBVertexBlend { + public static final int GL_ACTIVE_VERTEX_UNITS_ARB = (int) 34469; public static final int GL_CURRENT_WEIGHT_ARB = (int) 34472; public static final int GL_MAX_VERTEX_UNITS_ARB = (int) 34468; diff --git a/src/generated/java/org/lwjglx/opengl/ARBVertexBufferObject.java b/src/generated/java/org/lwjglx/opengl/ARBVertexBufferObject.java index a7c8b0c..36de01a 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBVertexBufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/ARBVertexBufferObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBVertexBufferObject extends org.lwjglx.opengl.ARBBufferObject { + public static final int GL_ARRAY_BUFFER_ARB = (int) 34962; public static final int GL_ARRAY_BUFFER_BINDING_ARB = (int) 34964; public static final int GL_COLOR_ARRAY_BUFFER_BINDING_ARB = (int) 34968; diff --git a/src/generated/java/org/lwjglx/opengl/ARBVertexProgram.java b/src/generated/java/org/lwjglx/opengl/ARBVertexProgram.java index 0ac6c6a..27fa01c 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBVertexProgram.java +++ b/src/generated/java/org/lwjglx/opengl/ARBVertexProgram.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBVertexProgram extends org.lwjglx.opengl.ARBProgram { + public static final int GL_COLOR_SUM_ARB = (int) 33880; public static final int GL_CURRENT_VERTEX_ATTRIB_ARB = (int) 34342; public static final int GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = (int) 34993; @@ -78,9 +79,9 @@ public class ARBVertexProgram extends org.lwjglx.opengl.ARBProgram { org.lwjgl.opengl.ARBVertexProgram.glVertexAttrib4sARB(index, x, y, z, w); } - public static void glVertexAttribPointerARB( - int index, int size, int type, boolean normalized, int stride, long buffer_buffer_offset) { - org.lwjgl.opengl.ARBVertexProgram.glVertexAttribPointerARB( - index, size, type, normalized, stride, buffer_buffer_offset); + public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, + long buffer_buffer_offset) { + org.lwjgl.opengl.ARBVertexProgram + .glVertexAttribPointerARB(index, size, type, normalized, stride, buffer_buffer_offset); } } diff --git a/src/generated/java/org/lwjglx/opengl/ARBVertexShader.java b/src/generated/java/org/lwjglx/opengl/ARBVertexShader.java index 616fa49..ca07e30 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBVertexShader.java +++ b/src/generated/java/org/lwjglx/opengl/ARBVertexShader.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBVertexShader { + public static final int GL_CURRENT_VERTEX_ATTRIB_ARB = (int) 34342; public static final int GL_FLOAT_MAT2_ARB = (int) 35674; public static final int GL_FLOAT_MAT3_ARB = (int) 35675; @@ -43,13 +44,8 @@ public class ARBVertexShader { org.lwjgl.opengl.ARBVertexShader.glEnableVertexAttribArrayARB(index); } - public static void glGetActiveAttribARB( - int programObj, - int index, - java.nio.IntBuffer length, - java.nio.IntBuffer size, - java.nio.IntBuffer type, - java.nio.ByteBuffer name) { + public static void glGetActiveAttribARB(int programObj, int index, java.nio.IntBuffer length, + java.nio.IntBuffer size, java.nio.IntBuffer type, java.nio.ByteBuffer name) { org.lwjgl.opengl.ARBVertexShader.glGetActiveAttribARB(programObj, index, length, size, type, name); } @@ -125,19 +121,19 @@ public class ARBVertexShader { org.lwjgl.opengl.ARBVertexShader.glVertexAttrib4sARB(index, v0, v1, v2, v3); } - public static void glVertexAttribPointerARB( - int index, int size, int type, boolean normalized, int stride, long buffer_buffer_offset) { - org.lwjgl.opengl.ARBVertexShader.glVertexAttribPointerARB( - index, size, type, normalized, stride, buffer_buffer_offset); + public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, + long buffer_buffer_offset) { + org.lwjgl.opengl.ARBVertexShader + .glVertexAttribPointerARB(index, size, type, normalized, stride, buffer_buffer_offset); } - public static void glVertexAttribPointerARB( - int index, int size, int type, boolean normalized, int stride, java.nio.ByteBuffer buffer) { + public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, + java.nio.ByteBuffer buffer) { org.lwjgl.opengl.ARBVertexShader.glVertexAttribPointerARB(index, size, type, normalized, stride, buffer); } - public static void glVertexAttribPointerARB( - int index, int size, boolean normalized, int stride, java.nio.DoubleBuffer buffer) { + public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, + java.nio.DoubleBuffer buffer) { org.lwjgl.opengl.ARBVertexShader.glVertexAttribPointerARB( index, @@ -148,15 +144,15 @@ public class ARBVertexShader { me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(buffer)); } - public static void glVertexAttribPointerARB( - int index, int size, boolean normalized, int stride, java.nio.FloatBuffer buffer) { + public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, + java.nio.FloatBuffer buffer) { - org.lwjgl.opengl.ARBVertexShader.glVertexAttribPointerARB( - index, size, org.lwjgl.opengl.GL11.GL_FLOAT, normalized, stride, buffer); + org.lwjgl.opengl.ARBVertexShader + .glVertexAttribPointerARB(index, size, org.lwjgl.opengl.GL11.GL_FLOAT, normalized, stride, buffer); } - public static void glVertexAttribPointerARB( - int index, int size, boolean unsigned, boolean normalized, int stride, java.nio.ByteBuffer buffer) { + public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, + java.nio.ByteBuffer buffer) { org.lwjgl.opengl.ARBVertexShader.glVertexAttribPointerARB( index, @@ -167,8 +163,8 @@ public class ARBVertexShader { org.lwjglx.MemoryUtil.getAddress(buffer)); } - public static void glVertexAttribPointerARB( - int index, int size, boolean unsigned, boolean normalized, int stride, java.nio.IntBuffer buffer) { + public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, + java.nio.IntBuffer buffer) { org.lwjgl.opengl.ARBVertexShader.glVertexAttribPointerARB( index, @@ -179,8 +175,8 @@ public class ARBVertexShader { org.lwjglx.MemoryUtil.getAddress(buffer)); } - public static void glVertexAttribPointerARB( - int index, int size, boolean unsigned, boolean normalized, int stride, java.nio.ShortBuffer buffer) { + public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, + java.nio.ShortBuffer buffer) { org.lwjgl.opengl.ARBVertexShader.glVertexAttribPointerARB( index, diff --git a/src/generated/java/org/lwjglx/opengl/ARBVertexType2_10_10_10_REV.java b/src/generated/java/org/lwjglx/opengl/ARBVertexType2_10_10_10_REV.java index 43f7c98..2d466d6 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBVertexType2_10_10_10_REV.java +++ b/src/generated/java/org/lwjglx/opengl/ARBVertexType2_10_10_10_REV.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBVertexType2_10_10_10_REV { + public static final int GL_INT_2_10_10_10_REV = (int) 36255; public static final int GL_UNSIGNED_INT_2_10_10_10_REV = (int) 33640; diff --git a/src/generated/java/org/lwjglx/opengl/ARBViewportArray.java b/src/generated/java/org/lwjglx/opengl/ARBViewportArray.java index cb9eb53..049853f 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBViewportArray.java +++ b/src/generated/java/org/lwjglx/opengl/ARBViewportArray.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBViewportArray { + public static final int GL_FIRST_VERTEX_CONVENTION = (int) 36429; public static final int GL_LAST_VERTEX_CONVENTION = (int) 36430; public static final int GL_LAYER_PROVOKING_VERTEX = (int) 33374; diff --git a/src/generated/java/org/lwjglx/opengl/ARBWindowPos.java b/src/generated/java/org/lwjglx/opengl/ARBWindowPos.java index f608a9c..b1b0d9e 100644 --- a/src/generated/java/org/lwjglx/opengl/ARBWindowPos.java +++ b/src/generated/java/org/lwjglx/opengl/ARBWindowPos.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ARBWindowPos { + public static void glWindowPos2dARB(double x, double y) { org.lwjgl.opengl.ARBWindowPos.glWindowPos2dARB(x, y); } diff --git a/src/generated/java/org/lwjglx/opengl/ATIMeminfo.java b/src/generated/java/org/lwjglx/opengl/ATIMeminfo.java index 466819b..14cdfac 100644 --- a/src/generated/java/org/lwjglx/opengl/ATIMeminfo.java +++ b/src/generated/java/org/lwjglx/opengl/ATIMeminfo.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class ATIMeminfo { + public static final int GL_RENDERBUFFER_FREE_MEMORY_ATI = (int) 34813; public static final int GL_TEXTURE_FREE_MEMORY_ATI = (int) 34812; public static final int GL_VBO_FREE_MEMORY_ATI = (int) 34811; diff --git a/src/generated/java/org/lwjglx/opengl/ATITextureCompression3DC.java b/src/generated/java/org/lwjglx/opengl/ATITextureCompression3DC.java index 81648b6..aae6152 100644 --- a/src/generated/java/org/lwjglx/opengl/ATITextureCompression3DC.java +++ b/src/generated/java/org/lwjglx/opengl/ATITextureCompression3DC.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class ATITextureCompression3DC { + public static final int GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI = (int) 34871; } diff --git a/src/generated/java/org/lwjglx/opengl/EXTBindableUniform.java b/src/generated/java/org/lwjglx/opengl/EXTBindableUniform.java index 1afca78..520bc84 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTBindableUniform.java +++ b/src/generated/java/org/lwjglx/opengl/EXTBindableUniform.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTBindableUniform { + public static final int GL_MAX_BINDABLE_UNIFORM_SIZE_EXT = (int) 36333; public static final int GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT = (int) 36323; public static final int GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT = (int) 36324; diff --git a/src/generated/java/org/lwjglx/opengl/EXTBlendColor.java b/src/generated/java/org/lwjglx/opengl/EXTBlendColor.java index 4e9ad5c..e526510 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTBlendColor.java +++ b/src/generated/java/org/lwjglx/opengl/EXTBlendColor.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTBlendColor { + public static final int GL_BLEND_COLOR_EXT = (int) 32773; public static final int GL_CONSTANT_ALPHA_EXT = (int) 32771; public static final int GL_CONSTANT_COLOR_EXT = (int) 32769; diff --git a/src/generated/java/org/lwjglx/opengl/EXTBlendEquationSeparate.java b/src/generated/java/org/lwjglx/opengl/EXTBlendEquationSeparate.java index 3a54591..ff6f441 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTBlendEquationSeparate.java +++ b/src/generated/java/org/lwjglx/opengl/EXTBlendEquationSeparate.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTBlendEquationSeparate { + public static final int GL_BLEND_EQUATION_ALPHA_EXT = (int) 34877; public static final int GL_BLEND_EQUATION_RGB_EXT = (int) 32777; diff --git a/src/generated/java/org/lwjglx/opengl/EXTBlendFuncSeparate.java b/src/generated/java/org/lwjglx/opengl/EXTBlendFuncSeparate.java index 58a5106..b538bed 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTBlendFuncSeparate.java +++ b/src/generated/java/org/lwjglx/opengl/EXTBlendFuncSeparate.java @@ -1,13 +1,14 @@ package org.lwjglx.opengl; public class EXTBlendFuncSeparate { + public static final int GL_BLEND_DST_ALPHA_EXT = (int) 32970; public static final int GL_BLEND_DST_RGB_EXT = (int) 32968; public static final int GL_BLEND_SRC_ALPHA_EXT = (int) 32971; public static final int GL_BLEND_SRC_RGB_EXT = (int) 32969; public static void glBlendFuncSeparateEXT(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha) { - org.lwjgl.opengl.EXTBlendFuncSeparate.glBlendFuncSeparateEXT( - sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); + org.lwjgl.opengl.EXTBlendFuncSeparate + .glBlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); } } diff --git a/src/generated/java/org/lwjglx/opengl/EXTBlendMinmax.java b/src/generated/java/org/lwjglx/opengl/EXTBlendMinmax.java index 73fa81e..86b87ea 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTBlendMinmax.java +++ b/src/generated/java/org/lwjglx/opengl/EXTBlendMinmax.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTBlendMinmax { + public static final int GL_BLEND_EQUATION_EXT = (int) 32777; public static final int GL_FUNC_ADD_EXT = (int) 32774; public static final int GL_MAX_EXT = (int) 32776; diff --git a/src/generated/java/org/lwjglx/opengl/EXTBlendSubtract.java b/src/generated/java/org/lwjglx/opengl/EXTBlendSubtract.java index 7aef1b0..6ef796a 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTBlendSubtract.java +++ b/src/generated/java/org/lwjglx/opengl/EXTBlendSubtract.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTBlendSubtract { + public static final int GL_FUNC_REVERSE_SUBTRACT_EXT = (int) 32779; public static final int GL_FUNC_SUBTRACT_EXT = (int) 32778; } diff --git a/src/generated/java/org/lwjglx/opengl/EXTCompiledVertexArray.java b/src/generated/java/org/lwjglx/opengl/EXTCompiledVertexArray.java index 6c8be7a..b14ad84 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTCompiledVertexArray.java +++ b/src/generated/java/org/lwjglx/opengl/EXTCompiledVertexArray.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTCompiledVertexArray { + public static final int GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = (int) 33193; public static final int GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = (int) 33192; diff --git a/src/generated/java/org/lwjglx/opengl/EXTDepthBoundsTest.java b/src/generated/java/org/lwjglx/opengl/EXTDepthBoundsTest.java index 5833271..1a9b33a 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTDepthBoundsTest.java +++ b/src/generated/java/org/lwjglx/opengl/EXTDepthBoundsTest.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTDepthBoundsTest { + public static final int GL_DEPTH_BOUNDS_EXT = (int) 34961; public static final int GL_DEPTH_BOUNDS_TEST_EXT = (int) 34960; diff --git a/src/generated/java/org/lwjglx/opengl/EXTDirectStateAccess.java b/src/generated/java/org/lwjglx/opengl/EXTDirectStateAccess.java index c5d8b8f..4c7ca1e 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTDirectStateAccess.java +++ b/src/generated/java/org/lwjglx/opengl/EXTDirectStateAccess.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTDirectStateAccess { + public static final int GL_PROGRAM_MATRIX_EXT = (int) 36397; public static final int GL_PROGRAM_MATRIX_STACK_DEPTH_EXT = (int) 36399; public static final int GL_TRANSPOSE_PROGRAM_MATRIX_EXT = (int) 36398; @@ -17,63 +18,47 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glClientAttribDefaultEXT(mask); } - public static void glCompressedMultiTexImage1DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int border, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, + int border, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexImage1DEXT( - texunit, target, level, internalformat, width, border, data_imageSize, data_buffer_offset); + texunit, + target, + level, + internalformat, + width, + border, + data_imageSize, + data_buffer_offset); } - public static void glCompressedMultiTexImage1DEXT( - int texunit, int target, int level, int internalformat, int width, int border, java.nio.ByteBuffer data) { - org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexImage1DEXT( - texunit, target, level, internalformat, width, border, data); + public static void glCompressedMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, + int border, java.nio.ByteBuffer data) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, data); } - public static void glCompressedMultiTexImage2DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int border, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexImage2DEXT( - texunit, target, level, internalformat, width, height, border, data_imageSize, data_buffer_offset); + texunit, + target, + level, + internalformat, + width, + height, + border, + data_imageSize, + data_buffer_offset); } - public static void glCompressedMultiTexImage2DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int border, - java.nio.ByteBuffer data) { - org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexImage2DEXT( - texunit, target, level, internalformat, width, height, border, data); + public static void glCompressedMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int border, java.nio.ByteBuffer data) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCompressedMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, data); } - public static void glCompressedMultiTexImage3DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int depth, int border, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexImage3DEXT( texunit, target, @@ -87,81 +72,70 @@ public class EXTDirectStateAccess { data_buffer_offset); } - public static void glCompressedMultiTexImage3DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - java.nio.ByteBuffer data) { + public static void glCompressedMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int depth, int border, java.nio.ByteBuffer data) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexImage3DEXT( - texunit, target, level, internalformat, width, height, depth, border, data); + texunit, + target, + level, + internalformat, + width, + height, + depth, + border, + data); } - public static void glCompressedMultiTexSubImage1DEXT( - int texunit, - int target, - int level, - int xoffset, - int width, - int format, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, + int format, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexSubImage1DEXT( - texunit, target, level, xoffset, width, format, data_imageSize, data_buffer_offset); + texunit, + target, + level, + xoffset, + width, + format, + data_imageSize, + data_buffer_offset); } - public static void glCompressedMultiTexSubImage1DEXT( - int texunit, int target, int level, int xoffset, int width, int format, java.nio.ByteBuffer data) { - org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexSubImage1DEXT( - texunit, target, level, xoffset, width, format, data); + public static void glCompressedMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, + int format, java.nio.ByteBuffer data) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCompressedMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, data); } - public static void glCompressedMultiTexSubImage2DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, + int width, int height, int format, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexSubImage2DEXT( - texunit, target, level, xoffset, yoffset, width, height, format, data_imageSize, data_buffer_offset); + texunit, + target, + level, + xoffset, + yoffset, + width, + height, + format, + data_imageSize, + data_buffer_offset); } - public static void glCompressedMultiTexSubImage2DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - java.nio.ByteBuffer data) { + public static void glCompressedMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, + int width, int height, int format, java.nio.ByteBuffer data) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexSubImage2DEXT( - texunit, target, level, xoffset, yoffset, width, height, format, data); + texunit, + target, + level, + xoffset, + yoffset, + width, + height, + format, + data); } - public static void glCompressedMultiTexSubImage3DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, + int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexSubImage3DEXT( texunit, target, @@ -177,79 +151,63 @@ public class EXTDirectStateAccess { data_buffer_offset); } - public static void glCompressedMultiTexSubImage3DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - java.nio.ByteBuffer data) { + public static void glCompressedMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, + int zoffset, int width, int height, int depth, int format, java.nio.ByteBuffer data) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedMultiTexSubImage3DEXT( - texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, data); + texunit, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + data); } - public static void glCompressedTextureImage1DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int border, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, + int border, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureImage1DEXT( - texture, target, level, internalformat, width, border, data_imageSize, data_buffer_offset); + texture, + target, + level, + internalformat, + width, + border, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTextureImage1DEXT( - int texture, int target, int level, int internalformat, int width, int border, java.nio.ByteBuffer data) { - org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureImage1DEXT( - texture, target, level, internalformat, width, border, data); + public static void glCompressedTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, + int border, java.nio.ByteBuffer data) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, data); } - public static void glCompressedTextureImage2DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, + int height, int border, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureImage2DEXT( - texture, target, level, internalformat, width, height, border, data_imageSize, data_buffer_offset); + texture, + target, + level, + internalformat, + width, + height, + border, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTextureImage2DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int border, - java.nio.ByteBuffer data) { - org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureImage2DEXT( - texture, target, level, internalformat, width, height, border, data); + public static void glCompressedTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, + int height, int border, java.nio.ByteBuffer data) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCompressedTextureImage2DEXT(texture, target, level, internalformat, width, height, border, data); } - public static void glCompressedTextureImage3DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, + int height, int depth, int border, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureImage3DEXT( texture, target, @@ -263,81 +221,70 @@ public class EXTDirectStateAccess { data_buffer_offset); } - public static void glCompressedTextureImage3DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - java.nio.ByteBuffer data) { + public static void glCompressedTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, + int height, int depth, int border, java.nio.ByteBuffer data) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureImage3DEXT( - texture, target, level, internalformat, width, height, depth, border, data); + texture, + target, + level, + internalformat, + width, + height, + depth, + border, + data); } - public static void glCompressedTextureSubImage1DEXT( - int texture, - int target, - int level, - int xoffset, - int width, - int format, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, + int format, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureSubImage1DEXT( - texture, target, level, xoffset, width, format, data_imageSize, data_buffer_offset); + texture, + target, + level, + xoffset, + width, + format, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTextureSubImage1DEXT( - int texture, int target, int level, int xoffset, int width, int format, java.nio.ByteBuffer data) { - org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureSubImage1DEXT( - texture, target, level, xoffset, width, format, data); + public static void glCompressedTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, + int format, java.nio.ByteBuffer data) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, data); } - public static void glCompressedTextureSubImage2DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, + int width, int height, int format, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureSubImage2DEXT( - texture, target, level, xoffset, yoffset, width, height, format, data_imageSize, data_buffer_offset); + texture, + target, + level, + xoffset, + yoffset, + width, + height, + format, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTextureSubImage2DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - java.nio.ByteBuffer data) { + public static void glCompressedTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, + int width, int height, int format, java.nio.ByteBuffer data) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureSubImage2DEXT( - texture, target, level, xoffset, yoffset, width, height, format, data); + texture, + target, + level, + xoffset, + yoffset, + width, + height, + format, + data); } - public static void glCompressedTextureSubImage3DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, + int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureSubImage3DEXT( texture, target, @@ -353,96 +300,78 @@ public class EXTDirectStateAccess { data_buffer_offset); } - public static void glCompressedTextureSubImage3DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - java.nio.ByteBuffer data) { + public static void glCompressedTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, + int zoffset, int width, int height, int depth, int format, java.nio.ByteBuffer data) { org.lwjgl.opengl.EXTDirectStateAccess.glCompressedTextureSubImage3DEXT( - texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, data); + texture, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + data); } - public static void glCopyMultiTexImage1DEXT( - int texunit, int target, int level, int internalformat, int x, int y, int width, int border) { - org.lwjgl.opengl.EXTDirectStateAccess.glCopyMultiTexImage1DEXT( - texunit, target, level, internalformat, x, y, width, border); + public static void glCopyMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int x, int y, + int width, int border) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCopyMultiTexImage1DEXT(texunit, target, level, internalformat, x, y, width, border); } - public static void glCopyMultiTexImage2DEXT( - int texunit, int target, int level, int internalformat, int x, int y, int width, int height, int border) { - org.lwjgl.opengl.EXTDirectStateAccess.glCopyMultiTexImage2DEXT( - texunit, target, level, internalformat, x, y, width, height, border); + public static void glCopyMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int x, int y, + int width, int height, int border) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCopyMultiTexImage2DEXT(texunit, target, level, internalformat, x, y, width, height, border); } - public static void glCopyMultiTexSubImage1DEXT( - int texunit, int target, int level, int xoffset, int x, int y, int width) { + public static void glCopyMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int x, int y, + int width) { org.lwjgl.opengl.EXTDirectStateAccess.glCopyMultiTexSubImage1DEXT(texunit, target, level, xoffset, x, y, width); } - public static void glCopyMultiTexSubImage2DEXT( - int texunit, int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { - org.lwjgl.opengl.EXTDirectStateAccess.glCopyMultiTexSubImage2DEXT( - texunit, target, level, xoffset, yoffset, x, y, width, height); + public static void glCopyMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int x, + int y, int width, int height) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCopyMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, x, y, width, height); } - public static void glCopyMultiTexSubImage3DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int x, - int y, - int width, - int height) { - org.lwjgl.opengl.EXTDirectStateAccess.glCopyMultiTexSubImage3DEXT( - texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height); + public static void glCopyMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, + int zoffset, int x, int y, int width, int height) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCopyMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height); } - public static void glCopyTextureImage1DEXT( - int texture, int target, int level, int internalformat, int x, int y, int width, int border) { - org.lwjgl.opengl.EXTDirectStateAccess.glCopyTextureImage1DEXT( - texture, target, level, internalformat, x, y, width, border); + public static void glCopyTextureImage1DEXT(int texture, int target, int level, int internalformat, int x, int y, + int width, int border) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCopyTextureImage1DEXT(texture, target, level, internalformat, x, y, width, border); } - public static void glCopyTextureImage2DEXT( - int texture, int target, int level, int internalformat, int x, int y, int width, int height, int border) { - org.lwjgl.opengl.EXTDirectStateAccess.glCopyTextureImage2DEXT( - texture, target, level, internalformat, x, y, width, height, border); + public static void glCopyTextureImage2DEXT(int texture, int target, int level, int internalformat, int x, int y, + int width, int height, int border) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCopyTextureImage2DEXT(texture, target, level, internalformat, x, y, width, height, border); } - public static void glCopyTextureSubImage1DEXT( - int texture, int target, int level, int xoffset, int x, int y, int width) { + public static void glCopyTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int x, int y, + int width) { org.lwjgl.opengl.EXTDirectStateAccess.glCopyTextureSubImage1DEXT(texture, target, level, xoffset, x, y, width); } - public static void glCopyTextureSubImage2DEXT( - int texture, int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { - org.lwjgl.opengl.EXTDirectStateAccess.glCopyTextureSubImage2DEXT( - texture, target, level, xoffset, yoffset, x, y, width, height); + public static void glCopyTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int x, + int y, int width, int height) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCopyTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, x, y, width, height); } - public static void glCopyTextureSubImage3DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int x, - int y, - int width, - int height) { - org.lwjgl.opengl.EXTDirectStateAccess.glCopyTextureSubImage3DEXT( - texture, target, level, xoffset, yoffset, zoffset, x, y, width, height); + public static void glCopyTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, + int zoffset, int x, int y, int width, int height) { + org.lwjgl.opengl.EXTDirectStateAccess + .glCopyTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, x, y, width, height); } public static void glDisableClientStateIndexedEXT(int array, int index) { @@ -514,8 +443,8 @@ public class EXTDirectStateAccess { } public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, long img_buffer_offset) { - org.lwjgl.opengl.EXTDirectStateAccess.glGetCompressedMultiTexImageEXT( - texunit, target, level, img_buffer_offset); + org.lwjgl.opengl.EXTDirectStateAccess + .glGetCompressedMultiTexImageEXT(texunit, target, level, img_buffer_offset); } public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, java.nio.ByteBuffer img) { @@ -524,14 +453,14 @@ public class EXTDirectStateAccess { public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, java.nio.IntBuffer img) { - org.lwjgl.opengl.EXTDirectStateAccess.glGetCompressedMultiTexImageEXT( - texunit, target, level, org.lwjglx.MemoryUtil.getAddress(img)); + org.lwjgl.opengl.EXTDirectStateAccess + .glGetCompressedMultiTexImageEXT(texunit, target, level, org.lwjglx.MemoryUtil.getAddress(img)); } public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, java.nio.ShortBuffer img) { - org.lwjgl.opengl.EXTDirectStateAccess.glGetCompressedMultiTexImageEXT( - texunit, target, level, org.lwjglx.MemoryUtil.getAddress(img)); + org.lwjgl.opengl.EXTDirectStateAccess + .glGetCompressedMultiTexImageEXT(texunit, target, level, org.lwjglx.MemoryUtil.getAddress(img)); } public static void glGetCompressedTextureImageEXT(int texture, int target, int level, long img_buffer_offset) { @@ -544,14 +473,14 @@ public class EXTDirectStateAccess { public static void glGetCompressedTextureImageEXT(int texture, int target, int level, java.nio.IntBuffer img) { - org.lwjgl.opengl.EXTDirectStateAccess.glGetCompressedTextureImageEXT( - texture, target, level, org.lwjglx.MemoryUtil.getAddress(img)); + org.lwjgl.opengl.EXTDirectStateAccess + .glGetCompressedTextureImageEXT(texture, target, level, org.lwjglx.MemoryUtil.getAddress(img)); } public static void glGetCompressedTextureImageEXT(int texture, int target, int level, java.nio.ShortBuffer img) { - org.lwjgl.opengl.EXTDirectStateAccess.glGetCompressedTextureImageEXT( - texture, target, level, org.lwjglx.MemoryUtil.getAddress(img)); + org.lwjgl.opengl.EXTDirectStateAccess + .glGetCompressedTextureImageEXT(texture, target, level, org.lwjglx.MemoryUtil.getAddress(img)); } public static void glGetDoubleEXT(int pname, int index, java.nio.DoubleBuffer params) { @@ -606,44 +535,44 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glGetMultiTexGenivEXT(texunit, coord, pname, params); } - public static void glGetMultiTexImageEXT( - int texunit, int target, int level, int format, int type, long pixels_buffer_offset) { - org.lwjgl.opengl.EXTDirectStateAccess.glGetMultiTexImageEXT( - texunit, target, level, format, type, pixels_buffer_offset); + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, + long pixels_buffer_offset) { + org.lwjgl.opengl.EXTDirectStateAccess + .glGetMultiTexImageEXT(texunit, target, level, format, type, pixels_buffer_offset); } - public static void glGetMultiTexImageEXT( - int texunit, int target, int level, int format, int type, java.nio.ByteBuffer pixels) { + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, + java.nio.ByteBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); } - public static void glGetMultiTexImageEXT( - int texunit, int target, int level, int format, int type, java.nio.DoubleBuffer pixels) { + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, + java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); } - public static void glGetMultiTexImageEXT( - int texunit, int target, int level, int format, int type, java.nio.FloatBuffer pixels) { + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, + java.nio.FloatBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); } - public static void glGetMultiTexImageEXT( - int texunit, int target, int level, int format, int type, java.nio.IntBuffer pixels) { + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, + java.nio.IntBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); } - public static void glGetMultiTexImageEXT( - int texunit, int target, int level, int format, int type, java.nio.ShortBuffer pixels) { + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, + java.nio.ShortBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glGetMultiTexImageEXT(texunit, target, level, format, type, pixels); } - public static void glGetMultiTexLevelParameterEXT( - int texunit, int target, int level, int pname, java.nio.FloatBuffer params) { + public static void glGetMultiTexLevelParameterEXT(int texunit, int target, int level, int pname, + java.nio.FloatBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glGetMultiTexLevelParameterfvEXT(texunit, target, level, pname, params); } - public static void glGetMultiTexLevelParameterEXT( - int texunit, int target, int level, int pname, java.nio.IntBuffer params) { + public static void glGetMultiTexLevelParameterEXT(int texunit, int target, int level, int pname, + java.nio.IntBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glGetMultiTexLevelParameterivEXT(texunit, target, level, pname, params); } @@ -711,33 +640,33 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glGetNamedBufferSubDataEXT(buffer, offset, data); } - public static void glGetNamedFramebufferAttachmentParameterEXT( - int framebuffer, int attachment, int pname, java.nio.IntBuffer params) { - org.lwjgl.opengl.EXTDirectStateAccess.glGetNamedFramebufferAttachmentParameterivEXT( - framebuffer, attachment, pname, params); + public static void glGetNamedFramebufferAttachmentParameterEXT(int framebuffer, int attachment, int pname, + java.nio.IntBuffer params) { + org.lwjgl.opengl.EXTDirectStateAccess + .glGetNamedFramebufferAttachmentParameterivEXT(framebuffer, attachment, pname, params); } public static void glGetNamedProgramEXT(int program, int target, int pname, java.nio.IntBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glGetNamedProgramivEXT(program, target, pname, params); } - public static void glGetNamedProgramLocalParameterEXT( - int program, int target, int index, java.nio.DoubleBuffer params) { + public static void glGetNamedProgramLocalParameterEXT(int program, int target, int index, + java.nio.DoubleBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glGetNamedProgramLocalParameterdvEXT(program, target, index, params); } - public static void glGetNamedProgramLocalParameterEXT( - int program, int target, int index, java.nio.FloatBuffer params) { + public static void glGetNamedProgramLocalParameterEXT(int program, int target, int index, + java.nio.FloatBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glGetNamedProgramLocalParameterfvEXT(program, target, index, params); } - public static void glGetNamedProgramLocalParameterIEXT( - int program, int target, int index, java.nio.IntBuffer params) { + public static void glGetNamedProgramLocalParameterIEXT(int program, int target, int index, + java.nio.IntBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glGetNamedProgramLocalParameterIivEXT(program, target, index, params); } - public static void glGetNamedProgramLocalParameterIuEXT( - int program, int target, int index, java.nio.IntBuffer params) { + public static void glGetNamedProgramLocalParameterIuEXT(int program, int target, int index, + java.nio.IntBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glGetNamedProgramLocalParameterIuivEXT(program, target, index, params); } @@ -749,44 +678,44 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glGetNamedRenderbufferParameterivEXT(renderbuffer, pname, params); } - public static void glGetTextureImageEXT( - int texture, int target, int level, int format, int type, long pixels_buffer_offset) { - org.lwjgl.opengl.EXTDirectStateAccess.glGetTextureImageEXT( - texture, target, level, format, type, pixels_buffer_offset); + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, + long pixels_buffer_offset) { + org.lwjgl.opengl.EXTDirectStateAccess + .glGetTextureImageEXT(texture, target, level, format, type, pixels_buffer_offset); } - public static void glGetTextureImageEXT( - int texture, int target, int level, int format, int type, java.nio.ByteBuffer pixels) { + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, + java.nio.ByteBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glGetTextureImageEXT(texture, target, level, format, type, pixels); } - public static void glGetTextureImageEXT( - int texture, int target, int level, int format, int type, java.nio.DoubleBuffer pixels) { + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, + java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glGetTextureImageEXT(texture, target, level, format, type, pixels); } - public static void glGetTextureImageEXT( - int texture, int target, int level, int format, int type, java.nio.FloatBuffer pixels) { + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, + java.nio.FloatBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glGetTextureImageEXT(texture, target, level, format, type, pixels); } - public static void glGetTextureImageEXT( - int texture, int target, int level, int format, int type, java.nio.IntBuffer pixels) { + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, + java.nio.IntBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glGetTextureImageEXT(texture, target, level, format, type, pixels); } - public static void glGetTextureImageEXT( - int texture, int target, int level, int format, int type, java.nio.ShortBuffer pixels) { + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, + java.nio.ShortBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glGetTextureImageEXT(texture, target, level, format, type, pixels); } - public static void glGetTextureLevelParameterEXT( - int texture, int target, int level, int pname, java.nio.FloatBuffer params) { + public static void glGetTextureLevelParameterEXT(int texture, int target, int level, int pname, + java.nio.FloatBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glGetTextureLevelParameterfvEXT(texture, target, level, pname, params); } - public static void glGetTextureLevelParameterEXT( - int texture, int target, int level, int pname, java.nio.IntBuffer params) { + public static void glGetTextureLevelParameterEXT(int texture, int target, int level, int pname, + java.nio.IntBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glGetTextureLevelParameterivEXT(texture, target, level, pname, params); } @@ -850,8 +779,8 @@ public class EXTDirectStateAccess { return org.lwjgl.opengl.EXTDirectStateAccess.glIsEnabledIndexedEXT(cap, index); } - public static java.nio.ByteBuffer glMapNamedBufferEXT( - int buffer, int access, long length, java.nio.ByteBuffer old_buffer) { + public static java.nio.ByteBuffer glMapNamedBufferEXT(int buffer, int access, long length, + java.nio.ByteBuffer old_buffer) { return org.lwjgl.opengl.EXTDirectStateAccess.glMapNamedBufferEXT(buffer, access, length, old_buffer); } @@ -859,10 +788,10 @@ public class EXTDirectStateAccess { return org.lwjgl.opengl.EXTDirectStateAccess.glMapNamedBufferEXT(buffer, access, old_buffer); } - public static java.nio.ByteBuffer glMapNamedBufferRangeEXT( - int buffer, long offset, long length, int access, java.nio.ByteBuffer old_buffer) { - return org.lwjgl.opengl.EXTDirectStateAccess.glMapNamedBufferRangeEXT( - buffer, offset, length, access, old_buffer); + public static java.nio.ByteBuffer glMapNamedBufferRangeEXT(int buffer, long offset, long length, int access, + java.nio.ByteBuffer old_buffer) { + return org.lwjgl.opengl.EXTDirectStateAccess + .glMapNamedBufferRangeEXT(buffer, offset, length, access, old_buffer); } public static void glMatrixFrustumEXT(int matrixMode, double l, double r, double b, double t, double n, double f) { @@ -945,10 +874,10 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexBufferEXT(texunit, target, internalformat, buffer); } - public static void glMultiTexCoordPointerEXT( - int texunit, int size, int type, int stride, long pointer_buffer_offset) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexCoordPointerEXT( - texunit, size, type, stride, pointer_buffer_offset); + public static void glMultiTexCoordPointerEXT(int texunit, int size, int type, int stride, + long pointer_buffer_offset) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexCoordPointerEXT(texunit, size, type, stride, pointer_buffer_offset); } public static void glMultiTexCoordPointerEXT(int texunit, int size, int stride, java.nio.DoubleBuffer pointer) { @@ -963,8 +892,8 @@ public class EXTDirectStateAccess { public static void glMultiTexCoordPointerEXT(int texunit, int size, int stride, java.nio.FloatBuffer pointer) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexCoordPointerEXT( - texunit, size, org.lwjgl.opengl.GL11.GL_FLOAT, stride, pointer); + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexCoordPointerEXT(texunit, size, org.lwjgl.opengl.GL11.GL_FLOAT, stride, pointer); } public static void glMultiTexEnvEXT(int texunit, int target, int pname, java.nio.FloatBuffer params) { @@ -1007,192 +936,142 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexGeniEXT(texunit, coord, pname, param); } - public static void glMultiTexImage1DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - long pixels_buffer_offset) { + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, + int border, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage1DEXT( - texunit, target, level, internalformat, width, border, format, type, pixels_buffer_offset); + texunit, + target, + level, + internalformat, + width, + border, + format, + type, + pixels_buffer_offset); } - public static void glMultiTexImage1DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage1DEXT( - texunit, target, level, internalformat, width, border, format, type, pixels); + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, + int border, int format, int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); } - public static void glMultiTexImage1DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage1DEXT( - texunit, target, level, internalformat, width, border, format, type, pixels); + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, + int border, int format, int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); } - public static void glMultiTexImage1DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage1DEXT( - texunit, target, level, internalformat, width, border, format, type, pixels); + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, + int border, int format, int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); } - public static void glMultiTexImage1DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.IntBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage1DEXT( - texunit, target, level, internalformat, width, border, format, type, pixels); + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, + int border, int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); } - public static void glMultiTexImage1DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.ShortBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage1DEXT( - texunit, target, level, internalformat, width, border, format, type, pixels); + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, + int border, int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels); } - public static void glMultiTexImage2DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - long pixels_buffer_offset) { + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int border, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, target, level, internalformat, width, height, border, format, type, pixels_buffer_offset); + texunit, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels_buffer_offset); } - public static void glMultiTexImage2DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.ByteBuffer pixels) { + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int border, int format, int type, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, target, level, internalformat, width, height, border, format, type, pixels); + texunit, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } - public static void glMultiTexImage2DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.DoubleBuffer pixels) { + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int border, int format, int type, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, target, level, internalformat, width, height, border, format, type, pixels); + texunit, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } - public static void glMultiTexImage2DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.FloatBuffer pixels) { + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int border, int format, int type, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, target, level, internalformat, width, height, border, format, type, pixels); + texunit, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } - public static void glMultiTexImage2DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.IntBuffer pixels) { + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int border, int format, int type, java.nio.IntBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, target, level, internalformat, width, height, border, format, type, pixels); + texunit, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } - public static void glMultiTexImage2DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int border, int format, int type, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage2DEXT( - texunit, target, level, internalformat, width, height, border, format, type, pixels); + texunit, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } - public static void glMultiTexImage3DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - long pixels_buffer_offset) { + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( texunit, target, @@ -1207,84 +1086,84 @@ public class EXTDirectStateAccess { pixels_buffer_offset); } - public static void glMultiTexImage3DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.ByteBuffer pixels) { + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( - texunit, target, level, internalformat, width, height, depth, border, format, type, pixels); + texunit, + target, + level, + internalformat, + width, + height, + depth, + border, + format, + type, + pixels); } - public static void glMultiTexImage3DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.DoubleBuffer pixels) { + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( - texunit, target, level, internalformat, width, height, depth, border, format, type, pixels); + texunit, + target, + level, + internalformat, + width, + height, + depth, + border, + format, + type, + pixels); } - public static void glMultiTexImage3DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.FloatBuffer pixels) { + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( - texunit, target, level, internalformat, width, height, depth, border, format, type, pixels); + texunit, + target, + level, + internalformat, + width, + height, + depth, + border, + format, + type, + pixels); } - public static void glMultiTexImage3DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.IntBuffer pixels) { + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, java.nio.IntBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( - texunit, target, level, internalformat, width, height, depth, border, format, type, pixels); + texunit, + target, + level, + internalformat, + width, + height, + depth, + border, + format, + type, + pixels); } - public static void glMultiTexImage3DEXT( - int texunit, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexImage3DEXT( - texunit, target, level, internalformat, width, height, depth, border, format, type, pixels); + texunit, + target, + level, + internalformat, + width, + height, + depth, + border, + format, + type, + pixels); } public static void glMultiTexParameterEXT(int texunit, int target, int pname, java.nio.FloatBuffer param) { @@ -1297,7 +1176,7 @@ public class EXTDirectStateAccess { public static void glMultiTexParameterIEXT(int texunit, int target, int pname, int param) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexParameterIivEXT(texunit, target, pname, new int[] {param}); + org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexParameterIivEXT(texunit, target, pname, new int[] { param }); } public static void glMultiTexParameterIEXT(int texunit, int target, int pname, java.nio.IntBuffer params) { @@ -1306,7 +1185,7 @@ public class EXTDirectStateAccess { public static void glMultiTexParameterIuEXT(int texunit, int target, int pname, int param) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexParameterIuivEXT(texunit, target, pname, new int[] {param}); + org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexParameterIuivEXT(texunit, target, pname, new int[] { param }); } public static void glMultiTexParameterIuEXT(int texunit, int target, int pname, java.nio.IntBuffer params) { @@ -1325,187 +1204,89 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexRenderbufferEXT(texunit, target, renderbuffer); } - public static void glMultiTexSubImage1DEXT( - int texunit, - int target, - int level, - int xoffset, - int width, - int format, - int type, - long pixels_buffer_offset) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage1DEXT( - texunit, target, level, xoffset, width, format, type, pixels_buffer_offset); + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, + int type, long pixels_buffer_offset) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels_buffer_offset); } - public static void glMultiTexSubImage1DEXT( - int texunit, - int target, - int level, - int xoffset, - int width, - int format, - int type, - java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage1DEXT( - texunit, target, level, xoffset, width, format, type, pixels); + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, + int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); } - public static void glMultiTexSubImage1DEXT( - int texunit, - int target, - int level, - int xoffset, - int width, - int format, - int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage1DEXT( - texunit, target, level, xoffset, width, format, type, pixels); + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, + int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); } - public static void glMultiTexSubImage1DEXT( - int texunit, - int target, - int level, - int xoffset, - int width, - int format, - int type, - java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage1DEXT( - texunit, target, level, xoffset, width, format, type, pixels); + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, + int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); } - public static void glMultiTexSubImage1DEXT( - int texunit, - int target, - int level, - int xoffset, - int width, - int format, - int type, - java.nio.IntBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage1DEXT( - texunit, target, level, xoffset, width, format, type, pixels); + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, + int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); } - public static void glMultiTexSubImage1DEXT( - int texunit, - int target, - int level, - int xoffset, - int width, - int format, - int type, - java.nio.ShortBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage1DEXT( - texunit, target, level, xoffset, width, format, type, pixels); + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, + int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels); } - public static void glMultiTexSubImage2DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - long pixels_buffer_offset) { + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage2DEXT( - texunit, target, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset); + texunit, + target, + level, + xoffset, + yoffset, + width, + height, + format, + type, + pixels_buffer_offset); } - public static void glMultiTexSubImage2DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage2DEXT( - texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glMultiTexSubImage2DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage2DEXT( - texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glMultiTexSubImage2DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage2DEXT( - texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glMultiTexSubImage2DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - java.nio.IntBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage2DEXT( - texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glMultiTexSubImage2DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - java.nio.ShortBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage2DEXT( - texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glMultiTexSubImage3DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - long pixels_buffer_offset) { + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, + int zoffset, int width, int height, int depth, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( texunit, target, @@ -1521,89 +1302,89 @@ public class EXTDirectStateAccess { pixels_buffer_offset); } - public static void glMultiTexSubImage3DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ByteBuffer pixels) { + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, + int zoffset, int width, int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( - texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texunit, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glMultiTexSubImage3DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.DoubleBuffer pixels) { + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, + int zoffset, int width, int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( - texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texunit, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glMultiTexSubImage3DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.FloatBuffer pixels) { + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, + int zoffset, int width, int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( - texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texunit, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glMultiTexSubImage3DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.IntBuffer pixels) { + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, + int zoffset, int width, int height, int depth, int format, int type, java.nio.IntBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( - texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texunit, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glMultiTexSubImage3DEXT( - int texunit, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, + int zoffset, int width, int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glMultiTexSubImage3DEXT( - texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texunit, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } public static void glNamedBufferDataEXT(int buffer, long data_size, int usage) { @@ -1650,104 +1431,104 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glNamedBufferSubDataEXT(buffer, offset, data); } - public static void glNamedCopyBufferSubDataEXT( - int readBuffer, int writeBuffer, long readoffset, long writeoffset, long size) { - org.lwjgl.opengl.EXTDirectStateAccess.glNamedCopyBufferSubDataEXT( - readBuffer, writeBuffer, readoffset, writeoffset, size); + public static void glNamedCopyBufferSubDataEXT(int readBuffer, int writeBuffer, long readoffset, long writeoffset, + long size) { + org.lwjgl.opengl.EXTDirectStateAccess + .glNamedCopyBufferSubDataEXT(readBuffer, writeBuffer, readoffset, writeoffset, size); } - public static void glNamedFramebufferRenderbufferEXT( - int framebuffer, int attachment, int renderbuffertarget, int renderbuffer) { - org.lwjgl.opengl.EXTDirectStateAccess.glNamedFramebufferRenderbufferEXT( - framebuffer, attachment, renderbuffertarget, renderbuffer); + public static void glNamedFramebufferRenderbufferEXT(int framebuffer, int attachment, int renderbuffertarget, + int renderbuffer) { + org.lwjgl.opengl.EXTDirectStateAccess + .glNamedFramebufferRenderbufferEXT(framebuffer, attachment, renderbuffertarget, renderbuffer); } - public static void glNamedFramebufferTexture1DEXT( - int framebuffer, int attachment, int textarget, int texture, int level) { - org.lwjgl.opengl.EXTDirectStateAccess.glNamedFramebufferTexture1DEXT( - framebuffer, attachment, textarget, texture, level); + public static void glNamedFramebufferTexture1DEXT(int framebuffer, int attachment, int textarget, int texture, + int level) { + org.lwjgl.opengl.EXTDirectStateAccess + .glNamedFramebufferTexture1DEXT(framebuffer, attachment, textarget, texture, level); } - public static void glNamedFramebufferTexture2DEXT( - int framebuffer, int attachment, int textarget, int texture, int level) { - org.lwjgl.opengl.EXTDirectStateAccess.glNamedFramebufferTexture2DEXT( - framebuffer, attachment, textarget, texture, level); + public static void glNamedFramebufferTexture2DEXT(int framebuffer, int attachment, int textarget, int texture, + int level) { + org.lwjgl.opengl.EXTDirectStateAccess + .glNamedFramebufferTexture2DEXT(framebuffer, attachment, textarget, texture, level); } - public static void glNamedFramebufferTexture3DEXT( - int framebuffer, int attachment, int textarget, int texture, int level, int zoffset) { - org.lwjgl.opengl.EXTDirectStateAccess.glNamedFramebufferTexture3DEXT( - framebuffer, attachment, textarget, texture, level, zoffset); + public static void glNamedFramebufferTexture3DEXT(int framebuffer, int attachment, int textarget, int texture, + int level, int zoffset) { + org.lwjgl.opengl.EXTDirectStateAccess + .glNamedFramebufferTexture3DEXT(framebuffer, attachment, textarget, texture, level, zoffset); } public static void glNamedFramebufferTextureEXT(int framebuffer, int attachment, int texture, int level) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedFramebufferTextureEXT(framebuffer, attachment, texture, level); } - public static void glNamedFramebufferTextureFaceEXT( - int framebuffer, int attachment, int texture, int level, int face) { - org.lwjgl.opengl.EXTDirectStateAccess.glNamedFramebufferTextureFaceEXT( - framebuffer, attachment, texture, level, face); + public static void glNamedFramebufferTextureFaceEXT(int framebuffer, int attachment, int texture, int level, + int face) { + org.lwjgl.opengl.EXTDirectStateAccess + .glNamedFramebufferTextureFaceEXT(framebuffer, attachment, texture, level, face); } - public static void glNamedFramebufferTextureLayerEXT( - int framebuffer, int attachment, int texture, int level, int layer) { - org.lwjgl.opengl.EXTDirectStateAccess.glNamedFramebufferTextureLayerEXT( - framebuffer, attachment, texture, level, layer); + public static void glNamedFramebufferTextureLayerEXT(int framebuffer, int attachment, int texture, int level, + int layer) { + org.lwjgl.opengl.EXTDirectStateAccess + .glNamedFramebufferTextureLayerEXT(framebuffer, attachment, texture, level, layer); } - public static void glNamedProgramLocalParameter4EXT( - int program, int target, int index, java.nio.DoubleBuffer params) { + public static void glNamedProgramLocalParameter4EXT(int program, int target, int index, + java.nio.DoubleBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedProgramLocalParameter4dvEXT(program, target, index, params); } - public static void glNamedProgramLocalParameter4EXT( - int program, int target, int index, java.nio.FloatBuffer params) { + public static void glNamedProgramLocalParameter4EXT(int program, int target, int index, + java.nio.FloatBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedProgramLocalParameter4fvEXT(program, target, index, params); } - public static void glNamedProgramLocalParameter4dEXT( - int program, int target, int index, double x, double y, double z, double w) { + public static void glNamedProgramLocalParameter4dEXT(int program, int target, int index, double x, double y, + double z, double w) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedProgramLocalParameter4dEXT(program, target, index, x, y, z, w); } - public static void glNamedProgramLocalParameter4fEXT( - int program, int target, int index, float x, float y, float z, float w) { + public static void glNamedProgramLocalParameter4fEXT(int program, int target, int index, float x, float y, float z, + float w) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedProgramLocalParameter4fEXT(program, target, index, x, y, z, w); } - public static void glNamedProgramLocalParameterI4EXT( - int program, int target, int index, java.nio.IntBuffer params) { + public static void glNamedProgramLocalParameterI4EXT(int program, int target, int index, + java.nio.IntBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedProgramLocalParameterI4ivEXT(program, target, index, params); } - public static void glNamedProgramLocalParameterI4iEXT( - int program, int target, int index, int x, int y, int z, int w) { + public static void glNamedProgramLocalParameterI4iEXT(int program, int target, int index, int x, int y, int z, + int w) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedProgramLocalParameterI4iEXT(program, target, index, x, y, z, w); } - public static void glNamedProgramLocalParameterI4uEXT( - int program, int target, int index, java.nio.IntBuffer params) { + public static void glNamedProgramLocalParameterI4uEXT(int program, int target, int index, + java.nio.IntBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedProgramLocalParameterI4uivEXT(program, target, index, params); } - public static void glNamedProgramLocalParameterI4uiEXT( - int program, int target, int index, int x, int y, int z, int w) { + public static void glNamedProgramLocalParameterI4uiEXT(int program, int target, int index, int x, int y, int z, + int w) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedProgramLocalParameterI4uiEXT(program, target, index, x, y, z, w); } - public static void glNamedProgramLocalParameters4EXT( - int program, int target, int index, java.nio.FloatBuffer params) { + public static void glNamedProgramLocalParameters4EXT(int program, int target, int index, + java.nio.FloatBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedProgramLocalParameters4fvEXT(program, target, index, params); } - public static void glNamedProgramLocalParametersI4EXT( - int program, int target, int index, java.nio.IntBuffer params) { + public static void glNamedProgramLocalParametersI4EXT(int program, int target, int index, + java.nio.IntBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedProgramLocalParametersI4ivEXT(program, target, index, params); } - public static void glNamedProgramLocalParametersI4uEXT( - int program, int target, int index, java.nio.IntBuffer params) { + public static void glNamedProgramLocalParametersI4uEXT(int program, int target, int index, + java.nio.IntBuffer params) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedProgramLocalParametersI4uivEXT(program, target, index, params); } @@ -1756,20 +1537,25 @@ public class EXTDirectStateAccess { } public static void glNamedRenderbufferStorageEXT(int renderbuffer, int internalformat, int width, int height) { - org.lwjgl.opengl.EXTDirectStateAccess.glNamedRenderbufferStorageEXT( - renderbuffer, internalformat, width, height); + org.lwjgl.opengl.EXTDirectStateAccess + .glNamedRenderbufferStorageEXT(renderbuffer, internalformat, width, height); } - public static void glNamedRenderbufferStorageMultisampleCoverageEXT( - int renderbuffer, int coverageSamples, int colorSamples, int internalformat, int width, int height) { + public static void glNamedRenderbufferStorageMultisampleCoverageEXT(int renderbuffer, int coverageSamples, + int colorSamples, int internalformat, int width, int height) { org.lwjgl.opengl.EXTDirectStateAccess.glNamedRenderbufferStorageMultisampleCoverageEXT( - renderbuffer, coverageSamples, colorSamples, internalformat, width, height); + renderbuffer, + coverageSamples, + colorSamples, + internalformat, + width, + height); } - public static void glNamedRenderbufferStorageMultisampleEXT( - int renderbuffer, int samples, int internalformat, int width, int height) { - org.lwjgl.opengl.EXTDirectStateAccess.glNamedRenderbufferStorageMultisampleEXT( - renderbuffer, samples, internalformat, width, height); + public static void glNamedRenderbufferStorageMultisampleEXT(int renderbuffer, int samples, int internalformat, + int width, int height) { + org.lwjgl.opengl.EXTDirectStateAccess + .glNamedRenderbufferStorageMultisampleEXT(renderbuffer, samples, internalformat, width, height); } public static void glProgramUniform1EXT(int program, int location, java.nio.FloatBuffer value) { @@ -1868,48 +1654,48 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glProgramUniform4uiEXT(program, location, v0, v1, v2, v3); } - public static void glProgramUniformMatrix2EXT( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix2EXT(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.EXTDirectStateAccess.glProgramUniformMatrix2fvEXT(program, location, transpose, value); } - public static void glProgramUniformMatrix2x3EXT( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix2x3EXT(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.EXTDirectStateAccess.glProgramUniformMatrix2x3fvEXT(program, location, transpose, value); } - public static void glProgramUniformMatrix2x4EXT( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix2x4EXT(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.EXTDirectStateAccess.glProgramUniformMatrix2x4fvEXT(program, location, transpose, value); } - public static void glProgramUniformMatrix3EXT( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix3EXT(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.EXTDirectStateAccess.glProgramUniformMatrix3fvEXT(program, location, transpose, value); } - public static void glProgramUniformMatrix3x2EXT( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix3x2EXT(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.EXTDirectStateAccess.glProgramUniformMatrix3x2fvEXT(program, location, transpose, value); } - public static void glProgramUniformMatrix3x4EXT( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix3x4EXT(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.EXTDirectStateAccess.glProgramUniformMatrix3x4fvEXT(program, location, transpose, value); } - public static void glProgramUniformMatrix4EXT( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix4EXT(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.EXTDirectStateAccess.glProgramUniformMatrix4fvEXT(program, location, transpose, value); } - public static void glProgramUniformMatrix4x2EXT( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix4x2EXT(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.EXTDirectStateAccess.glProgramUniformMatrix4x2fvEXT(program, location, transpose, value); } - public static void glProgramUniformMatrix4x3EXT( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix4x3EXT(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.EXTDirectStateAccess.glProgramUniformMatrix4x3fvEXT(program, location, transpose, value); } @@ -1921,192 +1707,142 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glTextureBufferEXT(texture, target, internalformat, buffer); } - public static void glTextureImage1DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - long pixels_buffer_offset) { + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, + int border, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage1DEXT( - texture, target, level, internalformat, width, border, format, type, pixels_buffer_offset); + texture, + target, + level, + internalformat, + width, + border, + format, + type, + pixels_buffer_offset); } - public static void glTextureImage1DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage1DEXT( - texture, target, level, internalformat, width, border, format, type, pixels); + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, + int border, int format, int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); } - public static void glTextureImage1DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage1DEXT( - texture, target, level, internalformat, width, border, format, type, pixels); + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, + int border, int format, int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); } - public static void glTextureImage1DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage1DEXT( - texture, target, level, internalformat, width, border, format, type, pixels); + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, + int border, int format, int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); } - public static void glTextureImage1DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.IntBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage1DEXT( - texture, target, level, internalformat, width, border, format, type, pixels); + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, + int border, int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); } - public static void glTextureImage1DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.ShortBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage1DEXT( - texture, target, level, internalformat, width, border, format, type, pixels); + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, + int border, int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels); } - public static void glTextureImage2DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - long pixels_buffer_offset) { + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, + int height, int border, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, target, level, internalformat, width, height, border, format, type, pixels_buffer_offset); + texture, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels_buffer_offset); } - public static void glTextureImage2DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.ByteBuffer pixels) { + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, + int height, int border, int format, int type, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, target, level, internalformat, width, height, border, format, type, pixels); + texture, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } - public static void glTextureImage2DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.DoubleBuffer pixels) { + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, + int height, int border, int format, int type, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, target, level, internalformat, width, height, border, format, type, pixels); + texture, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } - public static void glTextureImage2DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.FloatBuffer pixels) { + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, + int height, int border, int format, int type, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, target, level, internalformat, width, height, border, format, type, pixels); + texture, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } - public static void glTextureImage2DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.IntBuffer pixels) { + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, + int height, int border, int format, int type, java.nio.IntBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, target, level, internalformat, width, height, border, format, type, pixels); + texture, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } - public static void glTextureImage2DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, + int height, int border, int format, int type, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage2DEXT( - texture, target, level, internalformat, width, height, border, format, type, pixels); + texture, + target, + level, + internalformat, + width, + height, + border, + format, + type, + pixels); } - public static void glTextureImage3DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - long pixels_buffer_offset) { + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage3DEXT( texture, target, @@ -2121,84 +1857,84 @@ public class EXTDirectStateAccess { pixels_buffer_offset); } - public static void glTextureImage3DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.ByteBuffer pixels) { + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage3DEXT( - texture, target, level, internalformat, width, height, depth, border, format, type, pixels); + texture, + target, + level, + internalformat, + width, + height, + depth, + border, + format, + type, + pixels); } - public static void glTextureImage3DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.DoubleBuffer pixels) { + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage3DEXT( - texture, target, level, internalformat, width, height, depth, border, format, type, pixels); + texture, + target, + level, + internalformat, + width, + height, + depth, + border, + format, + type, + pixels); } - public static void glTextureImage3DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.FloatBuffer pixels) { + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage3DEXT( - texture, target, level, internalformat, width, height, depth, border, format, type, pixels); + texture, + target, + level, + internalformat, + width, + height, + depth, + border, + format, + type, + pixels); } - public static void glTextureImage3DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.IntBuffer pixels) { + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, java.nio.IntBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage3DEXT( - texture, target, level, internalformat, width, height, depth, border, format, type, pixels); + texture, + target, + level, + internalformat, + width, + height, + depth, + border, + format, + type, + pixels); } - public static void glTextureImage3DEXT( - int texture, - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, + int height, int depth, int border, int format, int type, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureImage3DEXT( - texture, target, level, internalformat, width, height, depth, border, format, type, pixels); + texture, + target, + level, + internalformat, + width, + height, + depth, + border, + format, + type, + pixels); } public static void glTextureParameterEXT(int texture, int target, int pname, java.nio.FloatBuffer param) { @@ -2211,7 +1947,7 @@ public class EXTDirectStateAccess { public static void glTextureParameterIEXT(int texture, int target, int pname, int param) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureParameterIivEXT(texture, target, pname, new int[] {param}); + org.lwjgl.opengl.EXTDirectStateAccess.glTextureParameterIivEXT(texture, target, pname, new int[] { param }); } public static void glTextureParameterIEXT(int texture, int target, int pname, java.nio.IntBuffer params) { @@ -2220,7 +1956,7 @@ public class EXTDirectStateAccess { public static void glTextureParameterIuEXT(int texture, int target, int pname, int param) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureParameterIuivEXT(texture, target, pname, new int[] {param}); + org.lwjgl.opengl.EXTDirectStateAccess.glTextureParameterIuivEXT(texture, target, pname, new int[] { param }); } public static void glTextureParameterIuEXT(int texture, int target, int pname, java.nio.IntBuffer params) { @@ -2239,187 +1975,89 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glTextureRenderbufferEXT(texture, target, renderbuffer); } - public static void glTextureSubImage1DEXT( - int texture, - int target, - int level, - int xoffset, - int width, - int format, - int type, - long pixels_buffer_offset) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage1DEXT( - texture, target, level, xoffset, width, format, type, pixels_buffer_offset); + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, + int type, long pixels_buffer_offset) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels_buffer_offset); } - public static void glTextureSubImage1DEXT( - int texture, - int target, - int level, - int xoffset, - int width, - int format, - int type, - java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage1DEXT( - texture, target, level, xoffset, width, format, type, pixels); + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, + int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage1DEXT( - int texture, - int target, - int level, - int xoffset, - int width, - int format, - int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage1DEXT( - texture, target, level, xoffset, width, format, type, pixels); + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, + int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage1DEXT( - int texture, - int target, - int level, - int xoffset, - int width, - int format, - int type, - java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage1DEXT( - texture, target, level, xoffset, width, format, type, pixels); + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, + int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage1DEXT( - int texture, - int target, - int level, - int xoffset, - int width, - int format, - int type, - java.nio.IntBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage1DEXT( - texture, target, level, xoffset, width, format, type, pixels); + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, + int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage1DEXT( - int texture, - int target, - int level, - int xoffset, - int width, - int format, - int type, - java.nio.ShortBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage1DEXT( - texture, target, level, xoffset, width, format, type, pixels); + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, + int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage2DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - long pixels_buffer_offset) { + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage2DEXT( - texture, target, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset); + texture, + target, + level, + xoffset, + yoffset, + width, + height, + format, + type, + pixels_buffer_offset); } - public static void glTextureSubImage2DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage2DEXT( - texture, target, level, xoffset, yoffset, width, height, format, type, pixels); + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage2DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage2DEXT( - texture, target, level, xoffset, yoffset, width, height, format, type, pixels); + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage2DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage2DEXT( - texture, target, level, xoffset, yoffset, width, height, format, type, pixels); + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage2DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - java.nio.IntBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage2DEXT( - texture, target, level, xoffset, yoffset, width, height, format, type, pixels); + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage2DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - java.nio.ShortBuffer pixels) { - org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage2DEXT( - texture, target, level, xoffset, yoffset, width, height, format, type, pixels); + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, + int height, int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.EXTDirectStateAccess + .glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage3DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - long pixels_buffer_offset) { + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( texture, target, @@ -2435,89 +2073,89 @@ public class EXTDirectStateAccess { pixels_buffer_offset); } - public static void glTextureSubImage3DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ByteBuffer pixels) { + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( - texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glTextureSubImage3DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.DoubleBuffer pixels) { + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( - texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glTextureSubImage3DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.FloatBuffer pixels) { + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( - texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glTextureSubImage3DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.IntBuffer pixels) { + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, int type, java.nio.IntBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( - texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glTextureSubImage3DEXT( - int texture, - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.EXTDirectStateAccess.glTextureSubImage3DEXT( - texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } public static boolean glUnmapNamedBufferEXT(int buffer) { @@ -2540,41 +2178,41 @@ public class EXTDirectStateAccess { org.lwjgl.opengl.EXTDirectStateAccess.glVertexArrayIndexOffsetEXT(vaobj, buffer, type, stride, offset); } - public static void glVertexArrayMultiTexCoordOffsetEXT( - int vaobj, int buffer, int texunit, int size, int type, int stride, long offset) { - org.lwjgl.opengl.EXTDirectStateAccess.glVertexArrayMultiTexCoordOffsetEXT( - vaobj, buffer, texunit, size, type, stride, offset); + public static void glVertexArrayMultiTexCoordOffsetEXT(int vaobj, int buffer, int texunit, int size, int type, + int stride, long offset) { + org.lwjgl.opengl.EXTDirectStateAccess + .glVertexArrayMultiTexCoordOffsetEXT(vaobj, buffer, texunit, size, type, stride, offset); } public static void glVertexArrayNormalOffsetEXT(int vaobj, int buffer, int type, int stride, long offset) { org.lwjgl.opengl.EXTDirectStateAccess.glVertexArrayNormalOffsetEXT(vaobj, buffer, type, stride, offset); } - public static void glVertexArraySecondaryColorOffsetEXT( - int vaobj, int buffer, int size, int type, int stride, long offset) { - org.lwjgl.opengl.EXTDirectStateAccess.glVertexArraySecondaryColorOffsetEXT( - vaobj, buffer, size, type, stride, offset); + public static void glVertexArraySecondaryColorOffsetEXT(int vaobj, int buffer, int size, int type, int stride, + long offset) { + org.lwjgl.opengl.EXTDirectStateAccess + .glVertexArraySecondaryColorOffsetEXT(vaobj, buffer, size, type, stride, offset); } - public static void glVertexArrayTexCoordOffsetEXT( - int vaobj, int buffer, int size, int type, int stride, long offset) { + public static void glVertexArrayTexCoordOffsetEXT(int vaobj, int buffer, int size, int type, int stride, + long offset) { org.lwjgl.opengl.EXTDirectStateAccess.glVertexArrayTexCoordOffsetEXT(vaobj, buffer, size, type, stride, offset); } - public static void glVertexArrayVertexAttribIOffsetEXT( - int vaobj, int buffer, int index, int size, int type, int stride, long offset) { - org.lwjgl.opengl.EXTDirectStateAccess.glVertexArrayVertexAttribIOffsetEXT( - vaobj, buffer, index, size, type, stride, offset); + public static void glVertexArrayVertexAttribIOffsetEXT(int vaobj, int buffer, int index, int size, int type, + int stride, long offset) { + org.lwjgl.opengl.EXTDirectStateAccess + .glVertexArrayVertexAttribIOffsetEXT(vaobj, buffer, index, size, type, stride, offset); } - public static void glVertexArrayVertexAttribOffsetEXT( - int vaobj, int buffer, int index, int size, int type, boolean normalized, int stride, long offset) { - org.lwjgl.opengl.EXTDirectStateAccess.glVertexArrayVertexAttribOffsetEXT( - vaobj, buffer, index, size, type, normalized, stride, offset); + public static void glVertexArrayVertexAttribOffsetEXT(int vaobj, int buffer, int index, int size, int type, + boolean normalized, int stride, long offset) { + org.lwjgl.opengl.EXTDirectStateAccess + .glVertexArrayVertexAttribOffsetEXT(vaobj, buffer, index, size, type, normalized, stride, offset); } - public static void glVertexArrayVertexOffsetEXT( - int vaobj, int buffer, int size, int type, int stride, long offset) { + public static void glVertexArrayVertexOffsetEXT(int vaobj, int buffer, int size, int type, int stride, + long offset) { org.lwjgl.opengl.EXTDirectStateAccess.glVertexArrayVertexOffsetEXT(vaobj, buffer, size, type, stride, offset); } } diff --git a/src/generated/java/org/lwjglx/opengl/EXTDrawBuffers2.java b/src/generated/java/org/lwjglx/opengl/EXTDrawBuffers2.java index 280b89d..ee45c23 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTDrawBuffers2.java +++ b/src/generated/java/org/lwjglx/opengl/EXTDrawBuffers2.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTDrawBuffers2 { + public static void glColorMaskIndexedEXT(int buf, boolean r, boolean g, boolean b, boolean a) { org.lwjgl.opengl.EXTDrawBuffers2.glColorMaskIndexedEXT(buf, r, g, b, a); } diff --git a/src/generated/java/org/lwjglx/opengl/EXTDrawInstanced.java b/src/generated/java/org/lwjglx/opengl/EXTDrawInstanced.java index d3c8079..002e1b8 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTDrawInstanced.java +++ b/src/generated/java/org/lwjglx/opengl/EXTDrawInstanced.java @@ -1,14 +1,15 @@ package org.lwjglx.opengl; public class EXTDrawInstanced { + public static void glDrawArraysInstancedEXT(int mode, int first, int count, int primcount) { org.lwjgl.opengl.EXTDrawInstanced.glDrawArraysInstancedEXT(mode, first, count, primcount); } - public static void glDrawElementsInstancedEXT( - int mode, int indices_count, int type, long indices_buffer_offset, int primcount) { - org.lwjgl.opengl.EXTDrawInstanced.glDrawElementsInstancedEXT( - mode, indices_count, type, indices_buffer_offset, primcount); + public static void glDrawElementsInstancedEXT(int mode, int indices_count, int type, long indices_buffer_offset, + int primcount) { + org.lwjgl.opengl.EXTDrawInstanced + .glDrawElementsInstancedEXT(mode, indices_count, type, indices_buffer_offset, primcount); } public static void glDrawElementsInstancedEXT(int mode, java.nio.ByteBuffer indices, int primcount) { diff --git a/src/generated/java/org/lwjglx/opengl/EXTFramebufferBlit.java b/src/generated/java/org/lwjglx/opengl/EXTFramebufferBlit.java index ec87a5e..4d4f5c5 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTFramebufferBlit.java +++ b/src/generated/java/org/lwjglx/opengl/EXTFramebufferBlit.java @@ -1,23 +1,15 @@ package org.lwjglx.opengl; public class EXTFramebufferBlit { + public static final int GL_DRAW_FRAMEBUFFER_BINDING_EXT = (int) 36006; public static final int GL_DRAW_FRAMEBUFFER_EXT = (int) 36009; public static final int GL_READ_FRAMEBUFFER_BINDING_EXT = (int) 36010; public static final int GL_READ_FRAMEBUFFER_EXT = (int) 36008; - public static void glBlitFramebufferEXT( - int srcX0, - int srcY0, - int srcX1, - int srcY1, - int dstX0, - int dstY0, - int dstX1, - int dstY1, - int mask, - int filter) { - org.lwjgl.opengl.EXTFramebufferBlit.glBlitFramebufferEXT( - srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + public static void glBlitFramebufferEXT(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, + int dstY1, int mask, int filter) { + org.lwjgl.opengl.EXTFramebufferBlit + .glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } } diff --git a/src/generated/java/org/lwjglx/opengl/EXTFramebufferMultisample.java b/src/generated/java/org/lwjglx/opengl/EXTFramebufferMultisample.java index 78d61f0..9d065d5 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTFramebufferMultisample.java +++ b/src/generated/java/org/lwjglx/opengl/EXTFramebufferMultisample.java @@ -1,13 +1,14 @@ package org.lwjglx.opengl; public class EXTFramebufferMultisample { + public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = (int) 36182; public static final int GL_MAX_SAMPLES_EXT = (int) 36183; public static final int GL_RENDERBUFFER_SAMPLES_EXT = (int) 36011; - public static void glRenderbufferStorageMultisampleEXT( - int target, int samples, int internalformat, int width, int height) { - org.lwjgl.opengl.EXTFramebufferMultisample.glRenderbufferStorageMultisampleEXT( - target, samples, internalformat, width, height); + public static void glRenderbufferStorageMultisampleEXT(int target, int samples, int internalformat, int width, + int height) { + org.lwjgl.opengl.EXTFramebufferMultisample + .glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height); } } diff --git a/src/generated/java/org/lwjglx/opengl/EXTFramebufferMultisampleBlitScaled.java b/src/generated/java/org/lwjglx/opengl/EXTFramebufferMultisampleBlitScaled.java index 1d9cbae..74af958 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTFramebufferMultisampleBlitScaled.java +++ b/src/generated/java/org/lwjglx/opengl/EXTFramebufferMultisampleBlitScaled.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTFramebufferMultisampleBlitScaled { + public static final int GL_SCALED_RESOLVE_FASTEST_EXT = (int) 37050; public static final int GL_SCALED_RESOLVE_NICEST_EXT = (int) 37051; } diff --git a/src/generated/java/org/lwjglx/opengl/EXTFramebufferObject.java b/src/generated/java/org/lwjglx/opengl/EXTFramebufferObject.java index 392e2a1..e78d50c 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTFramebufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/EXTFramebufferObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTFramebufferObject { + public static final int GL_COLOR_ATTACHMENT0_EXT = (int) 36064; public static final int GL_COLOR_ATTACHMENT10_EXT = (int) 36074; public static final int GL_COLOR_ATTACHMENT11_EXT = (int) 36075; @@ -81,10 +82,10 @@ public class EXTFramebufferObject { org.lwjgl.opengl.EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffers); } - public static void glFramebufferRenderbufferEXT( - int target, int attachment, int renderbuffertarget, int renderbuffer) { - org.lwjgl.opengl.EXTFramebufferObject.glFramebufferRenderbufferEXT( - target, attachment, renderbuffertarget, renderbuffer); + public static void glFramebufferRenderbufferEXT(int target, int attachment, int renderbuffertarget, + int renderbuffer) { + org.lwjgl.opengl.EXTFramebufferObject + .glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer); } public static void glFramebufferTexture1DEXT(int target, int attachment, int textarget, int texture, int level) { @@ -95,10 +96,10 @@ public class EXTFramebufferObject { org.lwjgl.opengl.EXTFramebufferObject.glFramebufferTexture2DEXT(target, attachment, textarget, texture, level); } - public static void glFramebufferTexture3DEXT( - int target, int attachment, int textarget, int texture, int level, int zoffset) { - org.lwjgl.opengl.EXTFramebufferObject.glFramebufferTexture3DEXT( - target, attachment, textarget, texture, level, zoffset); + public static void glFramebufferTexture3DEXT(int target, int attachment, int textarget, int texture, int level, + int zoffset) { + org.lwjgl.opengl.EXTFramebufferObject + .glFramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset); } public static int glGenFramebuffersEXT() { @@ -121,10 +122,10 @@ public class EXTFramebufferObject { org.lwjgl.opengl.EXTFramebufferObject.glGenerateMipmapEXT(target); } - public static void glGetFramebufferAttachmentParameterEXT( - int target, int attachment, int pname, java.nio.IntBuffer params) { - org.lwjgl.opengl.EXTFramebufferObject.glGetFramebufferAttachmentParameterivEXT( - target, attachment, pname, params); + public static void glGetFramebufferAttachmentParameterEXT(int target, int attachment, int pname, + java.nio.IntBuffer params) { + org.lwjgl.opengl.EXTFramebufferObject + .glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, params); } public static int glGetFramebufferAttachmentParameteriEXT(int target, int attachment, int pname) { diff --git a/src/generated/java/org/lwjglx/opengl/EXTFramebufferSRGB.java b/src/generated/java/org/lwjglx/opengl/EXTFramebufferSRGB.java index a95225f..79688d4 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTFramebufferSRGB.java +++ b/src/generated/java/org/lwjglx/opengl/EXTFramebufferSRGB.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTFramebufferSRGB { + public static final int GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT = (int) 8370; public static final int GL_FRAMEBUFFER_SRGB_CAPABLE_EXT = (int) 36282; public static final int GL_FRAMEBUFFER_SRGB_EXT = (int) 36281; diff --git a/src/generated/java/org/lwjglx/opengl/EXTGeometryShader4.java b/src/generated/java/org/lwjglx/opengl/EXTGeometryShader4.java index c576833..233ea0a 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTGeometryShader4.java +++ b/src/generated/java/org/lwjglx/opengl/EXTGeometryShader4.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTGeometryShader4 { + public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT = (int) 36263; public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = (int) 36052; public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT = (int) 36265; diff --git a/src/generated/java/org/lwjglx/opengl/EXTPackedDepthStencil.java b/src/generated/java/org/lwjglx/opengl/EXTPackedDepthStencil.java index 8740bfc..926aea2 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTPackedDepthStencil.java +++ b/src/generated/java/org/lwjglx/opengl/EXTPackedDepthStencil.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTPackedDepthStencil { + public static final int GL_DEPTH24_STENCIL8_EXT = (int) 35056; public static final int GL_DEPTH_STENCIL_EXT = (int) 34041; public static final int GL_TEXTURE_STENCIL_SIZE_EXT = (int) 35057; diff --git a/src/generated/java/org/lwjglx/opengl/EXTPackedFloat.java b/src/generated/java/org/lwjglx/opengl/EXTPackedFloat.java index f2a5cfd..02e7f6f 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTPackedFloat.java +++ b/src/generated/java/org/lwjglx/opengl/EXTPackedFloat.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTPackedFloat { + public static final int GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT = (int) 8; public static final int GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT = (int) 8369; public static final int GL_R11F_G11F_B10F_EXT = (int) 35898; diff --git a/src/generated/java/org/lwjglx/opengl/EXTPixelBufferObject.java b/src/generated/java/org/lwjglx/opengl/EXTPixelBufferObject.java index 5a50d7c..55d0603 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTPixelBufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/EXTPixelBufferObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTPixelBufferObject extends org.lwjglx.opengl.ARBBufferObject { + public static final int GL_PIXEL_PACK_BUFFER_BINDING_EXT = (int) 35053; public static final int GL_PIXEL_PACK_BUFFER_EXT = (int) 35051; public static final int GL_PIXEL_UNPACK_BUFFER_BINDING_EXT = (int) 35055; diff --git a/src/generated/java/org/lwjglx/opengl/EXTPointParameters.java b/src/generated/java/org/lwjglx/opengl/EXTPointParameters.java index 12387a3..2ee37f5 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTPointParameters.java +++ b/src/generated/java/org/lwjglx/opengl/EXTPointParameters.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTPointParameters { + public static final int GL_DISTANCE_ATTENUATION_EXT = (int) 33065; public static final int GL_POINT_FADE_THRESHOLD_SIZE_EXT = (int) 33064; public static final int GL_POINT_SIZE_MAX_EXT = (int) 33063; diff --git a/src/generated/java/org/lwjglx/opengl/EXTProvokingVertex.java b/src/generated/java/org/lwjglx/opengl/EXTProvokingVertex.java index c8f4009..329ddee 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTProvokingVertex.java +++ b/src/generated/java/org/lwjglx/opengl/EXTProvokingVertex.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTProvokingVertex { + public static final int GL_FIRST_VERTEX_CONVENTION_EXT = (int) 36429; public static final int GL_LAST_VERTEX_CONVENTION_EXT = (int) 36430; public static final int GL_PROVOKING_VERTEX_EXT = (int) 36431; diff --git a/src/generated/java/org/lwjglx/opengl/EXTSecondaryColor.java b/src/generated/java/org/lwjglx/opengl/EXTSecondaryColor.java index d7cc8a3..d9a4603 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTSecondaryColor.java +++ b/src/generated/java/org/lwjglx/opengl/EXTSecondaryColor.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTSecondaryColor { + public static final int GL_COLOR_SUM_EXT = (int) 33880; public static final int GL_CURRENT_SECONDARY_COLOR_EXT = (int) 33881; public static final int GL_SECONDARY_COLOR_ARRAY_EXT = (int) 33886; @@ -40,12 +41,12 @@ public class EXTSecondaryColor { public static void glSecondaryColorPointerEXT(int size, int stride, java.nio.FloatBuffer pPointer) { - org.lwjgl.opengl.EXTSecondaryColor.glSecondaryColorPointerEXT( - size, org.lwjgl.opengl.GL11.GL_FLOAT, stride, pPointer); + org.lwjgl.opengl.EXTSecondaryColor + .glSecondaryColorPointerEXT(size, org.lwjgl.opengl.GL11.GL_FLOAT, stride, pPointer); } - public static void glSecondaryColorPointerEXT( - int size, boolean unsigned, int stride, java.nio.ByteBuffer pPointer) { + public static void glSecondaryColorPointerEXT(int size, boolean unsigned, int stride, + java.nio.ByteBuffer pPointer) { org.lwjgl.opengl.EXTSecondaryColor.glSecondaryColorPointerEXT( size, diff --git a/src/generated/java/org/lwjglx/opengl/EXTSeparateShaderObjects.java b/src/generated/java/org/lwjglx/opengl/EXTSeparateShaderObjects.java index 41448fe..e33204d 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTSeparateShaderObjects.java +++ b/src/generated/java/org/lwjglx/opengl/EXTSeparateShaderObjects.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTSeparateShaderObjects { + public static final int GL_ACTIVE_PROGRAM_EXT = (int) 35725; public static void glActiveProgramEXT(int program) { diff --git a/src/generated/java/org/lwjglx/opengl/EXTShaderImageLoadStore.java b/src/generated/java/org/lwjglx/opengl/EXTShaderImageLoadStore.java index 7b665ca..e8cf7d0 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTShaderImageLoadStore.java +++ b/src/generated/java/org/lwjglx/opengl/EXTShaderImageLoadStore.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTShaderImageLoadStore { + public static final int GL_ALL_BARRIER_BITS_EXT = (int) -1; public static final int GL_ATOMIC_COUNTER_BARRIER_BIT_EXT = (int) 4096; public static final int GL_BUFFER_UPDATE_BARRIER_BIT_EXT = (int) 512; @@ -57,10 +58,10 @@ public class EXTShaderImageLoadStore { public static final int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT = (int) 36970; public static final int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT = (int) 1; - public static void glBindImageTextureEXT( - int index, int texture, int level, boolean layered, int layer, int access, int format) { - org.lwjgl.opengl.EXTShaderImageLoadStore.glBindImageTextureEXT( - index, texture, level, layered, layer, access, format); + public static void glBindImageTextureEXT(int index, int texture, int level, boolean layered, int layer, int access, + int format) { + org.lwjgl.opengl.EXTShaderImageLoadStore + .glBindImageTextureEXT(index, texture, level, layered, layer, access, format); } public static void glMemoryBarrierEXT(int barriers) { diff --git a/src/generated/java/org/lwjglx/opengl/EXTSharedTexturePalette.java b/src/generated/java/org/lwjglx/opengl/EXTSharedTexturePalette.java index 51dc54f..20dd71e 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTSharedTexturePalette.java +++ b/src/generated/java/org/lwjglx/opengl/EXTSharedTexturePalette.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class EXTSharedTexturePalette { + public static final int GL_SHARED_TEXTURE_PALETTE_EXT = (int) 33275; } diff --git a/src/generated/java/org/lwjglx/opengl/EXTStencilClearTag.java b/src/generated/java/org/lwjglx/opengl/EXTStencilClearTag.java index 6bce1e7..a747198 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTStencilClearTag.java +++ b/src/generated/java/org/lwjglx/opengl/EXTStencilClearTag.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTStencilClearTag { + public static final int GL_STENCIL_CLEAR_TAG_VALUE_EXT = (int) 35059; public static final int GL_STENCIL_TAG_BITS_EXT = (int) 35058; diff --git a/src/generated/java/org/lwjglx/opengl/EXTStencilTwoSide.java b/src/generated/java/org/lwjglx/opengl/EXTStencilTwoSide.java index a763068..40091b7 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTStencilTwoSide.java +++ b/src/generated/java/org/lwjglx/opengl/EXTStencilTwoSide.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTStencilTwoSide { + public static final int GL_ACTIVE_STENCIL_FACE_EXT = (int) 35089; public static final int GL_STENCIL_TEST_TWO_SIDE_EXT = (int) 35088; diff --git a/src/generated/java/org/lwjglx/opengl/EXTStencilWrap.java b/src/generated/java/org/lwjglx/opengl/EXTStencilWrap.java index 4e0ef13..076a4a4 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTStencilWrap.java +++ b/src/generated/java/org/lwjglx/opengl/EXTStencilWrap.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTStencilWrap { + public static final int GL_DECR_WRAP_EXT = (int) 34056; public static final int GL_INCR_WRAP_EXT = (int) 34055; } diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureArray.java b/src/generated/java/org/lwjglx/opengl/EXTTextureArray.java index 66b7473..1d16fd3 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureArray.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureArray.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureArray { + public static final int GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT = (int) 34894; public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = (int) 36052; public static final int GL_MAX_ARRAY_TEXTURE_LAYERS_EXT = (int) 35071; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureBufferObject.java b/src/generated/java/org/lwjglx/opengl/EXTTextureBufferObject.java index ccfc89d..ed49521 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureBufferObject.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureBufferObject.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureBufferObject { + public static final int GL_MAX_TEXTURE_BUFFER_SIZE_EXT = (int) 35883; public static final int GL_TEXTURE_BINDING_BUFFER_EXT = (int) 35884; public static final int GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT = (int) 35885; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionLATC.java b/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionLATC.java index 34065ee..f8db7df 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionLATC.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionLATC.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureCompressionLATC { + public static final int GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = (int) 35954; public static final int GL_COMPRESSED_LUMINANCE_LATC1_EXT = (int) 35952; public static final int GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = (int) 35955; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionRGTC.java b/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionRGTC.java index 3dac52d..c897e6b 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionRGTC.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionRGTC.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureCompressionRGTC { + public static final int GL_COMPRESSED_RED_GREEN_RGTC2_EXT = (int) 36285; public static final int GL_COMPRESSED_RED_RGTC1_EXT = (int) 36283; public static final int GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = (int) 36286; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionS3TC.java b/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionS3TC.java index 447ca5d..78515b7 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionS3TC.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureCompressionS3TC.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureCompressionS3TC { + public static final int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = (int) 33777; public static final int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = (int) 33778; public static final int GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = (int) 33779; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureFilterAnisotropic.java b/src/generated/java/org/lwjglx/opengl/EXTTextureFilterAnisotropic.java index 5016ea3..e92f901 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureFilterAnisotropic.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureFilterAnisotropic.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureFilterAnisotropic { + public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = (int) 34047; public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = (int) 34046; } diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureInteger.java b/src/generated/java/org/lwjglx/opengl/EXTTextureInteger.java index d9a2f3b..42073d3 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureInteger.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureInteger.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureInteger { + public static final int GL_ALPHA16I_EXT = (int) 36234; public static final int GL_ALPHA16UI_EXT = (int) 36216; public static final int GL_ALPHA32I_EXT = (int) 36228; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureMirrorClamp.java b/src/generated/java/org/lwjglx/opengl/EXTTextureMirrorClamp.java index 2d9be74..86e14a0 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureMirrorClamp.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureMirrorClamp.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureMirrorClamp { + public static final int GL_MIRROR_CLAMP_EXT = (int) 34626; public static final int GL_MIRROR_CLAMP_TO_BORDER_EXT = (int) 35090; public static final int GL_MIRROR_CLAMP_TO_EDGE_EXT = (int) 34627; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureSRGB.java b/src/generated/java/org/lwjglx/opengl/EXTTextureSRGB.java index 4510fc8..4e8e3d0 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureSRGB.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureSRGB.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureSRGB { + public static final int GL_COMPRESSED_SLUMINANCE_ALPHA_EXT = (int) 35915; public static final int GL_COMPRESSED_SLUMINANCE_EXT = (int) 35914; public static final int GL_COMPRESSED_SRGB_ALPHA_EXT = (int) 35913; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureSRGBDecode.java b/src/generated/java/org/lwjglx/opengl/EXTTextureSRGBDecode.java index 965a2ea..5e5c6c8 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureSRGBDecode.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureSRGBDecode.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureSRGBDecode { + public static final int GL_DECODE_EXT = (int) 35401; public static final int GL_SKIP_DECODE_EXT = (int) 35402; public static final int GL_TEXTURE_SRGB_DECODE_EXT = (int) 35400; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureSharedExponent.java b/src/generated/java/org/lwjglx/opengl/EXTTextureSharedExponent.java index 88e14b6..58eeb0c 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureSharedExponent.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureSharedExponent.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureSharedExponent { + public static final int GL_RGB9_E5_EXT = (int) 35901; public static final int GL_TEXTURE_SHARED_SIZE_EXT = (int) 35903; public static final int GL_UNSIGNED_INT_5_9_9_9_REV_EXT = (int) 35902; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureSnorm.java b/src/generated/java/org/lwjglx/opengl/EXTTextureSnorm.java index 42f00da..91f8b6e 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureSnorm.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureSnorm.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureSnorm { + public static final int GL_ALPHA16_SNORM = (int) 36888; public static final int GL_ALPHA8_SNORM = (int) 36884; public static final int GL_ALPHA_SNORM = (int) 36880; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTextureSwizzle.java b/src/generated/java/org/lwjglx/opengl/EXTTextureSwizzle.java index 48875f3..a5be2ca 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTextureSwizzle.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTextureSwizzle.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTextureSwizzle { + public static final int GL_TEXTURE_SWIZZLE_A_EXT = (int) 36421; public static final int GL_TEXTURE_SWIZZLE_B_EXT = (int) 36420; public static final int GL_TEXTURE_SWIZZLE_G_EXT = (int) 36419; diff --git a/src/generated/java/org/lwjglx/opengl/EXTTimerQuery.java b/src/generated/java/org/lwjglx/opengl/EXTTimerQuery.java index b4dfc56..2ceb1ba 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTimerQuery.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTimerQuery.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTimerQuery { + public static final int GL_TIME_ELAPSED_EXT = (int) 35007; public static void glGetQueryObjectEXT(int id, int pname, java.nio.LongBuffer params) { diff --git a/src/generated/java/org/lwjglx/opengl/EXTTransformFeedback.java b/src/generated/java/org/lwjglx/opengl/EXTTransformFeedback.java index a914ae0..40b1804 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTTransformFeedback.java +++ b/src/generated/java/org/lwjglx/opengl/EXTTransformFeedback.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTTransformFeedback { + public static final int GL_INTERLEAVED_ATTRIBS_EXT = (int) 35980; public static final int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT = (int) 35978; public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT = (int) 35979; @@ -37,21 +38,16 @@ public class EXTTransformFeedback { org.lwjgl.opengl.EXTTransformFeedback.glEndTransformFeedbackEXT(); } - public static java.lang.String glGetTransformFeedbackVaryingEXT( - int program, int index, int bufSize, java.nio.IntBuffer size, java.nio.IntBuffer type) { - return org.lwjgl.opengl.EXTTransformFeedback.glGetTransformFeedbackVaryingEXT( - program, index, bufSize, size, type); + public static java.lang.String glGetTransformFeedbackVaryingEXT(int program, int index, int bufSize, + java.nio.IntBuffer size, java.nio.IntBuffer type) { + return org.lwjgl.opengl.EXTTransformFeedback + .glGetTransformFeedbackVaryingEXT(program, index, bufSize, size, type); } - public static void glGetTransformFeedbackVaryingEXT( - int program, - int index, - java.nio.IntBuffer length, - java.nio.IntBuffer size, - java.nio.IntBuffer type, - java.nio.ByteBuffer name) { - org.lwjgl.opengl.EXTTransformFeedback.glGetTransformFeedbackVaryingEXT( - program, index, length, size, type, name); + public static void glGetTransformFeedbackVaryingEXT(int program, int index, java.nio.IntBuffer length, + java.nio.IntBuffer size, java.nio.IntBuffer type, java.nio.ByteBuffer name) { + org.lwjgl.opengl.EXTTransformFeedback + .glGetTransformFeedbackVaryingEXT(program, index, length, size, type, name); } public static void glTransformFeedbackVaryingsEXT(int program, java.lang.CharSequence[] varyings, int bufferMode) { diff --git a/src/generated/java/org/lwjglx/opengl/EXTVertexAttrib64bit.java b/src/generated/java/org/lwjglx/opengl/EXTVertexAttrib64bit.java index 8e46ef3..b591b73 100644 --- a/src/generated/java/org/lwjglx/opengl/EXTVertexAttrib64bit.java +++ b/src/generated/java/org/lwjglx/opengl/EXTVertexAttrib64bit.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class EXTVertexAttrib64bit { + public static final int GL_DOUBLE_MAT2_EXT = (int) 36678; public static final int GL_DOUBLE_MAT2x3_EXT = (int) 36681; public static final int GL_DOUBLE_MAT2x4_EXT = (int) 36682; @@ -18,10 +19,10 @@ public class EXTVertexAttrib64bit { org.lwjgl.opengl.EXTVertexAttrib64bit.glGetVertexAttribLdvEXT(index, pname, params); } - public static void glVertexArrayVertexAttribLOffsetEXT( - int vaobj, int buffer, int index, int size, int type, int stride, long offset) { - org.lwjgl.opengl.EXTVertexAttrib64bit.glVertexArrayVertexAttribLOffsetEXT( - vaobj, buffer, index, size, type, stride, offset); + public static void glVertexArrayVertexAttribLOffsetEXT(int vaobj, int buffer, int index, int size, int type, + int stride, long offset) { + org.lwjgl.opengl.EXTVertexAttrib64bit + .glVertexArrayVertexAttribLOffsetEXT(vaobj, buffer, index, size, type, stride, offset); } public static void glVertexAttribL1EXT(int index, java.nio.DoubleBuffer v) { diff --git a/src/generated/java/org/lwjglx/opengl/GL11.java b/src/generated/java/org/lwjglx/opengl/GL11.java index aa86d7e..af2f581 100644 --- a/src/generated/java/org/lwjglx/opengl/GL11.java +++ b/src/generated/java/org/lwjglx/opengl/GL11.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL11 { + public static final int GL_2D = (int) 1536; public static final int GL_2_BYTES = (int) 5127; public static final int GL_3D = (int) 1537; @@ -558,13 +559,13 @@ public class GL11 { org.lwjgl.opengl.GL11.glBindTexture(target, texture); } - public static void glBitmap( - int width, int height, float xorig, float yorig, float xmove, float ymove, long bitmap_buffer_offset) { + public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, + long bitmap_buffer_offset) { org.lwjgl.opengl.GL11.glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap_buffer_offset); } - public static void glBitmap( - int width, int height, float xorig, float yorig, float xmove, float ymove, java.nio.ByteBuffer bitmap) { + public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, + java.nio.ByteBuffer bitmap) { org.lwjgl.opengl.GL11.glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap); } @@ -687,13 +688,13 @@ public class GL11 { org.lwjgl.opengl.GL11.glCopyPixels(x, y, width, height, type); } - public static void glCopyTexImage1D( - int target, int level, int internalFormat, int x, int y, int width, int border) { + public static void glCopyTexImage1D(int target, int level, int internalFormat, int x, int y, int width, + int border) { org.lwjgl.opengl.GL11.glCopyTexImage1D(target, level, internalFormat, x, y, width, border); } - public static void glCopyTexImage2D( - int target, int level, int internalFormat, int x, int y, int width, int height, int border) { + public static void glCopyTexImage2D(int target, int level, int internalFormat, int x, int y, int width, int height, + int border) { org.lwjgl.opengl.GL11.glCopyTexImage2D(target, level, internalFormat, x, y, width, height, border); } @@ -701,8 +702,8 @@ public class GL11 { org.lwjgl.opengl.GL11.glCopyTexSubImage1D(target, level, xoffset, x, y, width); } - public static void glCopyTexSubImage2D( - int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { + public static void glCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, + int height) { org.lwjgl.opengl.GL11.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); } @@ -1211,31 +1212,13 @@ public class GL11 { org.lwjgl.opengl.GL11.glMap1f(target, u1, u2, stride, order, points); } - public static void glMap2d( - int target, - double u1, - double u2, - int ustride, - int uorder, - double v1, - double v2, - int vstride, - int vorder, - java.nio.DoubleBuffer points) { + public static void glMap2d(int target, double u1, double u2, int ustride, int uorder, double v1, double v2, + int vstride, int vorder, java.nio.DoubleBuffer points) { org.lwjgl.opengl.GL11.glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } - public static void glMap2f( - int target, - float u1, - float u2, - int ustride, - int uorder, - float v1, - float v2, - int vstride, - int vorder, - java.nio.FloatBuffer points) { + public static void glMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, + int vorder, java.nio.FloatBuffer points) { org.lwjgl.opengl.GL11.glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } @@ -1319,7 +1302,9 @@ public class GL11 { public static void glNormalPointer(int stride, java.nio.DoubleBuffer pointer) { org.lwjgl.opengl.GL11.glNormalPointer( - org.lwjgl.opengl.GL11.GL_DOUBLE, stride, me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(pointer)); + org.lwjgl.opengl.GL11.GL_DOUBLE, + stride, + me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(pointer)); } public static void glNormalPointer(int stride, java.nio.FloatBuffer pointer) { @@ -1480,34 +1465,34 @@ public class GL11 { org.lwjgl.opengl.GL11.glReadBuffer(mode); } - public static void glReadPixels( - int x, int y, int width, int height, int format, int type, long pixels_buffer_offset) { + public static void glReadPixels(int x, int y, int width, int height, int format, int type, + long pixels_buffer_offset) { org.lwjgl.opengl.GL11.glReadPixels(x, y, width, height, format, type, pixels_buffer_offset); } - public static void glReadPixels( - int x, int y, int width, int height, int format, int type, java.nio.ByteBuffer pixels) { + public static void glReadPixels(int x, int y, int width, int height, int format, int type, + java.nio.ByteBuffer pixels) { org.lwjgl.opengl.GL11.glReadPixels(x, y, width, height, format, type, pixels); } - public static void glReadPixels( - int x, int y, int width, int height, int format, int type, java.nio.DoubleBuffer pixels) { + public static void glReadPixels(int x, int y, int width, int height, int format, int type, + java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.GL11.glReadPixels(x, y, width, height, format, type, org.lwjglx.MemoryUtil.getAddress(pixels)); } - public static void glReadPixels( - int x, int y, int width, int height, int format, int type, java.nio.FloatBuffer pixels) { + public static void glReadPixels(int x, int y, int width, int height, int format, int type, + java.nio.FloatBuffer pixels) { org.lwjgl.opengl.GL11.glReadPixels(x, y, width, height, format, type, pixels); } - public static void glReadPixels( - int x, int y, int width, int height, int format, int type, java.nio.IntBuffer pixels) { + public static void glReadPixels(int x, int y, int width, int height, int format, int type, + java.nio.IntBuffer pixels) { org.lwjgl.opengl.GL11.glReadPixels(x, y, width, height, format, type, pixels); } - public static void glReadPixels( - int x, int y, int width, int height, int format, int type, java.nio.ShortBuffer pixels) { + public static void glReadPixels(int x, int y, int width, int height, int format, int type, + java.nio.ShortBuffer pixels) { org.lwjgl.opengl.GL11.glReadPixels(x, y, width, height, format, type, pixels); } @@ -1671,155 +1656,65 @@ public class GL11 { org.lwjgl.opengl.GL11.glTexGeni(coord, pname, param); } - public static void glTexImage1D( - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - long pixels_buffer_offset) { - org.lwjgl.opengl.GL11.glTexImage1D( - target, level, internalformat, width, border, format, type, pixels_buffer_offset); + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, + int type, long pixels_buffer_offset) { + org.lwjgl.opengl.GL11 + .glTexImage1D(target, level, internalformat, width, border, format, type, pixels_buffer_offset); } - public static void glTexImage1D( - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.ByteBuffer pixels) { + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, + int type, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.GL11.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); } - public static void glTexImage1D( - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.DoubleBuffer pixels) { + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, + int type, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.GL11.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); } - public static void glTexImage1D( - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.FloatBuffer pixels) { + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, + int type, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.GL11.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); } - public static void glTexImage1D( - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.IntBuffer pixels) { + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, + int type, java.nio.IntBuffer pixels) { org.lwjgl.opengl.GL11.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); } - public static void glTexImage1D( - int target, - int level, - int internalformat, - int width, - int border, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, + int type, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.GL11.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); } - public static void glTexImage2D( - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - long pixels_buffer_offset) { - org.lwjgl.opengl.GL11.glTexImage2D( - target, level, internalformat, width, height, border, format, type, pixels_buffer_offset); + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, + int format, int type, long pixels_buffer_offset) { + org.lwjgl.opengl.GL11 + .glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels_buffer_offset); } - public static void glTexImage2D( - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.ByteBuffer pixels) { + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, + int format, int type, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } - public static void glTexImage2D( - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.DoubleBuffer pixels) { + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, + int format, int type, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } - public static void glTexImage2D( - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.FloatBuffer pixels) { + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, + int format, int type, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } - public static void glTexImage2D( - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.IntBuffer pixels) { + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, + int format, int type, java.nio.IntBuffer pixels) { org.lwjgl.opengl.GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } - public static void glTexImage2D( - int target, - int level, - int internalformat, - int width, - int height, - int border, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, + int format, int type, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } @@ -1839,112 +1734,64 @@ public class GL11 { org.lwjgl.opengl.GL11.glTexParameteri(target, pname, param); } - public static void glTexSubImage1D( - int target, int level, int xoffset, int width, int format, int type, long pixels_buffer_offset) { + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, + long pixels_buffer_offset) { org.lwjgl.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels_buffer_offset); } - public static void glTexSubImage1D( - int target, int level, int xoffset, int width, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - public static void glTexSubImage1D( - int target, int level, int xoffset, int width, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - public static void glTexSubImage1D( - int target, int level, int xoffset, int width, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - public static void glTexSubImage1D( - int target, int level, int xoffset, int width, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - public static void glTexSubImage1D( - int target, int level, int xoffset, int width, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); - } - - public static void glTexSubImage2D( - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - long pixels_buffer_offset) { - org.lwjgl.opengl.GL11.glTexSubImage2D( - target, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset); - } - - public static void glTexSubImage2D( - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + org.lwjgl.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); } - public static void glTexSubImage2D( - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + org.lwjgl.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); } - public static void glTexSubImage2D( - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + org.lwjgl.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); } - public static void glTexSubImage2D( - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); + } + + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, + java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.GL11.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); + } + + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, + int format, int type, long pixels_buffer_offset) { + org.lwjgl.opengl.GL11 + .glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset); + } + + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTexSubImage2D( - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + } + + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + } + + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + } + + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); } diff --git a/src/generated/java/org/lwjglx/opengl/GL12.java b/src/generated/java/org/lwjglx/opengl/GL12.java index d74fdae..93d32e6 100644 --- a/src/generated/java/org/lwjglx/opengl/GL12.java +++ b/src/generated/java/org/lwjglx/opengl/GL12.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL12 { + public static final int GL_ALIASED_LINE_WIDTH_RANGE = (int) 33902; public static final int GL_ALIASED_POINT_SIZE_RANGE = (int) 33901; public static final int GL_BGR = (int) 32992; @@ -43,13 +44,13 @@ public class GL12 { public static final int GL_UNSIGNED_SHORT_5_6_5 = (int) 33635; public static final int GL_UNSIGNED_SHORT_5_6_5_REV = (int) 33636; - public static void glCopyTexSubImage3D( - int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) { + public static void glCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, + int width, int height) { org.lwjgl.opengl.GL12.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); } - public static void glDrawRangeElements( - int mode, int start, int end, int indices_count, int type, long indices_buffer_offset) { + public static void glDrawRangeElements(int mode, int start, int end, int indices_count, int type, + long indices_buffer_offset) { org.lwjgl.opengl.GL12.glDrawRangeElements(mode, start, end, indices_count, type, indices_buffer_offset); } @@ -65,189 +66,94 @@ public class GL12 { org.lwjgl.opengl.GL12.glDrawRangeElements(mode, start, end, indices); } - public static void glTexImage3D( - int target, - int level, - int internalFormat, - int width, - int height, - int depth, - int border, - int format, - int type, - long pixels_buffer_offset) { + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, + int border, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.GL12.glTexImage3D( - target, level, internalFormat, width, height, depth, border, format, type, pixels_buffer_offset); + target, + level, + internalFormat, + width, + height, + depth, + border, + format, + type, + pixels_buffer_offset); } - public static void glTexImage3D( - int target, - int level, - int internalFormat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.GL12.glTexImage3D( - target, level, internalFormat, width, height, depth, border, format, type, pixels); + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, + int border, int format, int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.GL12 + .glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); } - public static void glTexImage3D( - int target, - int level, - int internalFormat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.GL12.glTexImage3D( - target, level, internalFormat, width, height, depth, border, format, type, pixels); + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, + int border, int format, int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.GL12 + .glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); } - public static void glTexImage3D( - int target, - int level, - int internalFormat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.GL12.glTexImage3D( - target, level, internalFormat, width, height, depth, border, format, type, pixels); + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, + int border, int format, int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.GL12 + .glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); } - public static void glTexImage3D( - int target, - int level, - int internalFormat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.IntBuffer pixels) { - org.lwjgl.opengl.GL12.glTexImage3D( - target, level, internalFormat, width, height, depth, border, format, type, pixels); + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, + int border, int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.GL12 + .glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); } - public static void glTexImage3D( - int target, - int level, - int internalFormat, - int width, - int height, - int depth, - int border, - int format, - int type, - java.nio.ShortBuffer pixels) { - org.lwjgl.opengl.GL12.glTexImage3D( - target, level, internalFormat, width, height, depth, border, format, type, pixels); + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, + int border, int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.GL12 + .glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels); } - public static void glTexSubImage3D( - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - long pixels_buffer_offset) { + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.GL12.glTexSubImage3D( - target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_buffer_offset); + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels_buffer_offset); } - public static void glTexSubImage3D( - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.GL12.glTexSubImage3D( - target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.GL12 + .glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } - public static void glTexSubImage3D( - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.GL12.glTexSubImage3D( - target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.GL12 + .glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } - public static void glTexSubImage3D( - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.GL12.glTexSubImage3D( - target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.GL12 + .glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } - public static void glTexSubImage3D( - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.IntBuffer pixels) { - org.lwjgl.opengl.GL12.glTexSubImage3D( - target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.GL12 + .glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } - public static void glTexSubImage3D( - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ShortBuffer pixels) { - org.lwjgl.opengl.GL12.glTexSubImage3D( - target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.GL12 + .glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } } diff --git a/src/generated/java/org/lwjglx/opengl/GL13.java b/src/generated/java/org/lwjglx/opengl/GL13.java index 7215f28..27b3af3 100644 --- a/src/generated/java/org/lwjglx/opengl/GL13.java +++ b/src/generated/java/org/lwjglx/opengl/GL13.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL13 { + public static final int GL_ACTIVE_TEXTURE = (int) 34016; public static final int GL_ADD_SIGNED = (int) 34164; public static final int GL_CLAMP_TO_BORDER = (int) 33069; @@ -106,116 +107,92 @@ public class GL13 { org.lwjgl.opengl.GL13.glClientActiveTexture(texture); } - public static void glCompressedTexImage1D( - int target, - int level, - int internalformat, - int width, - int border, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, + int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.GL13.glCompressedTexImage1D( - target, level, internalformat, width, border, data_imageSize, data_buffer_offset); + target, + level, + internalformat, + width, + border, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTexImage1D( - int target, int level, int internalformat, int width, int border, java.nio.ByteBuffer data) { + public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, + java.nio.ByteBuffer data) { org.lwjgl.opengl.GL13.glCompressedTexImage1D(target, level, internalformat, width, border, data); } - public static void glCompressedTexImage2D( - int target, - int level, - int internalformat, - int width, - int height, - int border, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, + int border, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.GL13.glCompressedTexImage2D( - target, level, internalformat, width, height, border, data_imageSize, data_buffer_offset); + target, + level, + internalformat, + width, + height, + border, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTexImage2D( - int target, int level, int internalformat, int width, int height, int border, java.nio.ByteBuffer data) { + public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, + int border, java.nio.ByteBuffer data) { org.lwjgl.opengl.GL13.glCompressedTexImage2D(target, level, internalformat, width, height, border, data); } - public static void glCompressedTexImage3D( - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, + int depth, int border, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.GL13.glCompressedTexImage3D( - target, level, internalformat, width, height, depth, border, data_imageSize, data_buffer_offset); + target, + level, + internalformat, + width, + height, + depth, + border, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTexImage3D( - int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - java.nio.ByteBuffer data) { + public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, + int depth, int border, java.nio.ByteBuffer data) { org.lwjgl.opengl.GL13.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, data); } - public static void glCompressedTexSubImage1D( - int target, int level, int xoffset, int width, int format, int data_imageSize, long data_buffer_offset) { - org.lwjgl.opengl.GL13.glCompressedTexSubImage1D( - target, level, xoffset, width, format, data_imageSize, data_buffer_offset); + public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, + int data_imageSize, long data_buffer_offset) { + org.lwjgl.opengl.GL13 + .glCompressedTexSubImage1D(target, level, xoffset, width, format, data_imageSize, data_buffer_offset); } - public static void glCompressedTexSubImage1D( - int target, int level, int xoffset, int width, int format, java.nio.ByteBuffer data) { + public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, + java.nio.ByteBuffer data) { org.lwjgl.opengl.GL13.glCompressedTexSubImage1D(target, level, xoffset, width, format, data); } - public static void glCompressedTexSubImage2D( - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, + int format, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.GL13.glCompressedTexSubImage2D( - target, level, xoffset, yoffset, width, height, format, data_imageSize, data_buffer_offset); + target, + level, + xoffset, + yoffset, + width, + height, + format, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTexSubImage2D( - int target, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - java.nio.ByteBuffer data) { + public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, + int format, java.nio.ByteBuffer data) { org.lwjgl.opengl.GL13.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data); } - public static void glCompressedTexSubImage3D( - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.GL13.glCompressedTexSubImage3D( target, level, @@ -230,19 +207,19 @@ public class GL13 { data_buffer_offset); } - public static void glCompressedTexSubImage3D( - int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - java.nio.ByteBuffer data) { + public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, java.nio.ByteBuffer data) { org.lwjgl.opengl.GL13.glCompressedTexSubImage3D( - target, level, xoffset, yoffset, zoffset, width, height, depth, format, data); + target, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + data); } public static void glGetCompressedTexImage(int target, int lod, long img_buffer_offset) { diff --git a/src/generated/java/org/lwjglx/opengl/GL14.java b/src/generated/java/org/lwjglx/opengl/GL14.java index 4ecf54c..a663f5b 100644 --- a/src/generated/java/org/lwjglx/opengl/GL14.java +++ b/src/generated/java/org/lwjglx/opengl/GL14.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL14 { + public static final int GL_BLEND_COLOR = (int) 32773; public static final int GL_BLEND_DST_ALPHA = (int) 32970; public static final int GL_BLEND_DST_RGB = (int) 32968; @@ -67,7 +68,9 @@ public class GL14 { public static void glFogCoordPointer(int stride, java.nio.DoubleBuffer data) { org.lwjgl.opengl.GL14.glFogCoordPointer( - org.lwjgl.opengl.GL11.GL_DOUBLE, stride, me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(data)); + org.lwjgl.opengl.GL11.GL_DOUBLE, + stride, + me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(data)); } public static void glFogCoordPointer(int stride, java.nio.FloatBuffer data) { @@ -126,7 +129,10 @@ public class GL14 { public static void glSecondaryColorPointer(int size, int stride, java.nio.DoubleBuffer data) { org.lwjgl.opengl.GL14.glSecondaryColorPointer( - size, org.lwjgl.opengl.GL11.GL_DOUBLE, stride, me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(data)); + size, + org.lwjgl.opengl.GL11.GL_DOUBLE, + stride, + me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(data)); } public static void glSecondaryColorPointer(int size, int stride, java.nio.FloatBuffer data) { diff --git a/src/generated/java/org/lwjglx/opengl/GL15.java b/src/generated/java/org/lwjglx/opengl/GL15.java index 936fe25..f869fb1 100644 --- a/src/generated/java/org/lwjglx/opengl/GL15.java +++ b/src/generated/java/org/lwjglx/opengl/GL15.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL15 { + public static final int GL_ARRAY_BUFFER = (int) 34962; public static final int GL_ARRAY_BUFFER_BINDING = (int) 34964; public static final int GL_BUFFER_ACCESS = (int) 35003; diff --git a/src/generated/java/org/lwjglx/opengl/GL20.java b/src/generated/java/org/lwjglx/opengl/GL20.java index c1b696b..1d5955d 100644 --- a/src/generated/java/org/lwjglx/opengl/GL20.java +++ b/src/generated/java/org/lwjglx/opengl/GL20.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL20 { + public static final int GL_ACTIVE_ATTRIBUTES = (int) 35721; public static final int GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = (int) 35722; public static final int GL_ACTIVE_UNIFORMS = (int) 35718; @@ -143,23 +144,13 @@ public class GL20 { org.lwjgl.opengl.GL20.glEnableVertexAttribArray(index); } - public static void glGetActiveAttrib( - int program, - int index, - java.nio.IntBuffer length, - java.nio.IntBuffer size, - java.nio.IntBuffer type, - java.nio.ByteBuffer name) { + public static void glGetActiveAttrib(int program, int index, java.nio.IntBuffer length, java.nio.IntBuffer size, + java.nio.IntBuffer type, java.nio.ByteBuffer name) { org.lwjgl.opengl.GL20.glGetActiveAttrib(program, index, length, size, type, name); } - public static void glGetActiveUniform( - int program, - int index, - java.nio.IntBuffer length, - java.nio.IntBuffer size, - java.nio.IntBuffer type, - java.nio.ByteBuffer name) { + public static void glGetActiveUniform(int program, int index, java.nio.IntBuffer length, java.nio.IntBuffer size, + java.nio.IntBuffer type, java.nio.ByteBuffer name) { org.lwjgl.opengl.GL20.glGetActiveUniform(program, index, length, size, type, name); } @@ -416,18 +407,18 @@ public class GL20 { org.lwjgl.opengl.GL20.glVertexAttrib4s(index, x, y, z, w); } - public static void glVertexAttribPointer( - int index, int size, int type, boolean normalized, int stride, long buffer_buffer_offset) { + public static void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, + long buffer_buffer_offset) { org.lwjgl.opengl.GL20.glVertexAttribPointer(index, size, type, normalized, stride, buffer_buffer_offset); } - public static void glVertexAttribPointer( - int index, int size, int type, boolean normalized, int stride, java.nio.ByteBuffer buffer) { + public static void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, + java.nio.ByteBuffer buffer) { org.lwjgl.opengl.GL20.glVertexAttribPointer(index, size, type, normalized, stride, buffer); } - public static void glVertexAttribPointer( - int index, int size, boolean normalized, int stride, java.nio.DoubleBuffer buffer) { + public static void glVertexAttribPointer(int index, int size, boolean normalized, int stride, + java.nio.DoubleBuffer buffer) { org.lwjgl.opengl.GL20.glVertexAttribPointer( index, @@ -438,15 +429,15 @@ public class GL20 { me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(buffer)); } - public static void glVertexAttribPointer( - int index, int size, boolean normalized, int stride, java.nio.FloatBuffer buffer) { + public static void glVertexAttribPointer(int index, int size, boolean normalized, int stride, + java.nio.FloatBuffer buffer) { - org.lwjgl.opengl.GL20.glVertexAttribPointer( - index, size, org.lwjgl.opengl.GL11.GL_FLOAT, normalized, stride, buffer); + org.lwjgl.opengl.GL20 + .glVertexAttribPointer(index, size, org.lwjgl.opengl.GL11.GL_FLOAT, normalized, stride, buffer); } - public static void glVertexAttribPointer( - int index, int size, boolean unsigned, boolean normalized, int stride, java.nio.ByteBuffer buffer) { + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, + java.nio.ByteBuffer buffer) { org.lwjgl.opengl.GL20.glVertexAttribPointer( index, @@ -457,8 +448,8 @@ public class GL20 { org.lwjglx.MemoryUtil.getAddress(buffer)); } - public static void glVertexAttribPointer( - int index, int size, boolean unsigned, boolean normalized, int stride, java.nio.IntBuffer buffer) { + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, + java.nio.IntBuffer buffer) { org.lwjgl.opengl.GL20.glVertexAttribPointer( index, @@ -469,8 +460,8 @@ public class GL20 { org.lwjglx.MemoryUtil.getAddress(buffer)); } - public static void glVertexAttribPointer( - int index, int size, boolean unsigned, boolean normalized, int stride, java.nio.ShortBuffer buffer) { + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, + java.nio.ShortBuffer buffer) { org.lwjgl.opengl.GL20.glVertexAttribPointer( index, diff --git a/src/generated/java/org/lwjglx/opengl/GL21.java b/src/generated/java/org/lwjglx/opengl/GL21.java index da04968..b99ce25 100644 --- a/src/generated/java/org/lwjglx/opengl/GL21.java +++ b/src/generated/java/org/lwjglx/opengl/GL21.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL21 { + public static final int GL_COMPRESSED_SLUMINANCE = (int) 35914; public static final int GL_COMPRESSED_SLUMINANCE_ALPHA = (int) 35915; public static final int GL_COMPRESSED_SRGB = (int) 35912; diff --git a/src/generated/java/org/lwjglx/opengl/GL30.java b/src/generated/java/org/lwjglx/opengl/GL30.java index ee32927..4971598 100644 --- a/src/generated/java/org/lwjglx/opengl/GL30.java +++ b/src/generated/java/org/lwjglx/opengl/GL30.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL30 { + public static final int GL_ALPHA16F = (int) 34844; public static final int GL_ALPHA16I = (int) 36234; public static final int GL_ALPHA16UI = (int) 36216; @@ -277,17 +278,8 @@ public class GL30 { org.lwjgl.opengl.GL30.glBindVertexArray(array); } - public static void glBlitFramebuffer( - int srcX0, - int srcY0, - int srcX1, - int srcY1, - int dstX0, - int dstY0, - int dstX1, - int dstY1, - int mask, - int filter) { + public static void glBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, + int dstY1, int mask, int filter) { org.lwjgl.opengl.GL30.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } @@ -375,8 +367,8 @@ public class GL30 { org.lwjgl.opengl.GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level); } - public static void glFramebufferTexture3D( - int target, int attachment, int textarget, int texture, int level, int zoffset) { + public static void glFramebufferTexture3D(int target, int attachment, int textarget, int texture, int level, + int zoffset) { org.lwjgl.opengl.GL30.glFramebufferTexture3D(target, attachment, textarget, texture, level, zoffset); } @@ -424,8 +416,8 @@ public class GL30 { return org.lwjgl.opengl.GL30.glGetFragDataLocation(program, name); } - public static void glGetFramebufferAttachmentParameter( - int target, int attachment, int pname, java.nio.IntBuffer params) { + public static void glGetFramebufferAttachmentParameter(int target, int attachment, int pname, + java.nio.IntBuffer params) { org.lwjgl.opengl.GL30.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); } @@ -465,18 +457,13 @@ public class GL30 { return org.lwjgl.opengl.GL30.glGetTexParameterIui(target, pname); } - public static java.lang.String glGetTransformFeedbackVarying( - int program, int index, int bufSize, java.nio.IntBuffer size, java.nio.IntBuffer type) { + public static java.lang.String glGetTransformFeedbackVarying(int program, int index, int bufSize, + java.nio.IntBuffer size, java.nio.IntBuffer type) { return org.lwjgl.opengl.GL30.glGetTransformFeedbackVarying(program, index, bufSize, size, type); } - public static void glGetTransformFeedbackVarying( - int program, - int index, - java.nio.IntBuffer length, - java.nio.IntBuffer size, - java.nio.IntBuffer type, - java.nio.ByteBuffer name) { + public static void glGetTransformFeedbackVarying(int program, int index, java.nio.IntBuffer length, + java.nio.IntBuffer size, java.nio.IntBuffer type, java.nio.ByteBuffer name) { org.lwjgl.opengl.GL30.glGetTransformFeedbackVarying(program, index, length, size, type, name); } @@ -508,8 +495,8 @@ public class GL30 { return org.lwjgl.opengl.GL30.glIsVertexArray(array); } - public static java.nio.ByteBuffer glMapBufferRange( - int target, long offset, long length, int access, java.nio.ByteBuffer old_buffer) { + public static java.nio.ByteBuffer glMapBufferRange(int target, long offset, long length, int access, + java.nio.ByteBuffer old_buffer) { return org.lwjgl.opengl.GL30.glMapBufferRange(target, offset, length, access, old_buffer); } @@ -517,8 +504,8 @@ public class GL30 { org.lwjgl.opengl.GL30.glRenderbufferStorage(target, internalformat, width, height); } - public static void glRenderbufferStorageMultisample( - int target, int samples, int internalformat, int width, int height) { + public static void glRenderbufferStorageMultisample(int target, int samples, int internalformat, int width, + int height) { org.lwjgl.opengl.GL30.glRenderbufferStorageMultisample(target, samples, internalformat, width, height); } diff --git a/src/generated/java/org/lwjglx/opengl/GL31.java b/src/generated/java/org/lwjglx/opengl/GL31.java index fe12574..9ea233f 100644 --- a/src/generated/java/org/lwjglx/opengl/GL31.java +++ b/src/generated/java/org/lwjglx/opengl/GL31.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL31 { + public static final int GL_ACTIVE_UNIFORM_BLOCKS = (int) 35382; public static final int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = (int) 35381; public static final int GL_COPY_READ_BUFFER = (int) 36662; @@ -65,8 +66,8 @@ public class GL31 { public static final int GL_UNIFORM_SIZE = (int) 35384; public static final int GL_UNIFORM_TYPE = (int) 35383; - public static void glCopyBufferSubData( - int readtarget, int writetarget, long readoffset, long writeoffset, long size) { + public static void glCopyBufferSubData(int readtarget, int writetarget, long readoffset, long writeoffset, + long size) { org.lwjgl.opengl.GL31.glCopyBufferSubData(readtarget, writetarget, readoffset, writeoffset, size); } @@ -74,8 +75,8 @@ public class GL31 { org.lwjgl.opengl.GL31.glDrawArraysInstanced(mode, first, count, primcount); } - public static void glDrawElementsInstanced( - int mode, int indices_count, int type, long indices_buffer_offset, int primcount) { + public static void glDrawElementsInstanced(int mode, int indices_count, int type, long indices_buffer_offset, + int primcount) { org.lwjgl.opengl.GL31.glDrawElementsInstanced(mode, indices_count, type, indices_buffer_offset, primcount); } @@ -91,8 +92,8 @@ public class GL31 { org.lwjgl.opengl.GL31.glDrawElementsInstanced(mode, indices, primcount); } - public static void glGetActiveUniformBlock( - int program, int uniformBlockIndex, int pname, java.nio.IntBuffer params) { + public static void glGetActiveUniformBlock(int program, int uniformBlockIndex, int pname, + java.nio.IntBuffer params) { org.lwjgl.opengl.GL31.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); } @@ -100,8 +101,8 @@ public class GL31 { return org.lwjgl.opengl.GL31.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize); } - public static void glGetActiveUniformBlockName( - int program, int uniformBlockIndex, java.nio.IntBuffer length, java.nio.ByteBuffer uniformBlockName) { + public static void glGetActiveUniformBlockName(int program, int uniformBlockIndex, java.nio.IntBuffer length, + java.nio.ByteBuffer uniformBlockName) { org.lwjgl.opengl.GL31.glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName); } @@ -113,13 +114,13 @@ public class GL31 { return org.lwjgl.opengl.GL31.glGetActiveUniformName(program, uniformIndex, bufSize); } - public static void glGetActiveUniformName( - int program, int uniformIndex, java.nio.IntBuffer length, java.nio.ByteBuffer uniformName) { + public static void glGetActiveUniformName(int program, int uniformIndex, java.nio.IntBuffer length, + java.nio.ByteBuffer uniformName) { org.lwjgl.opengl.GL31.glGetActiveUniformName(program, uniformIndex, length, uniformName); } - public static void glGetActiveUniforms( - int program, java.nio.IntBuffer uniformIndices, int pname, java.nio.IntBuffer params) { + public static void glGetActiveUniforms(int program, java.nio.IntBuffer uniformIndices, int pname, + java.nio.IntBuffer params) { org.lwjgl.opengl.GL31.glGetActiveUniformsiv(program, uniformIndices, pname, params); } @@ -135,8 +136,8 @@ public class GL31 { return org.lwjgl.opengl.GL31.glGetUniformBlockIndex(program, uniformBlockName); } - public static void glGetUniformIndices( - int program, java.lang.CharSequence[] uniformNames, java.nio.IntBuffer uniformIndices) { + public static void glGetUniformIndices(int program, java.lang.CharSequence[] uniformNames, + java.nio.IntBuffer uniformIndices) { org.lwjgl.opengl.GL31.glGetUniformIndices(program, uniformNames, uniformIndices); } diff --git a/src/generated/java/org/lwjglx/opengl/GL32.java b/src/generated/java/org/lwjglx/opengl/GL32.java index 862ff96..c0bd566 100644 --- a/src/generated/java/org/lwjglx/opengl/GL32.java +++ b/src/generated/java/org/lwjglx/opengl/GL32.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL32 { + public static final int GL_ALREADY_SIGNALED = (int) 37146; public static final int GL_CONDITION_SATISFIED = (int) 37148; public static final int GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = (int) 2; @@ -66,8 +67,8 @@ public class GL32 { public static final int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = (int) 37133; public static final int GL_WAIT_FAILED = (int) 37149; - public static void glDrawElementsBaseVertex( - int mode, int indices_count, int type, long indices_buffer_offset, int basevertex) { + public static void glDrawElementsBaseVertex(int mode, int indices_count, int type, long indices_buffer_offset, + int basevertex) { org.lwjgl.opengl.GL32.glDrawElementsBaseVertex(mode, indices_count, type, indices_buffer_offset, basevertex); } @@ -83,52 +84,63 @@ public class GL32 { org.lwjgl.opengl.GL32.glDrawElementsBaseVertex(mode, indices, basevertex); } - public static void glDrawElementsInstancedBaseVertex( - int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int basevertex) { + public static void glDrawElementsInstancedBaseVertex(int mode, int indices_count, int type, + long indices_buffer_offset, int primcount, int basevertex) { org.lwjgl.opengl.GL32.glDrawElementsInstancedBaseVertex( - mode, indices_count, type, indices_buffer_offset, primcount, basevertex); + mode, + indices_count, + type, + indices_buffer_offset, + primcount, + basevertex); } - public static void glDrawElementsInstancedBaseVertex( - int mode, java.nio.ByteBuffer indices, int primcount, int basevertex) { + public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.ByteBuffer indices, int primcount, + int basevertex) { org.lwjgl.opengl.GL32.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); } - public static void glDrawElementsInstancedBaseVertex( - int mode, java.nio.IntBuffer indices, int primcount, int basevertex) { + public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.IntBuffer indices, int primcount, + int basevertex) { org.lwjgl.opengl.GL32.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); } - public static void glDrawElementsInstancedBaseVertex( - int mode, java.nio.ShortBuffer indices, int primcount, int basevertex) { + public static void glDrawElementsInstancedBaseVertex(int mode, java.nio.ShortBuffer indices, int primcount, + int basevertex) { org.lwjgl.opengl.GL32.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); } - public static void glDrawRangeElementsBaseVertex( - int mode, int start, int end, int indices_count, int type, long indices_buffer_offset, int basevertex) { + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, int indices_count, int type, + long indices_buffer_offset, int basevertex) { org.lwjgl.opengl.GL32.glDrawRangeElementsBaseVertex( - mode, start, end, indices_count, type, indices_buffer_offset, basevertex); + mode, + start, + end, + indices_count, + type, + indices_buffer_offset, + basevertex); } - public static void glDrawRangeElementsBaseVertex( - int mode, int start, int end, java.nio.ByteBuffer indices, int basevertex) { + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.ByteBuffer indices, + int basevertex) { org.lwjgl.opengl.GL32.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); } - public static void glDrawRangeElementsBaseVertex( - int mode, int start, int end, java.nio.IntBuffer indices, int basevertex) { + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.IntBuffer indices, + int basevertex) { org.lwjgl.opengl.GL32.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); } - public static void glDrawRangeElementsBaseVertex( - int mode, int start, int end, java.nio.ShortBuffer indices, int basevertex) { + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, java.nio.ShortBuffer indices, + int basevertex) { org.lwjgl.opengl.GL32.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); } public static org.lwjglx.opengl.GLSync glFenceSync(int condition, int flags) { - org.lwjglx.opengl.GLSync returnValue = - new org.lwjglx.opengl.GLSync(org.lwjgl.opengl.GL32.glFenceSync(condition, flags)); + org.lwjglx.opengl.GLSync returnValue = new org.lwjglx.opengl.GLSync( + org.lwjgl.opengl.GL32.glFenceSync(condition, flags)); return returnValue; } @@ -169,21 +181,15 @@ public class GL32 { org.lwjgl.opengl.GL32.glSampleMaski(index, mask); } - public static void glTexImage2DMultisample( - int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { - org.lwjgl.opengl.GL32.glTexImage2DMultisample( - target, samples, internalformat, width, height, fixedsamplelocations); + public static void glTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, + boolean fixedsamplelocations) { + org.lwjgl.opengl.GL32 + .glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); } - public static void glTexImage3DMultisample( - int target, - int samples, - int internalformat, - int width, - int height, - int depth, - boolean fixedsamplelocations) { - org.lwjgl.opengl.GL32.glTexImage3DMultisample( - target, samples, internalformat, width, height, depth, fixedsamplelocations); + public static void glTexImage3DMultisample(int target, int samples, int internalformat, int width, int height, + int depth, boolean fixedsamplelocations) { + org.lwjgl.opengl.GL32 + .glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); } } diff --git a/src/generated/java/org/lwjglx/opengl/GL33.java b/src/generated/java/org/lwjglx/opengl/GL33.java index d1b1ca1..d673754 100644 --- a/src/generated/java/org/lwjglx/opengl/GL33.java +++ b/src/generated/java/org/lwjglx/opengl/GL33.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL33 { + public static final int GL_ANY_SAMPLES_PASSED = (int) 35887; public static final int GL_INT_2_10_10_10_REV = (int) 36255; public static final int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = (int) 35068; @@ -18,13 +19,13 @@ public class GL33 { public static final int GL_TIME_ELAPSED = (int) 35007; public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = (int) 35070; - public static void glBindFragDataLocationIndexed( - int program, int colorNumber, int index, java.lang.CharSequence name) { + public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, + java.lang.CharSequence name) { org.lwjgl.opengl.GL33.glBindFragDataLocationIndexed(program, colorNumber, index, name); } - public static void glBindFragDataLocationIndexed( - int program, int colorNumber, int index, java.nio.ByteBuffer name) { + public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, + java.nio.ByteBuffer name) { org.lwjgl.opengl.GL33.glBindFragDataLocationIndexed(program, colorNumber, index, name); } diff --git a/src/generated/java/org/lwjglx/opengl/GL40.java b/src/generated/java/org/lwjglx/opengl/GL40.java index 8255eaa..0d6b2c0 100644 --- a/src/generated/java/org/lwjglx/opengl/GL40.java +++ b/src/generated/java/org/lwjglx/opengl/GL40.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL40 { + public static final int GL_ACTIVE_SUBROUTINES = (int) 36325; public static final int GL_ACTIVE_SUBROUTINE_MAX_LENGTH = (int) 36424; public static final int GL_ACTIVE_SUBROUTINE_UNIFORMS = (int) 36326; @@ -162,23 +163,23 @@ public class GL40 { return org.lwjgl.opengl.GL40.glGetActiveSubroutineName(program, shadertype, index, bufsize); } - public static void glGetActiveSubroutineName( - int program, int shadertype, int index, java.nio.IntBuffer length, java.nio.ByteBuffer name) { + public static void glGetActiveSubroutineName(int program, int shadertype, int index, java.nio.IntBuffer length, + java.nio.ByteBuffer name) { org.lwjgl.opengl.GL40.glGetActiveSubroutineName(program, shadertype, index, length, name); } - public static void glGetActiveSubroutineUniform( - int program, int shadertype, int index, int pname, java.nio.IntBuffer values) { + public static void glGetActiveSubroutineUniform(int program, int shadertype, int index, int pname, + java.nio.IntBuffer values) { org.lwjgl.opengl.GL40.glGetActiveSubroutineUniformiv(program, shadertype, index, pname, values); } - public static java.lang.String glGetActiveSubroutineUniformName( - int program, int shadertype, int index, int bufsize) { + public static java.lang.String glGetActiveSubroutineUniformName(int program, int shadertype, int index, + int bufsize) { return org.lwjgl.opengl.GL40.glGetActiveSubroutineUniformName(program, shadertype, index, bufsize); } - public static void glGetActiveSubroutineUniformName( - int program, int shadertype, int index, java.nio.IntBuffer length, java.nio.ByteBuffer name) { + public static void glGetActiveSubroutineUniformName(int program, int shadertype, int index, + java.nio.IntBuffer length, java.nio.ByteBuffer name) { org.lwjgl.opengl.GL40.glGetActiveSubroutineUniformName(program, shadertype, index, length, name); } diff --git a/src/generated/java/org/lwjglx/opengl/GL41.java b/src/generated/java/org/lwjglx/opengl/GL41.java index 813b19e..bd14995 100644 --- a/src/generated/java/org/lwjglx/opengl/GL41.java +++ b/src/generated/java/org/lwjglx/opengl/GL41.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL41 { + public static final int GL_ACTIVE_PROGRAM = (int) 33369; public static final int GL_ALL_SHADER_BITS = (int) -1; public static final int GL_FIXED = (int) 5132; @@ -54,8 +55,8 @@ public class GL41 { public static int glCreateShaderProgram(int type, java.nio.ByteBuffer string) { - int returnValue = org.lwjgl.opengl.GL41.glCreateShaderProgramv( - type, me.eigenraven.lwjgl3ify.BufferCasts.bufferToCharSeq(string)); + int returnValue = org.lwjgl.opengl.GL41 + .glCreateShaderProgramv(type, me.eigenraven.lwjgl3ify.BufferCasts.bufferToCharSeq(string)); return returnValue; } @@ -96,8 +97,8 @@ public class GL41 { org.lwjgl.opengl.GL41.glGetFloati_v(target, index, data); } - public static void glGetProgramBinary( - int program, java.nio.IntBuffer length, java.nio.IntBuffer binaryFormat, java.nio.ByteBuffer binary) { + public static void glGetProgramBinary(int program, java.nio.IntBuffer length, java.nio.IntBuffer binaryFormat, + java.nio.ByteBuffer binary) { org.lwjgl.opengl.GL41.glGetProgramBinary(program, length, binaryFormat, binary); } @@ -109,8 +110,8 @@ public class GL41 { return org.lwjgl.opengl.GL41.glGetProgramPipelineInfoLog(pipeline, bufSize); } - public static void glGetProgramPipelineInfoLog( - int pipeline, java.nio.IntBuffer length, java.nio.ByteBuffer infoLog) { + public static void glGetProgramPipelineInfoLog(int pipeline, java.nio.IntBuffer length, + java.nio.ByteBuffer infoLog) { org.lwjgl.opengl.GL41.glGetProgramPipelineInfoLog(pipeline, length, infoLog); } @@ -118,8 +119,8 @@ public class GL41 { return org.lwjgl.opengl.GL41.glGetProgramPipelinei(pipeline, pname); } - public static void glGetShaderPrecisionFormat( - int shadertype, int precisiontype, java.nio.IntBuffer range, java.nio.IntBuffer precision) { + public static void glGetShaderPrecisionFormat(int shadertype, int precisiontype, java.nio.IntBuffer range, + java.nio.IntBuffer precision) { org.lwjgl.opengl.GL41.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); } @@ -267,93 +268,93 @@ public class GL41 { org.lwjgl.opengl.GL41.glProgramUniform4ui(program, location, v0, v1, v2, v3); } - public static void glProgramUniformMatrix2( - int program, int location, boolean transpose, java.nio.DoubleBuffer value) { + public static void glProgramUniformMatrix2(int program, int location, boolean transpose, + java.nio.DoubleBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix2dv(program, location, transpose, value); } - public static void glProgramUniformMatrix2( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix2(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix2fv(program, location, transpose, value); } - public static void glProgramUniformMatrix2x3( - int program, int location, boolean transpose, java.nio.DoubleBuffer value) { + public static void glProgramUniformMatrix2x3(int program, int location, boolean transpose, + java.nio.DoubleBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix2x3dv(program, location, transpose, value); } - public static void glProgramUniformMatrix2x3( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix2x3(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix2x3fv(program, location, transpose, value); } - public static void glProgramUniformMatrix2x4( - int program, int location, boolean transpose, java.nio.DoubleBuffer value) { + public static void glProgramUniformMatrix2x4(int program, int location, boolean transpose, + java.nio.DoubleBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix2x4dv(program, location, transpose, value); } - public static void glProgramUniformMatrix2x4( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix2x4(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix2x4fv(program, location, transpose, value); } - public static void glProgramUniformMatrix3( - int program, int location, boolean transpose, java.nio.DoubleBuffer value) { + public static void glProgramUniformMatrix3(int program, int location, boolean transpose, + java.nio.DoubleBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix3dv(program, location, transpose, value); } - public static void glProgramUniformMatrix3( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix3(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix3fv(program, location, transpose, value); } - public static void glProgramUniformMatrix3x2( - int program, int location, boolean transpose, java.nio.DoubleBuffer value) { + public static void glProgramUniformMatrix3x2(int program, int location, boolean transpose, + java.nio.DoubleBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix3x2dv(program, location, transpose, value); } - public static void glProgramUniformMatrix3x2( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix3x2(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix3x2fv(program, location, transpose, value); } - public static void glProgramUniformMatrix3x4( - int program, int location, boolean transpose, java.nio.DoubleBuffer value) { + public static void glProgramUniformMatrix3x4(int program, int location, boolean transpose, + java.nio.DoubleBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix3x4dv(program, location, transpose, value); } - public static void glProgramUniformMatrix3x4( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix3x4(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix3x4fv(program, location, transpose, value); } - public static void glProgramUniformMatrix4( - int program, int location, boolean transpose, java.nio.DoubleBuffer value) { + public static void glProgramUniformMatrix4(int program, int location, boolean transpose, + java.nio.DoubleBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix4dv(program, location, transpose, value); } - public static void glProgramUniformMatrix4( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix4(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix4fv(program, location, transpose, value); } - public static void glProgramUniformMatrix4x2( - int program, int location, boolean transpose, java.nio.DoubleBuffer value) { + public static void glProgramUniformMatrix4x2(int program, int location, boolean transpose, + java.nio.DoubleBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix4x2dv(program, location, transpose, value); } - public static void glProgramUniformMatrix4x2( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix4x2(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix4x2fv(program, location, transpose, value); } - public static void glProgramUniformMatrix4x3( - int program, int location, boolean transpose, java.nio.DoubleBuffer value) { + public static void glProgramUniformMatrix4x3(int program, int location, boolean transpose, + java.nio.DoubleBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix4x3dv(program, location, transpose, value); } - public static void glProgramUniformMatrix4x3( - int program, int location, boolean transpose, java.nio.FloatBuffer value) { + public static void glProgramUniformMatrix4x3(int program, int location, boolean transpose, + java.nio.FloatBuffer value) { org.lwjgl.opengl.GL41.glProgramUniformMatrix4x3fv(program, location, transpose, value); } diff --git a/src/generated/java/org/lwjglx/opengl/GL42.java b/src/generated/java/org/lwjglx/opengl/GL42.java index 05cdc4f..be28458 100644 --- a/src/generated/java/org/lwjglx/opengl/GL42.java +++ b/src/generated/java/org/lwjglx/opengl/GL42.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL42 { + public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = (int) 37593; public static final int GL_ALL_BARRIER_BITS = (int) -1; public static final int GL_ATOMIC_COUNTER_BARRIER_BIT = (int) 4096; @@ -110,65 +111,70 @@ public class GL42 { public static final int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = (int) 1; public static final int IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = (int) 37065; - public static void glBindImageTexture( - int unit, int texture, int level, boolean layered, int layer, int access, int format) { + public static void glBindImageTexture(int unit, int texture, int level, boolean layered, int layer, int access, + int format) { org.lwjgl.opengl.GL42.glBindImageTexture(unit, texture, level, layered, layer, access, format); } - public static void glDrawArraysInstancedBaseInstance( - int mode, int first, int count, int primcount, int baseinstance) { + public static void glDrawArraysInstancedBaseInstance(int mode, int first, int count, int primcount, + int baseinstance) { org.lwjgl.opengl.GL42.glDrawArraysInstancedBaseInstance(mode, first, count, primcount, baseinstance); } - public static void glDrawElementsInstancedBaseInstance( - int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int baseinstance) { + public static void glDrawElementsInstancedBaseInstance(int mode, int indices_count, int type, + long indices_buffer_offset, int primcount, int baseinstance) { org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseInstance( - mode, indices_count, type, indices_buffer_offset, primcount, baseinstance); + mode, + indices_count, + type, + indices_buffer_offset, + primcount, + baseinstance); } - public static void glDrawElementsInstancedBaseInstance( - int mode, java.nio.ByteBuffer indices, int primcount, int baseinstance) { - org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance( - int mode, java.nio.IntBuffer indices, int primcount, int baseinstance) { - org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseInstance( - int mode, java.nio.ShortBuffer indices, int primcount, int baseinstance) { - org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); - } - - public static void glDrawElementsInstancedBaseVertexBaseInstance( - int mode, - int indices_count, - int type, - long indices_buffer_offset, - int primcount, - int basevertex, + public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.ByteBuffer indices, int primcount, int baseinstance) { - org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseVertexBaseInstance( - mode, indices_count, type, indices_buffer_offset, primcount, basevertex, baseinstance); + org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); } - public static void glDrawElementsInstancedBaseVertexBaseInstance( - int mode, java.nio.ByteBuffer indices, int primcount, int basevertex, int baseinstance) { - org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseVertexBaseInstance( - mode, indices, primcount, basevertex, baseinstance); + public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.IntBuffer indices, int primcount, + int baseinstance) { + org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); } - public static void glDrawElementsInstancedBaseVertexBaseInstance( - int mode, java.nio.IntBuffer indices, int primcount, int basevertex, int baseinstance) { - org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseVertexBaseInstance( - mode, indices, primcount, basevertex, baseinstance); + public static void glDrawElementsInstancedBaseInstance(int mode, java.nio.ShortBuffer indices, int primcount, + int baseinstance) { + org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); } - public static void glDrawElementsInstancedBaseVertexBaseInstance( - int mode, java.nio.ShortBuffer indices, int primcount, int basevertex, int baseinstance) { + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, int indices_count, int type, + long indices_buffer_offset, int primcount, int basevertex, int baseinstance) { org.lwjgl.opengl.GL42.glDrawElementsInstancedBaseVertexBaseInstance( - mode, indices, primcount, basevertex, baseinstance); + mode, + indices_count, + type, + indices_buffer_offset, + primcount, + basevertex, + baseinstance); + } + + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.ByteBuffer indices, + int primcount, int basevertex, int baseinstance) { + org.lwjgl.opengl.GL42 + .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); + } + + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.IntBuffer indices, + int primcount, int basevertex, int baseinstance) { + org.lwjgl.opengl.GL42 + .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); + } + + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, java.nio.ShortBuffer indices, + int primcount, int basevertex, int baseinstance) { + org.lwjgl.opengl.GL42 + .glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); } public static void glDrawTransformFeedbackInstanced(int mode, int id, int primcount) { @@ -179,8 +185,8 @@ public class GL42 { org.lwjgl.opengl.GL42.glDrawTransformFeedbackStreamInstanced(mode, id, stream, primcount); } - public static void glGetActiveAtomicCounterBuffer( - int program, int bufferIndex, int pname, java.nio.IntBuffer params) { + public static void glGetActiveAtomicCounterBuffer(int program, int bufferIndex, int pname, + java.nio.IntBuffer params) { org.lwjgl.opengl.GL42.glGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params); } diff --git a/src/generated/java/org/lwjglx/opengl/GL43.java b/src/generated/java/org/lwjglx/opengl/GL43.java index 1d6547f..da171c4 100644 --- a/src/generated/java/org/lwjglx/opengl/GL43.java +++ b/src/generated/java/org/lwjglx/opengl/GL43.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL43 { + public static final int GL_ACTIVE_RESOURCES = (int) 37621; public static final int GL_ACTIVE_VARIABLES = (int) 37637; public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = (int) 36202; @@ -265,39 +266,39 @@ public class GL43 { org.lwjgl.opengl.GL43.glBindVertexBuffer(bindingindex, buffer, offset, stride); } - public static void glClearBufferData( - int target, int internalformat, int format, int type, java.nio.ByteBuffer data) { + public static void glClearBufferData(int target, int internalformat, int format, int type, + java.nio.ByteBuffer data) { org.lwjgl.opengl.GL43.glClearBufferData(target, internalformat, format, type, data); } - public static void glClearBufferSubData( - int target, int internalformat, long offset, long size, int format, int type, java.nio.ByteBuffer data) { + public static void glClearBufferSubData(int target, int internalformat, long offset, long size, int format, + int type, java.nio.ByteBuffer data) { org.lwjgl.opengl.GL43.glClearBufferSubData(target, internalformat, offset, size, format, type, data); } - public static void glCopyImageSubData( - int srcName, - int srcTarget, - int srcLevel, - int srcX, - int srcY, - int srcZ, - int dstName, - int dstTarget, - int dstLevel, - int dstX, - int dstY, - int dstZ, - int srcWidth, - int srcHeight, + public static void glCopyImageSubData(int srcName, int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, + int dstName, int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int srcWidth, int srcHeight, int srcDepth) { org.lwjgl.opengl.GL43.glCopyImageSubData( - srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, - srcWidth, srcHeight, srcDepth); + srcName, + srcTarget, + srcLevel, + srcX, + srcY, + srcZ, + dstName, + dstTarget, + dstLevel, + dstX, + dstY, + dstZ, + srcWidth, + srcHeight, + srcDepth); } - public static void glDebugMessageControl( - int source, int type, int severity, java.nio.IntBuffer ids, boolean enabled) { + public static void glDebugMessageControl(int source, int type, int severity, java.nio.IntBuffer ids, + boolean enabled) { org.lwjgl.opengl.GL43.glDebugMessageControl(source, type, severity, ids, enabled); } @@ -321,13 +322,8 @@ public class GL43 { org.lwjgl.opengl.GL43.glFramebufferParameteri(target, pname, param); } - public static int glGetDebugMessageLog( - int count, - java.nio.IntBuffer sources, - java.nio.IntBuffer types, - java.nio.IntBuffer ids, - java.nio.IntBuffer severities, - java.nio.IntBuffer lengths, + public static int glGetDebugMessageLog(int count, java.nio.IntBuffer sources, java.nio.IntBuffer types, + java.nio.IntBuffer ids, java.nio.IntBuffer severities, java.nio.IntBuffer lengths, java.nio.ByteBuffer messageLog) { return org.lwjgl.opengl.GL43.glGetDebugMessageLog(count, sources, types, ids, severities, lengths, messageLog); } @@ -352,8 +348,8 @@ public class GL43 { return org.lwjgl.opengl.GL43.glGetObjectLabel(identifier, name, bufSize); } - public static void glGetObjectLabel( - int identifier, int name, java.nio.IntBuffer length, java.nio.ByteBuffer label) { + public static void glGetObjectLabel(int identifier, int name, java.nio.IntBuffer length, + java.nio.ByteBuffer label) { org.lwjgl.opengl.GL43.glGetObjectLabel(identifier, name, length, label); } @@ -365,13 +361,8 @@ public class GL43 { return org.lwjgl.opengl.GL43.glGetProgramInterfacei(program, programInterface, pname); } - public static void glGetProgramResource( - int program, - int programInterface, - int index, - java.nio.IntBuffer props, - java.nio.IntBuffer length, - java.nio.IntBuffer params) { + public static void glGetProgramResource(int program, int programInterface, int index, java.nio.IntBuffer props, + java.nio.IntBuffer length, java.nio.IntBuffer params) { org.lwjgl.opengl.GL43.glGetProgramResourceiv(program, programInterface, index, props, length, params); } @@ -391,8 +382,8 @@ public class GL43 { return org.lwjgl.opengl.GL43.glGetProgramResourceLocation(program, programInterface, name); } - public static int glGetProgramResourceLocationIndex( - int program, int programInterface, java.lang.CharSequence name) { + public static int glGetProgramResourceLocationIndex(int program, int programInterface, + java.lang.CharSequence name) { return org.lwjgl.opengl.GL43.glGetProgramResourceLocationIndex(program, programInterface, name); } @@ -404,8 +395,8 @@ public class GL43 { return org.lwjgl.opengl.GL43.glGetProgramResourceName(program, programInterface, index, bufSize); } - public static void glGetProgramResourceName( - int program, int programInterface, int index, java.nio.IntBuffer length, java.nio.ByteBuffer name) { + public static void glGetProgramResourceName(int program, int programInterface, int index, java.nio.IntBuffer length, + java.nio.ByteBuffer name) { org.lwjgl.opengl.GL43.glGetProgramResourceName(program, programInterface, index, length, name); } @@ -421,8 +412,8 @@ public class GL43 { org.lwjgl.opengl.GL43.glInvalidateFramebuffer(target, attachments); } - public static void glInvalidateSubFramebuffer( - int target, java.nio.IntBuffer attachments, int x, int y, int width, int height) { + public static void glInvalidateSubFramebuffer(int target, java.nio.IntBuffer attachments, int x, int y, int width, + int height) { org.lwjgl.opengl.GL43.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); } @@ -430,8 +421,8 @@ public class GL43 { org.lwjgl.opengl.GL43.glInvalidateTexImage(texture, level); } - public static void glInvalidateTexSubImage( - int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth) { + public static void glInvalidateTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth) { org.lwjgl.opengl.GL43.glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth); } @@ -447,18 +438,18 @@ public class GL43 { org.lwjgl.opengl.GL43.glMultiDrawArraysIndirect(mode, indirect, primcount, stride); } - public static void glMultiDrawElementsIndirect( - int mode, int type, long indirect_buffer_offset, int primcount, int stride) { + public static void glMultiDrawElementsIndirect(int mode, int type, long indirect_buffer_offset, int primcount, + int stride) { org.lwjgl.opengl.GL43.glMultiDrawElementsIndirect(mode, type, indirect_buffer_offset, primcount, stride); } - public static void glMultiDrawElementsIndirect( - int mode, int type, java.nio.ByteBuffer indirect, int primcount, int stride) { + public static void glMultiDrawElementsIndirect(int mode, int type, java.nio.ByteBuffer indirect, int primcount, + int stride) { org.lwjgl.opengl.GL43.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride); } - public static void glMultiDrawElementsIndirect( - int mode, int type, java.nio.IntBuffer indirect, int primcount, int stride) { + public static void glMultiDrawElementsIndirect(int mode, int type, java.nio.IntBuffer indirect, int primcount, + int stride) { org.lwjgl.opengl.GL43.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride); } @@ -490,43 +481,30 @@ public class GL43 { org.lwjgl.opengl.GL43.glTexBufferRange(target, internalformat, buffer, offset, size); } - public static void glTexStorage2DMultisample( - int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { - org.lwjgl.opengl.GL43.glTexStorage2DMultisample( - target, samples, internalformat, width, height, fixedsamplelocations); - } - - public static void glTexStorage3DMultisample( - int target, - int samples, - int internalformat, - int width, - int height, - int depth, + public static void glTexStorage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { - org.lwjgl.opengl.GL43.glTexStorage3DMultisample( - target, samples, internalformat, width, height, depth, fixedsamplelocations); + org.lwjgl.opengl.GL43 + .glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); } - public static void glTextureView( - int texture, - int target, - int origtexture, - int internalformat, - int minlevel, - int numlevels, - int minlayer, - int numlayers) { - org.lwjgl.opengl.GL43.glTextureView( - texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); + public static void glTexStorage3DMultisample(int target, int samples, int internalformat, int width, int height, + int depth, boolean fixedsamplelocations) { + org.lwjgl.opengl.GL43 + .glTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); + } + + public static void glTextureView(int texture, int target, int origtexture, int internalformat, int minlevel, + int numlevels, int minlayer, int numlayers) { + org.lwjgl.opengl.GL43 + .glTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); } public static void glVertexAttribBinding(int attribindex, int bindingindex) { org.lwjgl.opengl.GL43.glVertexAttribBinding(attribindex, bindingindex); } - public static void glVertexAttribFormat( - int attribindex, int size, int type, boolean normalized, int relativeoffset) { + public static void glVertexAttribFormat(int attribindex, int size, int type, boolean normalized, + int relativeoffset) { org.lwjgl.opengl.GL43.glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); } diff --git a/src/generated/java/org/lwjglx/opengl/GL44.java b/src/generated/java/org/lwjglx/opengl/GL44.java index 70c95b2..4bd51b9 100644 --- a/src/generated/java/org/lwjglx/opengl/GL44.java +++ b/src/generated/java/org/lwjglx/opengl/GL44.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL44 { + public static final int GL_BUFFER_IMMUTABLE_STORAGE = (int) 33311; public static final int GL_BUFFER_STORAGE_FLAGS = (int) 33312; public static final int GL_CLEAR_TEXTURE = (int) 37733; @@ -70,102 +71,102 @@ public class GL44 { org.lwjgl.opengl.GL44.glClearTexImage(texture, level, format, type, data); } - public static void glClearTexSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ByteBuffer data) { + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ByteBuffer data) { org.lwjgl.opengl.GL44.glClearTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + data); } - public static void glClearTexSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.DoubleBuffer data) { + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.DoubleBuffer data) { org.lwjgl.opengl.GL44.glClearTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + data); } - public static void glClearTexSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.FloatBuffer data) { + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.FloatBuffer data) { org.lwjgl.opengl.GL44.glClearTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + data); } - public static void glClearTexSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.IntBuffer data) { + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.IntBuffer data) { org.lwjgl.opengl.GL44.glClearTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + data); } - public static void glClearTexSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.LongBuffer data) { + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.LongBuffer data) { final java.nio.ByteBuffer wrappedArg10 = me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(data); org.lwjgl.opengl.GL44.glClearTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, wrappedArg10); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + wrappedArg10); me.eigenraven.lwjgl3ify.BufferCasts.updateBuffer(data, wrappedArg10); } - public static void glClearTexSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ShortBuffer data) { + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ShortBuffer data) { org.lwjgl.opengl.GL44.glClearTexSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + data); } } diff --git a/src/generated/java/org/lwjglx/opengl/GL45.java b/src/generated/java/org/lwjglx/opengl/GL45.java index 3699f89..01050b9 100644 --- a/src/generated/java/org/lwjglx/opengl/GL45.java +++ b/src/generated/java/org/lwjglx/opengl/GL45.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GL45 { + public static final int GL_CLIP_DEPTH_MODE = (int) 37725; public static final int GL_CLIP_ORIGIN = (int) 37724; public static final int GL_CONTEXT_LOST = (int) 1287; @@ -29,39 +30,39 @@ public class GL45 { org.lwjgl.opengl.GL45.glBindTextureUnit(unit, texture); } - public static void glBlitNamedFramebuffer( - int readFramebuffer, - int drawFramebuffer, - int srcX0, - int srcY0, - int srcX1, - int srcY1, - int dstX0, - int dstY0, - int dstX1, - int dstY1, - int mask, - int filter) { + public static void glBlitNamedFramebuffer(int readFramebuffer, int drawFramebuffer, int srcX0, int srcY0, int srcX1, + int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) { org.lwjgl.opengl.GL45.glBlitNamedFramebuffer( - readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + readFramebuffer, + drawFramebuffer, + srcX0, + srcY0, + srcX1, + srcY1, + dstX0, + dstY0, + dstX1, + dstY1, + mask, + filter); } public static int glCheckNamedFramebufferStatus(int framebuffer, int target) { return org.lwjgl.opengl.GL45.glCheckNamedFramebufferStatus(framebuffer, target); } - public static void glClearNamedBufferData( - int buffer, int internalformat, int format, int type, java.nio.ByteBuffer data) { + public static void glClearNamedBufferData(int buffer, int internalformat, int format, int type, + java.nio.ByteBuffer data) { org.lwjgl.opengl.GL45.glClearNamedBufferData(buffer, internalformat, format, type, data); } - public static void glClearNamedBufferSubData( - int buffer, int internalformat, long offset, long size, int format, int type, java.nio.ByteBuffer data) { + public static void glClearNamedBufferSubData(int buffer, int internalformat, long offset, long size, int format, + int type, java.nio.ByteBuffer data) { org.lwjgl.opengl.GL45.glClearNamedBufferSubData(buffer, internalformat, offset, size, format, type, data); } - public static void glClearNamedFramebuffer( - int framebuffer, int buffer, int drawbuffer, java.nio.FloatBuffer value) { + public static void glClearNamedFramebuffer(int framebuffer, int buffer, int drawbuffer, + java.nio.FloatBuffer value) { org.lwjgl.opengl.GL45.glClearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value); } @@ -77,72 +78,61 @@ public class GL45 { org.lwjgl.opengl.GL45.glClipControl(origin, depth); } - public static void glCompressedTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int data_imageSize, long data_buffer_offset) { + public static void glCompressedTextureSubImage1D(int texture, int level, int xoffset, int width, int format, + int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.GL45.glCompressedTextureSubImage1D( - texture, level, xoffset, width, format, data_imageSize, data_buffer_offset); + texture, + level, + xoffset, + width, + format, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, java.nio.ByteBuffer data) { + public static void glCompressedTextureSubImage1D(int texture, int level, int xoffset, int width, int format, + java.nio.ByteBuffer data) { org.lwjgl.opengl.GL45.glCompressedTextureSubImage1D(texture, level, xoffset, width, format, data); } - public static void glCompressedTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int data_imageSize, - long data_buffer_offset) { + public static void glCompressedTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, + int height, int format, int data_imageSize, long data_buffer_offset) { org.lwjgl.opengl.GL45.glCompressedTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, data_imageSize, data_buffer_offset); + texture, + level, + xoffset, + yoffset, + width, + height, + format, + data_imageSize, + data_buffer_offset); } - public static void glCompressedTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - java.nio.ByteBuffer data) { - org.lwjgl.opengl.GL45.glCompressedTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, data); + public static void glCompressedTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, + int height, int format, java.nio.ByteBuffer data) { + org.lwjgl.opengl.GL45 + .glCompressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, data); } - public static void glCompressedTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int imageSize, - long data_buffer_offset) { + public static void glCompressedTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, int imageSize, long data_buffer_offset) { org.lwjgl.opengl.GL45.glCompressedTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_buffer_offset); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + imageSize, + data_buffer_offset); } - public static void glCompressedTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int imageSize, - java.nio.ByteBuffer data) { + public static void glCompressedTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int format, int imageSize, java.nio.ByteBuffer data) { org.lwjgl.opengl.GL45.glCompressedTextureSubImage3D( texture, @@ -158,8 +148,8 @@ public class GL45 { org.lwjglx.MemoryUtil.getAddress(data)); } - public static void glCopyNamedBufferSubData( - int readBuffer, int writeBuffer, long readOffset, long writeOffset, long size) { + public static void glCopyNamedBufferSubData(int readBuffer, int writeBuffer, long readOffset, long writeOffset, + long size) { org.lwjgl.opengl.GL45.glCopyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size); } @@ -167,13 +157,13 @@ public class GL45 { org.lwjgl.opengl.GL45.glCopyTextureSubImage1D(texture, level, xoffset, x, y, width); } - public static void glCopyTextureSubImage2D( - int texture, int level, int xoffset, int yoffset, int x, int y, int width, int height) { + public static void glCopyTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int x, int y, + int width, int height) { org.lwjgl.opengl.GL45.glCopyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height); } - public static void glCopyTextureSubImage3D( - int texture, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) { + public static void glCopyTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int x, + int y, int width, int height) { org.lwjgl.opengl.GL45.glCopyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width, height); } @@ -265,8 +255,8 @@ public class GL45 { org.lwjgl.opengl.GL45.glGenerateTextureMipmap(texture); } - public static void glGetCompressedTextureImage( - int texture, int level, int pixels_bufSize, long pixels_buffer_offset) { + public static void glGetCompressedTextureImage(int texture, int level, int pixels_bufSize, + long pixels_buffer_offset) { org.lwjgl.opengl.GL45.glGetCompressedTextureImage(texture, level, pixels_bufSize, pixels_buffer_offset); } @@ -274,89 +264,89 @@ public class GL45 { org.lwjgl.opengl.GL45.glGetCompressedTextureImage(texture, level, pixels); } - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int pixels_bufSize, - long pixels_buffer_offset) { + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, int pixels_bufSize, long pixels_buffer_offset) { org.lwjgl.opengl.GL45.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels_bufSize, pixels_buffer_offset); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels_bufSize, + pixels_buffer_offset); } - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - java.nio.ByteBuffer pixels) { + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.GL45.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels); } - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - java.nio.DoubleBuffer pixels) { + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.GL45.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels); } - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - java.nio.FloatBuffer pixels) { + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.GL45.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels); } - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - java.nio.IntBuffer pixels) { + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, java.nio.IntBuffer pixels) { org.lwjgl.opengl.GL45.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels); } - public static void glGetCompressedTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - java.nio.ShortBuffer pixels) { + public static void glGetCompressedTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, + int width, int height, int depth, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.GL45.glGetCompressedTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + pixels); } public static int glGetGraphicsResetStatus() { @@ -399,8 +389,8 @@ public class GL45 { org.lwjgl.opengl.GL45.glGetNamedBufferSubData(buffer, offset, data); } - public static void glGetNamedFramebufferAttachmentParameter( - int framebuffer, int attachment, int pname, java.nio.IntBuffer params) { + public static void glGetNamedFramebufferAttachmentParameter(int framebuffer, int attachment, int pname, + java.nio.IntBuffer params) { org.lwjgl.opengl.GL45.glGetNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname, params); } @@ -412,8 +402,8 @@ public class GL45 { org.lwjgl.opengl.GL45.glGetNamedRenderbufferParameteriv(renderbuffer, pname, params); } - public static void glGetTextureImage( - int texture, int level, int format, int type, int pixels_bufSize, long pixels_buffer_offset) { + public static void glGetTextureImage(int texture, int level, int format, int type, int pixels_bufSize, + long pixels_buffer_offset) { org.lwjgl.opengl.GL45.glGetTextureImage(texture, level, format, type, pixels_bufSize, pixels_buffer_offset); } @@ -485,19 +475,8 @@ public class GL45 { return org.lwjgl.opengl.GL45.glGetTextureParameteri(texture, pname); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - int pixels_bufSize, - long pixels_buffer_offset) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, int pixels_bufSize, long pixels_buffer_offset) { org.lwjgl.opengl.GL45.glGetTextureSubImage( texture, level, @@ -513,84 +492,84 @@ public class GL45 { pixels_buffer_offset); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ByteBuffer pixels) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { org.lwjgl.opengl.GL45.glGetTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.DoubleBuffer pixels) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { org.lwjgl.opengl.GL45.glGetTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.FloatBuffer pixels) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { org.lwjgl.opengl.GL45.glGetTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.IntBuffer pixels) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.IntBuffer pixels) { org.lwjgl.opengl.GL45.glGetTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } - public static void glGetTextureSubImage( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glGetTextureSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { org.lwjgl.opengl.GL45.glGetTextureSubImage( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } public static void glGetTransformFeedback(int xfb, int pname, int index, java.nio.IntBuffer param) { @@ -649,13 +628,13 @@ public class GL45 { org.lwjgl.opengl.GL45.glInvalidateNamedFramebufferData(framebuffer, attachments); } - public static void glInvalidateNamedFramebufferSubData( - int framebuffer, java.nio.IntBuffer attachments, int x, int y, int width, int height) { + public static void glInvalidateNamedFramebufferSubData(int framebuffer, java.nio.IntBuffer attachments, int x, + int y, int width, int height) { org.lwjgl.opengl.GL45.glInvalidateNamedFramebufferSubData(framebuffer, attachments, x, y, width, height); } - public static java.nio.ByteBuffer glMapNamedBuffer( - int buffer, int access, long length, java.nio.ByteBuffer old_buffer) { + public static java.nio.ByteBuffer glMapNamedBuffer(int buffer, int access, long length, + java.nio.ByteBuffer old_buffer) { return org.lwjgl.opengl.GL45.glMapNamedBuffer(buffer, access, length, old_buffer); } @@ -663,8 +642,8 @@ public class GL45 { return org.lwjgl.opengl.GL45.glMapNamedBuffer(buffer, access, old_buffer); } - public static java.nio.ByteBuffer glMapNamedBufferRange( - int buffer, long offset, long length, int access, java.nio.ByteBuffer old_buffer) { + public static java.nio.ByteBuffer glMapNamedBufferRange(int buffer, long offset, long length, int access, + java.nio.ByteBuffer old_buffer) { return org.lwjgl.opengl.GL45.glMapNamedBufferRange(buffer, offset, length, access, old_buffer); } @@ -756,8 +735,8 @@ public class GL45 { org.lwjgl.opengl.GL45.glNamedFramebufferReadBuffer(framebuffer, mode); } - public static void glNamedFramebufferRenderbuffer( - int framebuffer, int attachment, int renderbuffertarget, int renderbuffer) { + public static void glNamedFramebufferRenderbuffer(int framebuffer, int attachment, int renderbuffertarget, + int renderbuffer) { org.lwjgl.opengl.GL45.glNamedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget, renderbuffer); } @@ -765,8 +744,8 @@ public class GL45 { org.lwjgl.opengl.GL45.glNamedFramebufferTexture(framebuffer, attachment, texture, level); } - public static void glNamedFramebufferTextureLayer( - int framebuffer, int attachment, int texture, int level, int layer) { + public static void glNamedFramebufferTextureLayer(int framebuffer, int attachment, int texture, int level, + int layer) { org.lwjgl.opengl.GL45.glNamedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer); } @@ -774,34 +753,34 @@ public class GL45 { org.lwjgl.opengl.GL45.glNamedRenderbufferStorage(renderbuffer, internalformat, width, height); } - public static void glNamedRenderbufferStorageMultisample( - int renderbuffer, int samples, int internalformat, int width, int height) { - org.lwjgl.opengl.GL45.glNamedRenderbufferStorageMultisample( - renderbuffer, samples, internalformat, width, height); + public static void glNamedRenderbufferStorageMultisample(int renderbuffer, int samples, int internalformat, + int width, int height) { + org.lwjgl.opengl.GL45 + .glNamedRenderbufferStorageMultisample(renderbuffer, samples, internalformat, width, height); } - public static void glReadnPixels( - int x, int y, int width, int height, int format, int type, int pixels_bufSize, long pixels_buffer_offset) { + public static void glReadnPixels(int x, int y, int width, int height, int format, int type, int pixels_bufSize, + long pixels_buffer_offset) { org.lwjgl.opengl.GL45.glReadnPixels(x, y, width, height, format, type, pixels_bufSize, pixels_buffer_offset); } - public static void glReadnPixels( - int x, int y, int width, int height, int format, int type, java.nio.ByteBuffer pixels) { + public static void glReadnPixels(int x, int y, int width, int height, int format, int type, + java.nio.ByteBuffer pixels) { org.lwjgl.opengl.GL45.glReadnPixels(x, y, width, height, format, type, pixels); } - public static void glReadnPixels( - int x, int y, int width, int height, int format, int type, java.nio.FloatBuffer pixels) { + public static void glReadnPixels(int x, int y, int width, int height, int format, int type, + java.nio.FloatBuffer pixels) { org.lwjgl.opengl.GL45.glReadnPixels(x, y, width, height, format, type, pixels); } - public static void glReadnPixels( - int x, int y, int width, int height, int format, int type, java.nio.IntBuffer pixels) { + public static void glReadnPixels(int x, int y, int width, int height, int format, int type, + java.nio.IntBuffer pixels) { org.lwjgl.opengl.GL45.glReadnPixels(x, y, width, height, format, type, pixels); } - public static void glReadnPixels( - int x, int y, int width, int height, int format, int type, java.nio.ShortBuffer pixels) { + public static void glReadnPixels(int x, int y, int width, int height, int format, int type, + java.nio.ShortBuffer pixels) { org.lwjgl.opengl.GL45.glReadnPixels(x, y, width, height, format, type, pixels); } @@ -849,237 +828,197 @@ public class GL45 { org.lwjgl.opengl.GL45.glTextureStorage2D(texture, levels, internalformat, width, height); } - public static void glTextureStorage2DMultisample( - int texture, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { - org.lwjgl.opengl.GL45.glTextureStorage2DMultisample( - texture, samples, internalformat, width, height, fixedsamplelocations); + public static void glTextureStorage2DMultisample(int texture, int samples, int internalformat, int width, + int height, boolean fixedsamplelocations) { + org.lwjgl.opengl.GL45 + .glTextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations); } - public static void glTextureStorage3D( - int texture, int levels, int internalformat, int width, int height, int depth) { + public static void glTextureStorage3D(int texture, int levels, int internalformat, int width, int height, + int depth) { org.lwjgl.opengl.GL45.glTextureStorage3D(texture, levels, internalformat, width, height, depth); } - public static void glTextureStorage3DMultisample( - int texture, - int samples, - int internalformat, - int width, - int height, - int depth, - boolean fixedsamplelocations) { + public static void glTextureStorage3DMultisample(int texture, int samples, int internalformat, int width, + int height, int depth, boolean fixedsamplelocations) { org.lwjgl.opengl.GL45.glTextureStorage3DMultisample( - texture, samples, internalformat, width, height, depth, fixedsamplelocations); + texture, + samples, + internalformat, + width, + height, + depth, + fixedsamplelocations); } - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, long pixels_buffer_offset) { + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, + long pixels_buffer_offset) { org.lwjgl.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels_buffer_offset); } - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage1D( - int texture, int level, int xoffset, int width, int format, int type, java.nio.ShortBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); - } - - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, - long pixels_buffer_offset) { - org.lwjgl.opengl.GL45.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset); - } - - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels); + org.lwjgl.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels); + org.lwjgl.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels); + org.lwjgl.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, java.nio.IntBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels); + org.lwjgl.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); } - public static void glTextureSubImage2D( - int texture, - int level, - int xoffset, - int yoffset, - int width, - int height, - int format, - int type, + public static void glTextureSubImage1D(int texture, int level, int xoffset, int width, int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.GL45.glTextureSubImage1D(texture, level, xoffset, width, format, type, pixels); + } + + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.GL45.glTextureSubImage2D( - texture, level, xoffset, yoffset, width, height, format, type, pixels); + texture, + level, + xoffset, + yoffset, + width, + height, + format, + type, + pixels_buffer_offset); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - long pixels_buffer_offset) { - org.lwjgl.opengl.GL45.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_buffer_offset); + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.GL45 + .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ByteBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.GL45 + .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.DoubleBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.GL45 + .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.FloatBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.GL45 + .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.IntBuffer pixels) { - org.lwjgl.opengl.GL45.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + public static void glTextureSubImage2D(int texture, int level, int xoffset, int yoffset, int width, int height, + int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.GL45 + .glTextureSubImage2D(texture, level, xoffset, yoffset, width, height, format, type, pixels); } - public static void glTextureSubImage3D( - int texture, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - int format, - int type, - java.nio.ShortBuffer pixels) { + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, long pixels_buffer_offset) { org.lwjgl.opengl.GL45.glTextureSubImage3D( - texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels_buffer_offset); + } + + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ByteBuffer pixels) { + org.lwjgl.opengl.GL45.glTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); + } + + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.DoubleBuffer pixels) { + org.lwjgl.opengl.GL45.glTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); + } + + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.FloatBuffer pixels) { + org.lwjgl.opengl.GL45.glTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); + } + + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.IntBuffer pixels) { + org.lwjgl.opengl.GL45.glTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); + } + + public static void glTextureSubImage3D(int texture, int level, int xoffset, int yoffset, int zoffset, int width, + int height, int depth, int format, int type, java.nio.ShortBuffer pixels) { + org.lwjgl.opengl.GL45.glTextureSubImage3D( + texture, + level, + xoffset, + yoffset, + zoffset, + width, + height, + depth, + format, + type, + pixels); } public static void glTransformFeedbackBufferBase(int xfb, int index, int buffer) { @@ -1098,8 +1037,8 @@ public class GL45 { org.lwjgl.opengl.GL45.glVertexArrayAttribBinding(vaobj, attribindex, bindingindex); } - public static void glVertexArrayAttribFormat( - int vaobj, int attribindex, int size, int type, boolean normalized, int relativeoffset) { + public static void glVertexArrayAttribFormat(int vaobj, int attribindex, int size, int type, boolean normalized, + int relativeoffset) { org.lwjgl.opengl.GL45.glVertexArrayAttribFormat(vaobj, attribindex, size, type, normalized, relativeoffset); } diff --git a/src/generated/java/org/lwjglx/opengl/GREMEDYFrameTerminator.java b/src/generated/java/org/lwjglx/opengl/GREMEDYFrameTerminator.java index 5d869ce..33e43a8 100644 --- a/src/generated/java/org/lwjglx/opengl/GREMEDYFrameTerminator.java +++ b/src/generated/java/org/lwjglx/opengl/GREMEDYFrameTerminator.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GREMEDYFrameTerminator { + public static void glFrameTerminatorGREMEDY() { org.lwjgl.opengl.GREMEDYFrameTerminator.glFrameTerminatorGREMEDY(); } diff --git a/src/generated/java/org/lwjglx/opengl/GREMEDYStringMarker.java b/src/generated/java/org/lwjglx/opengl/GREMEDYStringMarker.java index 96a0e3a..b1ab69b 100644 --- a/src/generated/java/org/lwjglx/opengl/GREMEDYStringMarker.java +++ b/src/generated/java/org/lwjglx/opengl/GREMEDYStringMarker.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class GREMEDYStringMarker { + public static void glStringMarkerGREMEDY(java.lang.CharSequence string) { org.lwjgl.opengl.GREMEDYStringMarker.glStringMarkerGREMEDY(string); } diff --git a/src/generated/java/org/lwjglx/opengl/INTELMapTexture.java b/src/generated/java/org/lwjglx/opengl/INTELMapTexture.java index 0169ad4..59afc1d 100644 --- a/src/generated/java/org/lwjglx/opengl/INTELMapTexture.java +++ b/src/generated/java/org/lwjglx/opengl/INTELMapTexture.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class INTELMapTexture { + public static final int GL_LAYOUT_DEFAULT_INTEL = (int) 0; public static final int GL_LAYOUT_LINEAR_CPU_CACHED_INTEL = (int) 2; public static final int GL_LAYOUT_LINEAR_INTEL = (int) 1; diff --git a/src/generated/java/org/lwjglx/opengl/KHRContextFlushControl.java b/src/generated/java/org/lwjglx/opengl/KHRContextFlushControl.java index f9ef3e9..44d1363 100644 --- a/src/generated/java/org/lwjglx/opengl/KHRContextFlushControl.java +++ b/src/generated/java/org/lwjglx/opengl/KHRContextFlushControl.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class KHRContextFlushControl { + public static final int GL_CONTEXT_RELEASE_BEHAVIOR = (int) 33531; public static final int GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = (int) 33532; } diff --git a/src/generated/java/org/lwjglx/opengl/KHRDebug.java b/src/generated/java/org/lwjglx/opengl/KHRDebug.java index 20973ce..6b899ff 100644 --- a/src/generated/java/org/lwjglx/opengl/KHRDebug.java +++ b/src/generated/java/org/lwjglx/opengl/KHRDebug.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class KHRDebug { + public static final int GL_BUFFER = (int) 33504; public static final int GL_CONTEXT_FLAG_DEBUG_BIT = (int) 2; public static final int GL_DEBUG_CALLBACK_FUNCTION = (int) 33348; @@ -40,8 +41,8 @@ public class KHRDebug { public static final int GL_SAMPLER = (int) 33510; public static final int GL_SHADER = (int) 33505; - public static void glDebugMessageControl( - int source, int type, int severity, java.nio.IntBuffer ids, boolean enabled) { + public static void glDebugMessageControl(int source, int type, int severity, java.nio.IntBuffer ids, + boolean enabled) { org.lwjgl.opengl.KHRDebug.glDebugMessageControl(source, type, severity, ids, enabled); } @@ -53,24 +54,19 @@ public class KHRDebug { org.lwjgl.opengl.KHRDebug.glDebugMessageInsert(source, type, id, severity, buf); } - public static int glGetDebugMessageLog( - int count, - java.nio.IntBuffer sources, - java.nio.IntBuffer types, - java.nio.IntBuffer ids, - java.nio.IntBuffer severities, - java.nio.IntBuffer lengths, + public static int glGetDebugMessageLog(int count, java.nio.IntBuffer sources, java.nio.IntBuffer types, + java.nio.IntBuffer ids, java.nio.IntBuffer severities, java.nio.IntBuffer lengths, java.nio.ByteBuffer messageLog) { - return org.lwjgl.opengl.KHRDebug.glGetDebugMessageLog( - count, sources, types, ids, severities, lengths, messageLog); + return org.lwjgl.opengl.KHRDebug + .glGetDebugMessageLog(count, sources, types, ids, severities, lengths, messageLog); } public static java.lang.String glGetObjectLabel(int identifier, int name, int bufSize) { return org.lwjgl.opengl.KHRDebug.glGetObjectLabel(identifier, name, bufSize); } - public static void glGetObjectLabel( - int identifier, int name, java.nio.IntBuffer length, java.nio.ByteBuffer label) { + public static void glGetObjectLabel(int identifier, int name, java.nio.IntBuffer length, + java.nio.ByteBuffer label) { org.lwjgl.opengl.KHRDebug.glGetObjectLabel(identifier, name, length, label); } diff --git a/src/generated/java/org/lwjglx/opengl/KHRRobustness.java b/src/generated/java/org/lwjglx/opengl/KHRRobustness.java index 3d7c733..75bbaad 100644 --- a/src/generated/java/org/lwjglx/opengl/KHRRobustness.java +++ b/src/generated/java/org/lwjglx/opengl/KHRRobustness.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class KHRRobustness { + public static final int GL_CONTEXT_LOST = (int) 1287; public static final int GL_CONTEXT_ROBUST_ACCESS = (int) 37107; public static final int GL_GUILTY_CONTEXT_RESET = (int) 33363; @@ -14,29 +15,29 @@ public class KHRRobustness { return org.lwjgl.opengl.KHRRobustness.glGetGraphicsResetStatus(); } - public static void glReadnPixels( - int x, int y, int width, int height, int format, int type, int pixels_bufSize, long pixels_buffer_offset) { - org.lwjgl.opengl.KHRRobustness.glReadnPixels( - x, y, width, height, format, type, pixels_bufSize, pixels_buffer_offset); + public static void glReadnPixels(int x, int y, int width, int height, int format, int type, int pixels_bufSize, + long pixels_buffer_offset) { + org.lwjgl.opengl.KHRRobustness + .glReadnPixels(x, y, width, height, format, type, pixels_bufSize, pixels_buffer_offset); } - public static void glReadnPixels( - int x, int y, int width, int height, int format, int type, java.nio.ByteBuffer pixels) { + public static void glReadnPixels(int x, int y, int width, int height, int format, int type, + java.nio.ByteBuffer pixels) { org.lwjgl.opengl.KHRRobustness.glReadnPixels(x, y, width, height, format, type, pixels); } - public static void glReadnPixels( - int x, int y, int width, int height, int format, int type, java.nio.FloatBuffer pixels) { + public static void glReadnPixels(int x, int y, int width, int height, int format, int type, + java.nio.FloatBuffer pixels) { org.lwjgl.opengl.KHRRobustness.glReadnPixels(x, y, width, height, format, type, pixels); } - public static void glReadnPixels( - int x, int y, int width, int height, int format, int type, java.nio.IntBuffer pixels) { + public static void glReadnPixels(int x, int y, int width, int height, int format, int type, + java.nio.IntBuffer pixels) { org.lwjgl.opengl.KHRRobustness.glReadnPixels(x, y, width, height, format, type, pixels); } - public static void glReadnPixels( - int x, int y, int width, int height, int format, int type, java.nio.ShortBuffer pixels) { + public static void glReadnPixels(int x, int y, int width, int height, int format, int type, + java.nio.ShortBuffer pixels) { org.lwjgl.opengl.KHRRobustness.glReadnPixels(x, y, width, height, format, type, pixels); } } diff --git a/src/generated/java/org/lwjglx/opengl/NVBindlessMultiDrawIndirect.java b/src/generated/java/org/lwjglx/opengl/NVBindlessMultiDrawIndirect.java index 693e90d..05cc187 100644 --- a/src/generated/java/org/lwjglx/opengl/NVBindlessMultiDrawIndirect.java +++ b/src/generated/java/org/lwjglx/opengl/NVBindlessMultiDrawIndirect.java @@ -1,27 +1,37 @@ package org.lwjglx.opengl; public class NVBindlessMultiDrawIndirect { - public static void glMultiDrawArraysIndirectBindlessNV( - int mode, long indirect_buffer_offset, int drawCount, int stride, int vertexBufferCount) { + + public static void glMultiDrawArraysIndirectBindlessNV(int mode, long indirect_buffer_offset, int drawCount, + int stride, int vertexBufferCount) { org.lwjgl.opengl.NVBindlessMultiDrawIndirect.glMultiDrawArraysIndirectBindlessNV( - mode, indirect_buffer_offset, drawCount, stride, vertexBufferCount); + mode, + indirect_buffer_offset, + drawCount, + stride, + vertexBufferCount); } - public static void glMultiDrawArraysIndirectBindlessNV( - int mode, java.nio.ByteBuffer indirect, int drawCount, int stride, int vertexBufferCount) { - org.lwjgl.opengl.NVBindlessMultiDrawIndirect.glMultiDrawArraysIndirectBindlessNV( - mode, indirect, drawCount, stride, vertexBufferCount); + public static void glMultiDrawArraysIndirectBindlessNV(int mode, java.nio.ByteBuffer indirect, int drawCount, + int stride, int vertexBufferCount) { + org.lwjgl.opengl.NVBindlessMultiDrawIndirect + .glMultiDrawArraysIndirectBindlessNV(mode, indirect, drawCount, stride, vertexBufferCount); } - public static void glMultiDrawElementsIndirectBindlessNV( - int mode, int type, long indirect_buffer_offset, int drawCount, int stride, int vertexBufferCount) { + public static void glMultiDrawElementsIndirectBindlessNV(int mode, int type, long indirect_buffer_offset, + int drawCount, int stride, int vertexBufferCount) { org.lwjgl.opengl.NVBindlessMultiDrawIndirect.glMultiDrawElementsIndirectBindlessNV( - mode, type, indirect_buffer_offset, drawCount, stride, vertexBufferCount); + mode, + type, + indirect_buffer_offset, + drawCount, + stride, + vertexBufferCount); } - public static void glMultiDrawElementsIndirectBindlessNV( - int mode, int type, java.nio.ByteBuffer indirect, int drawCount, int stride, int vertexBufferCount) { - org.lwjgl.opengl.NVBindlessMultiDrawIndirect.glMultiDrawElementsIndirectBindlessNV( - mode, type, indirect, drawCount, stride, vertexBufferCount); + public static void glMultiDrawElementsIndirectBindlessNV(int mode, int type, java.nio.ByteBuffer indirect, + int drawCount, int stride, int vertexBufferCount) { + org.lwjgl.opengl.NVBindlessMultiDrawIndirect + .glMultiDrawElementsIndirectBindlessNV(mode, type, indirect, drawCount, stride, vertexBufferCount); } } diff --git a/src/generated/java/org/lwjglx/opengl/NVBindlessTexture.java b/src/generated/java/org/lwjglx/opengl/NVBindlessTexture.java index f84af91..c69eab0 100644 --- a/src/generated/java/org/lwjglx/opengl/NVBindlessTexture.java +++ b/src/generated/java/org/lwjglx/opengl/NVBindlessTexture.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVBindlessTexture { + public static long glGetImageHandleNV(int texture, int level, boolean layered, int layer, int format) { return org.lwjgl.opengl.NVBindlessTexture.glGetImageHandleNV(texture, level, layered, layer, format); } diff --git a/src/generated/java/org/lwjglx/opengl/NVBlendEquationAdvanced.java b/src/generated/java/org/lwjglx/opengl/NVBlendEquationAdvanced.java index 509619f..e53ba14 100644 --- a/src/generated/java/org/lwjglx/opengl/NVBlendEquationAdvanced.java +++ b/src/generated/java/org/lwjglx/opengl/NVBlendEquationAdvanced.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVBlendEquationAdvanced { + public static final int GL_BLEND_ADVANCED_COHERENT_NV = (int) 37509; public static final int GL_BLEND_OVERLAP_NV = (int) 37505; public static final int GL_BLEND_PREMULTIPLIED_SRC_NV = (int) 37504; diff --git a/src/generated/java/org/lwjglx/opengl/NVConditionalRender.java b/src/generated/java/org/lwjglx/opengl/NVConditionalRender.java index 2730213..d9d6e93 100644 --- a/src/generated/java/org/lwjglx/opengl/NVConditionalRender.java +++ b/src/generated/java/org/lwjglx/opengl/NVConditionalRender.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVConditionalRender { + public static final int GL_QUERY_BY_REGION_NO_WAIT_NV = (int) 36374; public static final int GL_QUERY_BY_REGION_WAIT_NV = (int) 36373; public static final int GL_QUERY_NO_WAIT_NV = (int) 36372; diff --git a/src/generated/java/org/lwjglx/opengl/NVCopyDepthToColor.java b/src/generated/java/org/lwjglx/opengl/NVCopyDepthToColor.java index ade3f5a..2f5e9ae 100644 --- a/src/generated/java/org/lwjglx/opengl/NVCopyDepthToColor.java +++ b/src/generated/java/org/lwjglx/opengl/NVCopyDepthToColor.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVCopyDepthToColor { + public static final int GL_DEPTH_STENCIL_TO_BGRA_NV = (int) 34927; public static final int GL_DEPTH_STENCIL_TO_RGBA_NV = (int) 34926; } diff --git a/src/generated/java/org/lwjglx/opengl/NVCopyImage.java b/src/generated/java/org/lwjglx/opengl/NVCopyImage.java index 853d5ef..d3674d8 100644 --- a/src/generated/java/org/lwjglx/opengl/NVCopyImage.java +++ b/src/generated/java/org/lwjglx/opengl/NVCopyImage.java @@ -1,24 +1,24 @@ package org.lwjglx.opengl; public class NVCopyImage { - public static void glCopyImageSubDataNV( - int srcName, - int srcTarget, - int srcLevel, - int srcX, - int srcY, - int srcZ, - int dstName, - int dstTarget, - int dstLevel, - int dstX, - int dstY, - int dstZ, - int width, - int height, - int depth) { + + public static void glCopyImageSubDataNV(int srcName, int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, + int dstName, int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int width, int height, int depth) { org.lwjgl.opengl.NVCopyImage.glCopyImageSubDataNV( - srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, - height, depth); + srcName, + srcTarget, + srcLevel, + srcX, + srcY, + srcZ, + dstName, + dstTarget, + dstLevel, + dstX, + dstY, + dstZ, + width, + height, + depth); } } diff --git a/src/generated/java/org/lwjglx/opengl/NVDeepTexture3D.java b/src/generated/java/org/lwjglx/opengl/NVDeepTexture3D.java index bb71c77..5122057 100644 --- a/src/generated/java/org/lwjglx/opengl/NVDeepTexture3D.java +++ b/src/generated/java/org/lwjglx/opengl/NVDeepTexture3D.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVDeepTexture3D { + public static final int GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV = (int) 37073; public static final int GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV = (int) 37072; } diff --git a/src/generated/java/org/lwjglx/opengl/NVDepthBufferFloat.java b/src/generated/java/org/lwjglx/opengl/NVDepthBufferFloat.java index 914d44c..3a56f5f 100644 --- a/src/generated/java/org/lwjglx/opengl/NVDepthBufferFloat.java +++ b/src/generated/java/org/lwjglx/opengl/NVDepthBufferFloat.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVDepthBufferFloat { + public static final int GL_DEPTH32F_STENCIL8_NV = (int) 36268; public static final int GL_DEPTH_BUFFER_FLOAT_MODE_NV = (int) 36271; public static final int GL_DEPTH_COMPONENT32F_NV = (int) 36267; diff --git a/src/generated/java/org/lwjglx/opengl/NVDepthClamp.java b/src/generated/java/org/lwjglx/opengl/NVDepthClamp.java index 8d5e056..29f572a 100644 --- a/src/generated/java/org/lwjglx/opengl/NVDepthClamp.java +++ b/src/generated/java/org/lwjglx/opengl/NVDepthClamp.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class NVDepthClamp { + public static final int GL_DEPTH_CLAMP_NV = (int) 34383; } diff --git a/src/generated/java/org/lwjglx/opengl/NVDrawTexture.java b/src/generated/java/org/lwjglx/opengl/NVDrawTexture.java index f428e42..022536a 100644 --- a/src/generated/java/org/lwjglx/opengl/NVDrawTexture.java +++ b/src/generated/java/org/lwjglx/opengl/NVDrawTexture.java @@ -1,18 +1,9 @@ package org.lwjglx.opengl; public class NVDrawTexture { - public static void glDrawTextureNV( - int texture, - int sampler, - float x0, - float y0, - float x1, - float y1, - float z, - float s0, - float t0, - float s1, - float t1) { + + public static void glDrawTextureNV(int texture, int sampler, float x0, float y0, float x1, float y1, float z, + float s0, float t0, float s1, float t1) { org.lwjgl.opengl.NVDrawTexture.glDrawTextureNV(texture, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1); } } diff --git a/src/generated/java/org/lwjglx/opengl/NVExplicitMultisample.java b/src/generated/java/org/lwjglx/opengl/NVExplicitMultisample.java index 032e1dd..fb909af 100644 --- a/src/generated/java/org/lwjglx/opengl/NVExplicitMultisample.java +++ b/src/generated/java/org/lwjglx/opengl/NVExplicitMultisample.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVExplicitMultisample { + public static final int GL_INT_SAMPLER_RENDERBUFFER_NV = (int) 36439; public static final int GL_MAX_SAMPLE_MASK_WORDS_NV = (int) 36441; public static final int GL_SAMPLER_RENDERBUFFER_NV = (int) 36438; diff --git a/src/generated/java/org/lwjglx/opengl/NVFence.java b/src/generated/java/org/lwjglx/opengl/NVFence.java index ea83457..5df2868 100644 --- a/src/generated/java/org/lwjglx/opengl/NVFence.java +++ b/src/generated/java/org/lwjglx/opengl/NVFence.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVFence { + public static final int GL_ALL_COMPLETED_NV = (int) 34034; public static final int GL_FENCE_CONDITION_NV = (int) 34036; public static final int GL_FENCE_STATUS_NV = (int) 34035; diff --git a/src/generated/java/org/lwjglx/opengl/NVFloatBuffer.java b/src/generated/java/org/lwjglx/opengl/NVFloatBuffer.java index 5a0dfc5..827880c 100644 --- a/src/generated/java/org/lwjglx/opengl/NVFloatBuffer.java +++ b/src/generated/java/org/lwjglx/opengl/NVFloatBuffer.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVFloatBuffer { + public static final int GL_FLOAT_CLEAR_COLOR_VALUE_NV = (int) 34957; public static final int GL_FLOAT_R16_NV = (int) 34948; public static final int GL_FLOAT_R32_NV = (int) 34949; diff --git a/src/generated/java/org/lwjglx/opengl/NVFogDistance.java b/src/generated/java/org/lwjglx/opengl/NVFogDistance.java index 4965433..d5419bb 100644 --- a/src/generated/java/org/lwjglx/opengl/NVFogDistance.java +++ b/src/generated/java/org/lwjglx/opengl/NVFogDistance.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVFogDistance { + public static final int GL_EYE_PLANE_ABSOLUTE_NV = (int) 34140; public static final int GL_EYE_RADIAL_NV = (int) 34139; public static final int GL_FOG_DISTANCE_MODE_NV = (int) 34138; diff --git a/src/generated/java/org/lwjglx/opengl/NVFramebufferMultisampleCoverage.java b/src/generated/java/org/lwjglx/opengl/NVFramebufferMultisampleCoverage.java index 1fdb3bd..dab4446 100644 --- a/src/generated/java/org/lwjglx/opengl/NVFramebufferMultisampleCoverage.java +++ b/src/generated/java/org/lwjglx/opengl/NVFramebufferMultisampleCoverage.java @@ -1,14 +1,20 @@ package org.lwjglx.opengl; public class NVFramebufferMultisampleCoverage { + public static final int GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV = (int) 36369; public static final int GL_MULTISAMPLE_COVERAGE_MODES_NV = (int) 36370; public static final int GL_RENDERBUFFER_COLOR_SAMPLES_NV = (int) 36368; public static final int GL_RENDERBUFFER_COVERAGE_SAMPLES_NV = (int) 36011; - public static void glRenderbufferStorageMultisampleCoverageNV( - int target, int coverageSamples, int colorSamples, int internalformat, int width, int height) { + public static void glRenderbufferStorageMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, + int internalformat, int width, int height) { org.lwjgl.opengl.NVFramebufferMultisampleCoverage.glRenderbufferStorageMultisampleCoverageNV( - target, coverageSamples, colorSamples, internalformat, width, height); + target, + coverageSamples, + colorSamples, + internalformat, + width, + height); } } diff --git a/src/generated/java/org/lwjglx/opengl/NVHalfFloat.java b/src/generated/java/org/lwjglx/opengl/NVHalfFloat.java index 9fb9c66..6a55de7 100644 --- a/src/generated/java/org/lwjglx/opengl/NVHalfFloat.java +++ b/src/generated/java/org/lwjglx/opengl/NVHalfFloat.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVHalfFloat { + public static final int GL_HALF_FLOAT_NV = (int) 5131; public static void glColor3hNV(short red, short green, short blue) { diff --git a/src/generated/java/org/lwjglx/opengl/NVLightMaxExponent.java b/src/generated/java/org/lwjglx/opengl/NVLightMaxExponent.java index be11d8f..d3c8605 100644 --- a/src/generated/java/org/lwjglx/opengl/NVLightMaxExponent.java +++ b/src/generated/java/org/lwjglx/opengl/NVLightMaxExponent.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVLightMaxExponent { + public static final int GL_MAX_SHININESS_NV = (int) 34052; public static final int GL_MAX_SPOT_EXPONENT_NV = (int) 34053; } diff --git a/src/generated/java/org/lwjglx/opengl/NVMultisampleCoverage.java b/src/generated/java/org/lwjglx/opengl/NVMultisampleCoverage.java index a4bacd1..1180469 100644 --- a/src/generated/java/org/lwjglx/opengl/NVMultisampleCoverage.java +++ b/src/generated/java/org/lwjglx/opengl/NVMultisampleCoverage.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVMultisampleCoverage { + public static final int GL_COLOR_SAMPLES_NV = (int) 36384; public static final int GL_COVERAGE_SAMPLES_NV = (int) 32937; } diff --git a/src/generated/java/org/lwjglx/opengl/NVMultisampleFilterHint.java b/src/generated/java/org/lwjglx/opengl/NVMultisampleFilterHint.java index 4c9ad43..b9a896d 100644 --- a/src/generated/java/org/lwjglx/opengl/NVMultisampleFilterHint.java +++ b/src/generated/java/org/lwjglx/opengl/NVMultisampleFilterHint.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class NVMultisampleFilterHint { + public static final int GL_MULTISAMPLE_FILTER_HINT_NV = (int) 34100; } diff --git a/src/generated/java/org/lwjglx/opengl/NVPackedDepthStencil.java b/src/generated/java/org/lwjglx/opengl/NVPackedDepthStencil.java index e42017c..9c2520e 100644 --- a/src/generated/java/org/lwjglx/opengl/NVPackedDepthStencil.java +++ b/src/generated/java/org/lwjglx/opengl/NVPackedDepthStencil.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVPackedDepthStencil { + public static final int GL_DEPTH_STENCIL_NV = (int) 34041; public static final int GL_UNSIGNED_INT_24_8_NV = (int) 34042; } diff --git a/src/generated/java/org/lwjglx/opengl/NVPathRendering.java b/src/generated/java/org/lwjglx/opengl/NVPathRendering.java index 2c308c5..cffd97d 100644 --- a/src/generated/java/org/lwjglx/opengl/NVPathRendering.java +++ b/src/generated/java/org/lwjglx/opengl/NVPathRendering.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVPathRendering { + public static final int GL_ACCUM_ADJACENT_PAIRS_NV = (int) 37037; public static final int GL_ADJACENT_PAIRS_NV = (int) 37038; public static final int GL_AFFINE_2D_NV = (int) 37010; @@ -132,30 +133,20 @@ public class NVPathRendering { org.lwjgl.opengl.NVPathRendering.glCopyPathNV(resultPath, srcPath); } - public static void glCoverFillPathInstancedNV( - int pathNameType, - java.nio.ByteBuffer paths, - int pathBase, - int coverMode, - int transformType, - java.nio.FloatBuffer transformValues) { - org.lwjgl.opengl.NVPathRendering.glCoverFillPathInstancedNV( - pathNameType, paths, pathBase, coverMode, transformType, transformValues); + public static void glCoverFillPathInstancedNV(int pathNameType, java.nio.ByteBuffer paths, int pathBase, + int coverMode, int transformType, java.nio.FloatBuffer transformValues) { + org.lwjgl.opengl.NVPathRendering + .glCoverFillPathInstancedNV(pathNameType, paths, pathBase, coverMode, transformType, transformValues); } public static void glCoverFillPathNV(int path, int coverMode) { org.lwjgl.opengl.NVPathRendering.glCoverFillPathNV(path, coverMode); } - public static void glCoverStrokePathInstancedNV( - int pathNameType, - java.nio.ByteBuffer paths, - int pathBase, - int coverMode, - int transformType, - java.nio.FloatBuffer transformValues) { - org.lwjgl.opengl.NVPathRendering.glCoverStrokePathInstancedNV( - pathNameType, paths, pathBase, coverMode, transformType, transformValues); + public static void glCoverStrokePathInstancedNV(int pathNameType, java.nio.ByteBuffer paths, int pathBase, + int coverMode, int transformType, java.nio.FloatBuffer transformValues) { + org.lwjgl.opengl.NVPathRendering + .glCoverStrokePathInstancedNV(pathNameType, paths, pathBase, coverMode, transformType, transformValues); } public static void glCoverStrokePathNV(int name, int coverMode) { @@ -202,21 +193,16 @@ public class NVPathRendering { return org.lwjgl.opengl.NVPathRendering.glGetPathLengthNV(path, startSegment, numSegments); } - public static void glGetPathMetricRangeNV( - int metricQueryMask, int fistPathName, int numPaths, int stride, java.nio.FloatBuffer metrics) { - org.lwjgl.opengl.NVPathRendering.glGetPathMetricRangeNV( - metricQueryMask, fistPathName, numPaths, stride, metrics); + public static void glGetPathMetricRangeNV(int metricQueryMask, int fistPathName, int numPaths, int stride, + java.nio.FloatBuffer metrics) { + org.lwjgl.opengl.NVPathRendering + .glGetPathMetricRangeNV(metricQueryMask, fistPathName, numPaths, stride, metrics); } - public static void glGetPathMetricsNV( - int metricQueryMask, - int pathNameType, - java.nio.ByteBuffer paths, - int pathBase, - int stride, - java.nio.FloatBuffer metrics) { - org.lwjgl.opengl.NVPathRendering.glGetPathMetricsNV( - metricQueryMask, pathNameType, paths, pathBase, stride, metrics); + public static void glGetPathMetricsNV(int metricQueryMask, int pathNameType, java.nio.ByteBuffer paths, + int pathBase, int stride, java.nio.FloatBuffer metrics) { + org.lwjgl.opengl.NVPathRendering + .glGetPathMetricsNV(metricQueryMask, pathNameType, paths, pathBase, stride, metrics); } public static void glGetPathParameterNV(int name, int param, java.nio.IntBuffer value) { @@ -235,15 +221,8 @@ public class NVPathRendering { return org.lwjgl.opengl.NVPathRendering.glGetPathParameteriNV(name, param); } - public static void glGetPathSpacingNV( - int pathListMode, - int pathNameType, - java.nio.ByteBuffer paths, - int pathBase, - float advanceScale, - float kerningScale, - int transformType, - java.nio.FloatBuffer returnedSpacing) { + public static void glGetPathSpacingNV(int pathListMode, int pathNameType, java.nio.ByteBuffer paths, int pathBase, + float advanceScale, float kerningScale, int transformType, java.nio.FloatBuffer returnedSpacing) { org.lwjgl.opengl.NVPathRendering.glGetPathSpacingNV( pathListMode, pathNameType, @@ -291,8 +270,8 @@ public class NVPathRendering { org.lwjgl.opengl.NVPathRendering.glPathColorGenNV(color, genMode, colorFormat, coeffs); } - public static void glPathCommandsNV( - int path, java.nio.ByteBuffer commands, int coordType, java.nio.ByteBuffer coords) { + public static void glPathCommandsNV(int path, java.nio.ByteBuffer commands, int coordType, + java.nio.ByteBuffer coords) { org.lwjgl.opengl.NVPathRendering.glPathCommandsNV(path, commands, coordType, coords); } @@ -312,15 +291,8 @@ public class NVPathRendering { org.lwjgl.opengl.NVPathRendering.glPathFogGenNV(genMode); } - public static void glPathGlyphRangeNV( - int firstPathName, - int fontTarget, - java.nio.ByteBuffer fontName, - int fontStyle, - int firstGlyph, - int numGlyphs, - int handleMissingGlyphs, - int pathParameterTemplate, + public static void glPathGlyphRangeNV(int firstPathName, int fontTarget, java.nio.ByteBuffer fontName, + int fontStyle, int firstGlyph, int numGlyphs, int handleMissingGlyphs, int pathParameterTemplate, float emScale) { org.lwjgl.opengl.NVPathRendering.glPathGlyphRangeNV( firstPathName, @@ -334,15 +306,8 @@ public class NVPathRendering { emScale); } - public static void glPathGlyphsNV( - int firstPathName, - int fontTarget, - java.nio.ByteBuffer fontName, - int fontStyle, - int type, - java.nio.ByteBuffer charcodes, - int handleMissingGlyphs, - int pathParameterTemplate, + public static void glPathGlyphsNV(int firstPathName, int fontTarget, java.nio.ByteBuffer fontName, int fontStyle, + int type, java.nio.ByteBuffer charcodes, int handleMissingGlyphs, int pathParameterTemplate, float emScale) { org.lwjgl.opengl.NVPathRendering.glPathGlyphsNV( firstPathName, @@ -380,68 +345,57 @@ public class NVPathRendering { org.lwjgl.opengl.NVPathRendering.glPathStringNV(path, format, pathString); } - public static void glPathSubCommandsNV( - int path, - int commandStart, - int commandsToDelete, - java.nio.ByteBuffer commands, - int coordType, - java.nio.ByteBuffer coords) { - org.lwjgl.opengl.NVPathRendering.glPathSubCommandsNV( - path, commandStart, commandsToDelete, commands, coordType, coords); + public static void glPathSubCommandsNV(int path, int commandStart, int commandsToDelete, + java.nio.ByteBuffer commands, int coordType, java.nio.ByteBuffer coords) { + org.lwjgl.opengl.NVPathRendering + .glPathSubCommandsNV(path, commandStart, commandsToDelete, commands, coordType, coords); } public static void glPathSubCoordsNV(int path, int coordStart, int coordType, java.nio.ByteBuffer coords) { org.lwjgl.opengl.NVPathRendering.glPathSubCoordsNV(path, coordStart, coordType, coords); } - public static boolean glPointAlongPathNV( - int path, - int startSegment, - int numSegments, - float distance, - java.nio.FloatBuffer x, - java.nio.FloatBuffer y, - java.nio.FloatBuffer tangentX, + public static boolean glPointAlongPathNV(int path, int startSegment, int numSegments, float distance, + java.nio.FloatBuffer x, java.nio.FloatBuffer y, java.nio.FloatBuffer tangentX, java.nio.FloatBuffer tangentY) { - return org.lwjgl.opengl.NVPathRendering.glPointAlongPathNV( - path, startSegment, numSegments, distance, x, y, tangentX, tangentY); + return org.lwjgl.opengl.NVPathRendering + .glPointAlongPathNV(path, startSegment, numSegments, distance, x, y, tangentX, tangentY); } - public static void glStencilFillPathInstancedNV( - int pathNameType, - java.nio.ByteBuffer paths, - int pathBase, - int fillMode, - int mask, - int transformType, - java.nio.FloatBuffer transformValues) { + public static void glStencilFillPathInstancedNV(int pathNameType, java.nio.ByteBuffer paths, int pathBase, + int fillMode, int mask, int transformType, java.nio.FloatBuffer transformValues) { org.lwjgl.opengl.NVPathRendering.glStencilFillPathInstancedNV( - pathNameType, paths, pathBase, fillMode, mask, transformType, transformValues); + pathNameType, + paths, + pathBase, + fillMode, + mask, + transformType, + transformValues); } public static void glStencilFillPathNV(int path, int fillMode, int mask) { org.lwjgl.opengl.NVPathRendering.glStencilFillPathNV(path, fillMode, mask); } - public static void glStencilStrokePathInstancedNV( - int pathNameType, - java.nio.ByteBuffer paths, - int pathBase, - int reference, - int mask, - int transformType, - java.nio.FloatBuffer transformValues) { + public static void glStencilStrokePathInstancedNV(int pathNameType, java.nio.ByteBuffer paths, int pathBase, + int reference, int mask, int transformType, java.nio.FloatBuffer transformValues) { org.lwjgl.opengl.NVPathRendering.glStencilStrokePathInstancedNV( - pathNameType, paths, pathBase, reference, mask, transformType, transformValues); + pathNameType, + paths, + pathBase, + reference, + mask, + transformType, + transformValues); } public static void glStencilStrokePathNV(int path, int reference, int mask) { org.lwjgl.opengl.NVPathRendering.glStencilStrokePathNV(path, reference, mask); } - public static void glTransformPathNV( - int resultPath, int srcPath, int transformType, java.nio.FloatBuffer transformValues) { + public static void glTransformPathNV(int resultPath, int srcPath, int transformType, + java.nio.FloatBuffer transformValues) { org.lwjgl.opengl.NVPathRendering.glTransformPathNV(resultPath, srcPath, transformType, transformValues); } diff --git a/src/generated/java/org/lwjglx/opengl/NVPixelDataRange.java b/src/generated/java/org/lwjglx/opengl/NVPixelDataRange.java index 7013b34..fc8e48b 100644 --- a/src/generated/java/org/lwjglx/opengl/NVPixelDataRange.java +++ b/src/generated/java/org/lwjglx/opengl/NVPixelDataRange.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVPixelDataRange { + public static final int GL_READ_PIXEL_DATA_RANGE_LENGTH_NV = (int) 34939; public static final int GL_READ_PIXEL_DATA_RANGE_NV = (int) 34937; public static final int GL_READ_PIXEL_DATA_RANGE_POINTER_NV = (int) 34941; diff --git a/src/generated/java/org/lwjglx/opengl/NVPointSprite.java b/src/generated/java/org/lwjglx/opengl/NVPointSprite.java index 8d9f824..09120bc 100644 --- a/src/generated/java/org/lwjglx/opengl/NVPointSprite.java +++ b/src/generated/java/org/lwjglx/opengl/NVPointSprite.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVPointSprite { + public static final int GL_COORD_REPLACE_NV = (int) 34914; public static final int GL_POINT_SPRITE_NV = (int) 34913; public static final int GL_POINT_SPRITE_R_MODE_NV = (int) 34915; diff --git a/src/generated/java/org/lwjglx/opengl/NVPrimitiveRestart.java b/src/generated/java/org/lwjglx/opengl/NVPrimitiveRestart.java index 8295c2c..aa6e1b3 100644 --- a/src/generated/java/org/lwjglx/opengl/NVPrimitiveRestart.java +++ b/src/generated/java/org/lwjglx/opengl/NVPrimitiveRestart.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVPrimitiveRestart { + public static final int GL_PRIMITIVE_RESTART_INDEX_NV = (int) 34137; public static final int GL_PRIMITIVE_RESTART_NV = (int) 34136; diff --git a/src/generated/java/org/lwjglx/opengl/NVShaderBufferLoad.java b/src/generated/java/org/lwjglx/opengl/NVShaderBufferLoad.java index 7ac7f68..1f1f73f 100644 --- a/src/generated/java/org/lwjglx/opengl/NVShaderBufferLoad.java +++ b/src/generated/java/org/lwjglx/opengl/NVShaderBufferLoad.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVShaderBufferLoad { + public static final int GL_BUFFER_GPU_ADDRESS_NV = (int) 36637; public static final int GL_GPU_ADDRESS_NV = (int) 36660; public static final int GL_MAX_SHADER_BUFFER_ADDRESS_NV = (int) 36661; diff --git a/src/generated/java/org/lwjglx/opengl/NVShaderBufferStore.java b/src/generated/java/org/lwjglx/opengl/NVShaderBufferStore.java index 2b6ac74..446f063 100644 --- a/src/generated/java/org/lwjglx/opengl/NVShaderBufferStore.java +++ b/src/generated/java/org/lwjglx/opengl/NVShaderBufferStore.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class NVShaderBufferStore { + public static final int GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV = (int) 16; } diff --git a/src/generated/java/org/lwjglx/opengl/NVTexgenReflection.java b/src/generated/java/org/lwjglx/opengl/NVTexgenReflection.java index d155dd3..ff060ae 100644 --- a/src/generated/java/org/lwjglx/opengl/NVTexgenReflection.java +++ b/src/generated/java/org/lwjglx/opengl/NVTexgenReflection.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVTexgenReflection { + public static final int GL_NORMAL_MAP_NV = (int) 34065; public static final int GL_REFLECTION_MAP_NV = (int) 34066; } diff --git a/src/generated/java/org/lwjglx/opengl/NVTextureBarrier.java b/src/generated/java/org/lwjglx/opengl/NVTextureBarrier.java index ca1945d..ca593a8 100644 --- a/src/generated/java/org/lwjglx/opengl/NVTextureBarrier.java +++ b/src/generated/java/org/lwjglx/opengl/NVTextureBarrier.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVTextureBarrier { + public static void glTextureBarrierNV() { org.lwjgl.opengl.NVTextureBarrier.glTextureBarrierNV(); } diff --git a/src/generated/java/org/lwjglx/opengl/NVTextureMultisample.java b/src/generated/java/org/lwjglx/opengl/NVTextureMultisample.java index db25a46..dc295e3 100644 --- a/src/generated/java/org/lwjglx/opengl/NVTextureMultisample.java +++ b/src/generated/java/org/lwjglx/opengl/NVTextureMultisample.java @@ -1,69 +1,62 @@ package org.lwjglx.opengl; public class NVTextureMultisample { + public static final int GL_TEXTURE_COLOR_SAMPLES_NV = (int) 36934; public static final int GL_TEXTURE_COVERAGE_SAMPLES_NV = (int) 36933; - public static void glTexImage2DMultisampleCoverageNV( - int target, - int coverageSamples, - int colorSamples, - int internalFormat, - int width, - int height, - boolean fixedSampleLocations) { + public static void glTexImage2DMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, + int internalFormat, int width, int height, boolean fixedSampleLocations) { org.lwjgl.opengl.NVTextureMultisample.glTexImage2DMultisampleCoverageNV( - target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations); + target, + coverageSamples, + colorSamples, + internalFormat, + width, + height, + fixedSampleLocations); } - public static void glTexImage3DMultisampleCoverageNV( - int target, - int coverageSamples, - int colorSamples, - int internalFormat, - int width, - int height, - int depth, - boolean fixedSampleLocations) { + public static void glTexImage3DMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, + int internalFormat, int width, int height, int depth, boolean fixedSampleLocations) { org.lwjgl.opengl.NVTextureMultisample.glTexImage3DMultisampleCoverageNV( - target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations); + target, + coverageSamples, + colorSamples, + internalFormat, + width, + height, + depth, + fixedSampleLocations); } - public static void glTextureImage2DMultisampleCoverageNV( - int texture, - int target, - int coverageSamples, - int colorSamples, - int internalFormat, - int width, - int height, - boolean fixedSampleLocations) { + public static void glTextureImage2DMultisampleCoverageNV(int texture, int target, int coverageSamples, + int colorSamples, int internalFormat, int width, int height, boolean fixedSampleLocations) { org.lwjgl.opengl.NVTextureMultisample.glTextureImage2DMultisampleCoverageNV( - texture, target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations); + texture, + target, + coverageSamples, + colorSamples, + internalFormat, + width, + height, + fixedSampleLocations); } - public static void glTextureImage2DMultisampleNV( - int texture, - int target, - int samples, - int internalFormat, - int width, - int height, - boolean fixedSampleLocations) { + public static void glTextureImage2DMultisampleNV(int texture, int target, int samples, int internalFormat, + int width, int height, boolean fixedSampleLocations) { org.lwjgl.opengl.NVTextureMultisample.glTextureImage2DMultisampleNV( - texture, target, samples, internalFormat, width, height, fixedSampleLocations); + texture, + target, + samples, + internalFormat, + width, + height, + fixedSampleLocations); } - public static void glTextureImage3DMultisampleCoverageNV( - int texture, - int target, - int coverageSamples, - int colorSamples, - int internalFormat, - int width, - int height, - int depth, - boolean fixedSampleLocations) { + public static void glTextureImage3DMultisampleCoverageNV(int texture, int target, int coverageSamples, + int colorSamples, int internalFormat, int width, int height, int depth, boolean fixedSampleLocations) { org.lwjgl.opengl.NVTextureMultisample.glTextureImage3DMultisampleCoverageNV( texture, target, @@ -76,16 +69,16 @@ public class NVTextureMultisample { fixedSampleLocations); } - public static void glTextureImage3DMultisampleNV( - int texture, - int target, - int samples, - int internalFormat, - int width, - int height, - int depth, - boolean fixedSampleLocations) { + public static void glTextureImage3DMultisampleNV(int texture, int target, int samples, int internalFormat, + int width, int height, int depth, boolean fixedSampleLocations) { org.lwjgl.opengl.NVTextureMultisample.glTextureImage3DMultisampleNV( - texture, target, samples, internalFormat, width, height, depth, fixedSampleLocations); + texture, + target, + samples, + internalFormat, + width, + height, + depth, + fixedSampleLocations); } } diff --git a/src/generated/java/org/lwjglx/opengl/NVTextureShader.java b/src/generated/java/org/lwjglx/opengl/NVTextureShader.java index 4e8a8de..7ed5314 100644 --- a/src/generated/java/org/lwjglx/opengl/NVTextureShader.java +++ b/src/generated/java/org/lwjglx/opengl/NVTextureShader.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVTextureShader { + public static final int GL_CONST_EYE_NV = (int) 34533; public static final int GL_CULL_FRAGMENT_NV = (int) 34535; public static final int GL_CULL_MODES_NV = (int) 34528; diff --git a/src/generated/java/org/lwjglx/opengl/NVTextureShader2.java b/src/generated/java/org/lwjglx/opengl/NVTextureShader2.java index 3aca1c3..a8c44e7 100644 --- a/src/generated/java/org/lwjglx/opengl/NVTextureShader2.java +++ b/src/generated/java/org/lwjglx/opengl/NVTextureShader2.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVTextureShader2 { + public static final int GL_DOT_PRODUCT_TEXTURE_3D_NV = (int) 34543; public static final int GL_DSDT8_MAG8_INTENSITY8_NV = (int) 34571; public static final int GL_DSDT8_MAG8_NV = (int) 34570; diff --git a/src/generated/java/org/lwjglx/opengl/NVTextureShader3.java b/src/generated/java/org/lwjglx/opengl/NVTextureShader3.java index ff8ffd2..60c6796 100644 --- a/src/generated/java/org/lwjglx/opengl/NVTextureShader3.java +++ b/src/generated/java/org/lwjglx/opengl/NVTextureShader3.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVTextureShader3 { + public static final int GL_DEPENDENT_HILO_TEXTURE_2D_NV = (int) 34904; public static final int GL_DEPENDENT_RGB_TEXTURE_3D_NV = (int) 34905; public static final int GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = (int) 34906; diff --git a/src/generated/java/org/lwjglx/opengl/NVTransformFeedback.java b/src/generated/java/org/lwjglx/opengl/NVTransformFeedback.java index 690976e..cfc39b0 100644 --- a/src/generated/java/org/lwjglx/opengl/NVTransformFeedback.java +++ b/src/generated/java/org/lwjglx/opengl/NVTransformFeedback.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVTransformFeedback { + public static final int GL_ACTIVE_VARYINGS_NV = (int) 35969; public static final int GL_ACTIVE_VARYING_MAX_LENGTH_NV = (int) 35970; public static final int GL_BACK_PRIMARY_COLOR_NV = (int) 35959; @@ -56,13 +57,8 @@ public class NVTransformFeedback { org.lwjgl.opengl.NVTransformFeedback.glEndTransformFeedbackNV(); } - public static void glGetActiveVaryingNV( - int program, - int index, - java.nio.IntBuffer length, - java.nio.IntBuffer size, - java.nio.IntBuffer type, - java.nio.ByteBuffer name) { + public static void glGetActiveVaryingNV(int program, int index, java.nio.IntBuffer length, java.nio.IntBuffer size, + java.nio.IntBuffer type, java.nio.ByteBuffer name) { org.lwjgl.opengl.NVTransformFeedback.glGetActiveVaryingNV(program, index, length, size, type, name); } diff --git a/src/generated/java/org/lwjglx/opengl/NVTransformFeedback2.java b/src/generated/java/org/lwjglx/opengl/NVTransformFeedback2.java index d385af9..9e0946b 100644 --- a/src/generated/java/org/lwjglx/opengl/NVTransformFeedback2.java +++ b/src/generated/java/org/lwjglx/opengl/NVTransformFeedback2.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVTransformFeedback2 { + public static final int GL_TRANSFORM_FEEDBACK_BINDING_NV = (int) 36389; public static final int GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV = (int) 36388; public static final int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV = (int) 36387; diff --git a/src/generated/java/org/lwjglx/opengl/NVVertexArrayRange.java b/src/generated/java/org/lwjglx/opengl/NVVertexArrayRange.java index 3cee166..1eebeae 100644 --- a/src/generated/java/org/lwjglx/opengl/NVVertexArrayRange.java +++ b/src/generated/java/org/lwjglx/opengl/NVVertexArrayRange.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVVertexArrayRange { + public static final int GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = (int) 34080; public static final int GL_VERTEX_ARRAY_RANGE_LENGTH_NV = (int) 34078; public static final int GL_VERTEX_ARRAY_RANGE_NV = (int) 34077; diff --git a/src/generated/java/org/lwjglx/opengl/NVVertexArrayRange2.java b/src/generated/java/org/lwjglx/opengl/NVVertexArrayRange2.java index 25e7d32..c2f907d 100644 --- a/src/generated/java/org/lwjglx/opengl/NVVertexArrayRange2.java +++ b/src/generated/java/org/lwjglx/opengl/NVVertexArrayRange2.java @@ -1,5 +1,6 @@ package org.lwjglx.opengl; public class NVVertexArrayRange2 { + public static final int GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = (int) 34099; } diff --git a/src/generated/java/org/lwjglx/opengl/NVVertexAttribInteger64bit.java b/src/generated/java/org/lwjglx/opengl/NVVertexAttribInteger64bit.java index 0d82762..4fa4318 100644 --- a/src/generated/java/org/lwjglx/opengl/NVVertexAttribInteger64bit.java +++ b/src/generated/java/org/lwjglx/opengl/NVVertexAttribInteger64bit.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVVertexAttribInteger64bit { + public static final int GL_INT64_NV = (int) 5134; public static final int GL_UNSIGNED_INT64_NV = (int) 5135; diff --git a/src/generated/java/org/lwjglx/opengl/NVVertexBufferUnifiedMemory.java b/src/generated/java/org/lwjglx/opengl/NVVertexBufferUnifiedMemory.java index 6c3a3f5..f14a02f 100644 --- a/src/generated/java/org/lwjglx/opengl/NVVertexBufferUnifiedMemory.java +++ b/src/generated/java/org/lwjglx/opengl/NVVertexBufferUnifiedMemory.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; public class NVVertexBufferUnifiedMemory { + public static final int GL_COLOR_ARRAY_ADDRESS_NV = (int) 36643; public static final int GL_COLOR_ARRAY_LENGTH_NV = (int) 36653; public static final int GL_EDGE_FLAG_ARRAY_ADDRESS_NV = (int) 36646; diff --git a/src/main/java/me/eigenraven/lwjgl3ify/BufferCasts.java b/src/main/java/me/eigenraven/lwjgl3ify/BufferCasts.java index 7416f41..ae53839 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/BufferCasts.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/BufferCasts.java @@ -1,9 +1,11 @@ package me.eigenraven.lwjgl3ify; import java.nio.*; + import org.lwjgl.system.MemoryUtil; public class BufferCasts { + public static ByteBuffer toByteBuffer(CharBuffer buffer) { return MemoryUtil.memByteBuffer(buffer); } diff --git a/src/main/java/me/eigenraven/lwjgl3ify/ClientProxy.java b/src/main/java/me/eigenraven/lwjgl3ify/ClientProxy.java index e2d8385..e7cc3d5 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/ClientProxy.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/ClientProxy.java @@ -1,17 +1,21 @@ package me.eigenraven.lwjgl3ify; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.ICrashCallable; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import java.lang.reflect.Field; import java.util.List; + import me.eigenraven.lwjgl3ify.client.GLInfoCrashCallable; import me.eigenraven.lwjgl3ify.core.Config; + import net.minecraft.client.Minecraft; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.common.MinecraftForge; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.ICrashCallable; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; + public class ClientProxy extends CommonProxy { + static final String javaVersion; static final String lwjglVersion = "LWJGL: " + org.lwjgl.Version.getVersion(); @@ -40,8 +44,8 @@ public class ClientProxy extends CommonProxy { try { final Field callablesField = FMLCommonHandler.class.getDeclaredField("crashCallables"); callablesField.setAccessible(true); - List crashCallables = - (List) callablesField.get(FMLCommonHandler.instance()); + List crashCallables = (List) callablesField + .get(FMLCommonHandler.instance()); for (int i = 0; i < crashCallables.size(); i++) { ICrashCallable original = crashCallables.get(i); if ("GL info".equals(original.getLabel()) && !(original instanceof GLInfoCrashCallable)) { diff --git a/src/main/java/me/eigenraven/lwjgl3ify/CommonProxy.java b/src/main/java/me/eigenraven/lwjgl3ify/CommonProxy.java index 26a01bb..7812eee 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/CommonProxy.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/CommonProxy.java @@ -4,6 +4,7 @@ import java.lang.reflect.Field; import java.util.HashMap; public class CommonProxy { + public void registerF3Handler() {} @SuppressWarnings("unchecked") diff --git a/src/main/java/me/eigenraven/lwjgl3ify/IExtensibleEnum.java b/src/main/java/me/eigenraven/lwjgl3ify/IExtensibleEnum.java index c84b5fc..16fe402 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/IExtensibleEnum.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/IExtensibleEnum.java @@ -1,33 +1,30 @@ /* - * Copyright (c) Forge Development LLC and contributors - * SPDX-License-Identifier: LGPL-2.1-only + * Copyright (c) Forge Development LLC and contributors SPDX-License-Identifier: LGPL-2.1-only */ package me.eigenraven.lwjgl3ify; /** - * To be implemented on vanilla enums that should be enhanced with ASM to be - * extensible. If this is implemented on a class, the class must define a static - * method called "create" which takes a String (enum name), and the rest of the + * To be implemented on vanilla enums that should be enhanced with ASM to be extensible. If this is implemented on a + * class, the class must define a static method called "create" which takes a String (enum name), and the rest of the * parameters matching a constructor. *

- * For example, an enum with the constructor {@code MyEnum(Object foo)} would - * require the method: + * For example, an enum with the constructor {@code MyEnum(Object foo)} would require the method: * *

- * public static MyEnum create(String name, Object foo)
- * {
+ * 
+ * public static MyEnum create(String name, Object foo) {
  *     throw new IllegalStateException("Enum not extended");
  * }
  * 
* - * The method contents will be replaced with ASM at runtime. Multiple - * {@code create} methods can be defined as long as each - * matches a constructor. + * The method contents will be replaced with ASM at runtime. Multiple {@code create} methods can be + * defined as long as each matches a constructor. */ public interface IExtensibleEnum { + /** - * Called by generated factory code to do any post-constructor setup required by - * the enum. Should not be called manually. + * Called by generated factory code to do any post-constructor setup required by the enum. Should not be called + * manually. */ @Deprecated default void init() {} diff --git a/src/main/java/me/eigenraven/lwjgl3ify/Lwjgl3ify.java b/src/main/java/me/eigenraven/lwjgl3ify/Lwjgl3ify.java index e660c00..5c51fa6 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/Lwjgl3ify.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/Lwjgl3ify.java @@ -1,13 +1,15 @@ package me.eigenraven.lwjgl3ify; +import me.eigenraven.lwjgl3ify.api.ConfigUtils; +import me.eigenraven.lwjgl3ify.core.Config; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -import me.eigenraven.lwjgl3ify.api.ConfigUtils; -import me.eigenraven.lwjgl3ify.core.Config; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; @Mod( modid = "lwjgl3ify", @@ -17,6 +19,7 @@ import org.apache.logging.log4j.Logger; acceptableRemoteVersions = "*", guiFactory = "me.eigenraven.lwjgl3ify.client.GuiFactory") public class Lwjgl3ify { + public static Logger LOG = LogManager.getLogger(Tags.MODID); @Mod.Instance diff --git a/src/main/java/me/eigenraven/lwjgl3ify/UnsafeHacks.java b/src/main/java/me/eigenraven/lwjgl3ify/UnsafeHacks.java index 02067dd..9e4b7a1 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/UnsafeHacks.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/UnsafeHacks.java @@ -1,28 +1,20 @@ /* - * Minecraft Forge - * Copyright (c) 2016-2019. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Minecraft Forge Copyright (c) 2016-2019. This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the Free Software Foundation version 2.1 of + * the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even + * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. You should have received a copy of the GNU Lesser General Public License along with this + * library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA */ package me.eigenraven.lwjgl3ify; import java.lang.reflect.Field; import java.util.Optional; -@SuppressWarnings({"restriction", "sunapi"}) +@SuppressWarnings({ "restriction", "sunapi" }) public class UnsafeHacks { + private static final sun.misc.Unsafe UNSAFE; static { diff --git a/src/main/java/me/eigenraven/lwjgl3ify/api/ConfigUtils.java b/src/main/java/me/eigenraven/lwjgl3ify/api/ConfigUtils.java index 6a99645..0a4f634 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/api/ConfigUtils.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/api/ConfigUtils.java @@ -1,18 +1,21 @@ package me.eigenraven.lwjgl3ify.api; -import com.google.common.base.Throwables; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.util.Collections; import java.util.Set; + import org.apache.logging.log4j.Logger; +import com.google.common.base.Throwables; + /** - * Utilities to access the Lwjgl3ify configuration safely at runtime via reflection. - * Does nothing when the mod is not loaded. + * Utilities to access the Lwjgl3ify configuration safely at runtime via reflection. Does nothing when the mod is not + * loaded. */ public class ConfigUtils { + private Class configClass; private String modVersion = ""; private MethodHandle getExtensibleEnumsHandle; @@ -20,7 +23,8 @@ public class ConfigUtils { private MethodHandle isConfigLoadedHandle; /** - * @param logger If lwjgl3ify cannot be found or there's some other exception, it will be logged here if it's not null. + * @param logger If lwjgl3ify cannot be found or there's some other exception, it will be logged here if it's not + * null. */ public ConfigUtils(Logger logger) { try { @@ -28,12 +32,12 @@ public class ConfigUtils { modVersion = (String) configClass.getField("LWJGL3IFY_VERSION").get(null); final MethodHandles.Lookup lookup = MethodHandles.publicLookup().in(configClass); - getExtensibleEnumsHandle = - lookup.findStatic(configClass, "getExtensibleEnums", MethodType.methodType(Set.class)); - addExtensibleEnumHandle = lookup.findStatic( - configClass, "addExtensibleEnum", MethodType.methodType(void.class, String.class)); - isConfigLoadedHandle = - lookup.findStatic(configClass, "isConfigLoaded", MethodType.methodType(boolean.class)); + getExtensibleEnumsHandle = lookup + .findStatic(configClass, "getExtensibleEnums", MethodType.methodType(Set.class)); + addExtensibleEnumHandle = lookup + .findStatic(configClass, "addExtensibleEnum", MethodType.methodType(void.class, String.class)); + isConfigLoadedHandle = lookup + .findStatic(configClass, "isConfigLoaded", MethodType.methodType(boolean.class)); } catch (ReflectiveOperationException e) { configClass = null; if (logger != null) { @@ -66,7 +70,9 @@ public class ConfigUtils { /** * Add an enum to the list of enums to make extensible via EnumHelper, it can't already have been loaded. - * @param className Class name of the enum to make extensible, e.g. {@literal net.minecraftforge.event.terraingen.PopulateChunkEvent$Populate$EventType} + * + * @param className Class name of the enum to make extensible, e.g. + * {@literal net.minecraftforge.event.terraingen.PopulateChunkEvent$Populate$EventType} */ public void addExtensibleEnum(String className) { try { diff --git a/src/main/java/me/eigenraven/lwjgl3ify/client/GLInfoCrashCallable.java b/src/main/java/me/eigenraven/lwjgl3ify/client/GLInfoCrashCallable.java index 8e3c06b..53cd4a1 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/client/GLInfoCrashCallable.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/client/GLInfoCrashCallable.java @@ -5,10 +5,12 @@ import static org.lwjgl.opengl.GL11.GL_VENDOR; import static org.lwjgl.opengl.GL11.GL_VERSION; import static org.lwjgl.opengl.GL11.glGetString; -import cpw.mods.fml.common.ICrashCallable; import org.lwjgl.opengl.GL; +import cpw.mods.fml.common.ICrashCallable; + public class GLInfoCrashCallable implements ICrashCallable { + @Override public String getLabel() { return "GL info"; @@ -26,12 +28,14 @@ public class GLInfoCrashCallable implements ICrashCallable { hasGlContext = false; } if (hasGlContext) { - return "' Vendor: '" + glGetString(GL_VENDOR) + "' Version: '" - + glGetString(GL_VERSION) + "' Renderer: '" - + glGetString(GL_RENDERER) + "'"; + return "' Vendor: '" + glGetString(GL_VENDOR) + + "' Version: '" + + glGetString(GL_VERSION) + + "' Renderer: '" + + glGetString(GL_RENDERER) + + "'"; } else { - return "No OpenGL context present in the calling thread: " - + Thread.currentThread().getName(); + return "No OpenGL context present in the calling thread: " + Thread.currentThread().getName(); } } } diff --git a/src/main/java/me/eigenraven/lwjgl3ify/client/GuiConfigLwjgl3ify.java b/src/main/java/me/eigenraven/lwjgl3ify/client/GuiConfigLwjgl3ify.java index 8a2f77e..87ae316 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/client/GuiConfigLwjgl3ify.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/client/GuiConfigLwjgl3ify.java @@ -1,9 +1,8 @@ package me.eigenraven.lwjgl3ify.client; -import com.google.common.collect.Lists; -import cpw.mods.fml.client.config.GuiConfig; import me.eigenraven.lwjgl3ify.Tags; import me.eigenraven.lwjgl3ify.core.Config; + import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; @@ -11,10 +10,15 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.init.Blocks; import net.minecraftforge.common.config.ConfigElement; + import org.lwjglx.input.Mouse; +import com.google.common.collect.Lists; +import cpw.mods.fml.client.config.GuiConfig; + @SuppressWarnings("unused") public class GuiConfigLwjgl3ify extends GuiConfig { + public GuiConfigLwjgl3ify(GuiScreen parent) { super( parent, diff --git a/src/main/java/me/eigenraven/lwjgl3ify/client/GuiFactory.java b/src/main/java/me/eigenraven/lwjgl3ify/client/GuiFactory.java index 1e17330..8aa5452 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/client/GuiFactory.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/client/GuiFactory.java @@ -1,12 +1,15 @@ package me.eigenraven.lwjgl3ify.client; -import cpw.mods.fml.client.IModGuiFactory; import java.util.Set; + import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; +import cpw.mods.fml.client.IModGuiFactory; + @SuppressWarnings("unused") public class GuiFactory implements IModGuiFactory { + @Override public void initialize(Minecraft minecraftInstance) {} diff --git a/src/main/java/me/eigenraven/lwjgl3ify/core/Config.java b/src/main/java/me/eigenraven/lwjgl3ify/core/Config.java index dc6d68a..242a18f 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/core/Config.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/core/Config.java @@ -4,47 +4,37 @@ import java.io.File; import java.util.Arrays; import java.util.HashSet; import java.util.Set; + import me.eigenraven.lwjgl3ify.Tags; + import net.minecraft.launchwrapper.Launch; import net.minecraftforge.common.config.Configuration; public class Config { + public static final String[] DEFAULT_EXTENSIBLE_ENUMS = new String[] { - // From EnumHelper - "net.minecraft.item.EnumAction", - "net.minecraft.item.ItemArmor$ArmorMaterial", - "net.minecraft.entity.item.EntityPainting$EnumArt", - "net.minecraft.entity.EnumCreatureAttribute", - "net.minecraft.entity.EnumCreatureType", - "net.minecraft.world.gen.structure.StructureStrongholdPieces$Stronghold$Door", - "net.minecraft.enchantment.EnumEnchantmentType", - "net.minecraft.entity.Entity$EnumEntitySize", - "net.minecraft.block.BlockPressurePlate$Sensitivity", - "net.minecraft.util.MovingObjectPosition$MovingObjectType", - "net.minecraft.world.EnumSkyBlock", - "net.minecraft.entity.player.EntityPlayer$EnumStatus", - "net.minecraft.item.Item$ToolMaterial", - "net.minecraft.item.EnumRarity", - // - "net.minecraftforge.event.terraingen.PopulateChunkEvent$Populate$EventType", - "net.minecraftforge.event.terraingen.InitMapGenEvent$EventType", - "net.minecraftforge.event.terraingen.OreGenEvent$GenerateMinable$EventType", - "net.minecraftforge.event.terraingen.DecorateBiomeEvent$Decorate$EventType", - // From GTNH crashes - "vswe.stevesfactory.Localization", - "vswe.stevesfactory.blocks.ClusterMethodRegistration", - "vswe.stevesfactory.blocks.ConnectionBlockType", - "vswe.stevesfactory.components.ComponentType", - "vswe.stevesfactory.components.ConnectionSet", - "vswe.stevesfactory.components.ConnectionOption", - "ic2.core.init.InternalName", - "gregtech.api.enums.Element", - "gregtech.api.enums.OrePrefixes", - "net.minecraft.client.audio.MusicTicker$MusicType", - "org.bukkit.Material", - "buildcraft.api.transport.IPipeTile.PipeType", - "thaumcraft.common.entities.golems.EnumGolemType", - }; + // From EnumHelper + "net.minecraft.item.EnumAction", "net.minecraft.item.ItemArmor$ArmorMaterial", + "net.minecraft.entity.item.EntityPainting$EnumArt", "net.minecraft.entity.EnumCreatureAttribute", + "net.minecraft.entity.EnumCreatureType", + "net.minecraft.world.gen.structure.StructureStrongholdPieces$Stronghold$Door", + "net.minecraft.enchantment.EnumEnchantmentType", "net.minecraft.entity.Entity$EnumEntitySize", + "net.minecraft.block.BlockPressurePlate$Sensitivity", + "net.minecraft.util.MovingObjectPosition$MovingObjectType", "net.minecraft.world.EnumSkyBlock", + "net.minecraft.entity.player.EntityPlayer$EnumStatus", "net.minecraft.item.Item$ToolMaterial", + "net.minecraft.item.EnumRarity", + // + "net.minecraftforge.event.terraingen.PopulateChunkEvent$Populate$EventType", + "net.minecraftforge.event.terraingen.InitMapGenEvent$EventType", + "net.minecraftforge.event.terraingen.OreGenEvent$GenerateMinable$EventType", + "net.minecraftforge.event.terraingen.DecorateBiomeEvent$Decorate$EventType", + // From GTNH crashes + "vswe.stevesfactory.Localization", "vswe.stevesfactory.blocks.ClusterMethodRegistration", + "vswe.stevesfactory.blocks.ConnectionBlockType", "vswe.stevesfactory.components.ComponentType", + "vswe.stevesfactory.components.ConnectionSet", "vswe.stevesfactory.components.ConnectionOption", + "ic2.core.init.InternalName", "gregtech.api.enums.Element", "gregtech.api.enums.OrePrefixes", + "net.minecraft.client.audio.MusicTicker$MusicType", "org.bukkit.Material", + "buildcraft.api.transport.IPipeTile.PipeType", "thaumcraft.common.entities.golems.EnumGolemType", }; private static final Set EXTENSIBLE_ENUMS = new HashSet<>(Arrays.asList(DEFAULT_EXTENSIBLE_ENUMS)); private static boolean configLoaded = false; @@ -94,22 +84,26 @@ public class Config { } public static void reloadConfigObject() { - EXTENSIBLE_ENUMS.addAll(Arrays.asList(config.get( - CATEGORY_CORE, - "extensibleEnums", - EXTENSIBLE_ENUMS.toArray(new String[0]), - "Enums to make extensible at runtime") - .getStringList())); - SHOW_JAVA_VERSION = config.getBoolean( - "showJavaVersion", CATEGORY_CORE, SHOW_JAVA_VERSION, "Show java version in the debug hud"); + EXTENSIBLE_ENUMS.addAll( + Arrays.asList( + config.get( + CATEGORY_CORE, + "extensibleEnums", + EXTENSIBLE_ENUMS.toArray(new String[0]), + "Enums to make extensible at runtime").getStringList())); + SHOW_JAVA_VERSION = config + .getBoolean("showJavaVersion", CATEGORY_CORE, SHOW_JAVA_VERSION, "Show java version in the debug hud"); SHOW_LWJGL_VERSION = config.getBoolean( - "showLwjglVersion", CATEGORY_CORE, SHOW_LWJGL_VERSION, "Show lwjgl version in the debug hud"); + "showLwjglVersion", + CATEGORY_CORE, + SHOW_LWJGL_VERSION, + "Show lwjgl version in the debug hud"); - WINDOW_START_MAXIMIZED = - config.getBoolean("maximized", CATEGORY_WINDOW, WINDOW_START_MAXIMIZED, "Start maximized?"); + WINDOW_START_MAXIMIZED = config + .getBoolean("maximized", CATEGORY_WINDOW, WINDOW_START_MAXIMIZED, "Start maximized?"); WINDOW_START_FOCUSED = config.getBoolean("focused", CATEGORY_WINDOW, WINDOW_START_FOCUSED, "Start focused?"); - WINDOW_START_ICONIFIED = - config.getBoolean("iconified", CATEGORY_WINDOW, WINDOW_START_ICONIFIED, "Start iconified?"); + WINDOW_START_ICONIFIED = config + .getBoolean("iconified", CATEGORY_WINDOW, WINDOW_START_ICONIFIED, "Start iconified?"); WINDOW_DECORATED = config.getBoolean( "decorated", CATEGORY_WINDOW, @@ -126,8 +120,8 @@ public class Config { COCOA_FRAME_NAME, "OSX-only - identifier used to save and restore the window position and size"); - INPUT_INVERT_WHEEL = config.getBoolean( - "invertScrollWheel", CATEGORY_INPUT, INPUT_INVERT_WHEEL, "Invert scrolling direction"); + INPUT_INVERT_WHEEL = config + .getBoolean("invertScrollWheel", CATEGORY_INPUT, INPUT_INVERT_WHEEL, "Invert scrolling direction"); INPUT_SCROLL_SPEED = (double) config.getFloat( "scrollSpeedMultiplier", CATEGORY_INPUT, @@ -142,7 +136,10 @@ public class Config { OPENGL_DEBUG_CONTEXT, "Enable KHR_debug in the OpenGL context for advanced debugging capabilities"); OPENGL_SRGB_CONTEXT = config.getBoolean( - "srgb", CATEGORY_GLCONTEXT, OPENGL_SRGB_CONTEXT, "Make the framebuffer use the sRGB color space"); + "srgb", + CATEGORY_GLCONTEXT, + OPENGL_SRGB_CONTEXT, + "Make the framebuffer use the sRGB color space"); OPENGL_DOUBLEBUFFER = config.getBoolean( "doubleBuffer", CATEGORY_GLCONTEXT, diff --git a/src/main/java/me/eigenraven/lwjgl3ify/core/ExtensibleEnumTransformerHelper.java b/src/main/java/me/eigenraven/lwjgl3ify/core/ExtensibleEnumTransformerHelper.java index f681cab..e8ad108 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/core/ExtensibleEnumTransformerHelper.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/core/ExtensibleEnumTransformerHelper.java @@ -1,13 +1,14 @@ /* - * Copyright (c) Forge Development LLC and contributors - * SPDX-License-Identifier: LGPL-2.1-only + * Copyright (c) Forge Development LLC and contributors SPDX-License-Identifier: LGPL-2.1-only */ package me.eigenraven.lwjgl3ify.core; import java.util.List; import java.util.stream.Collectors; + import me.eigenraven.lwjgl3ify.IExtensibleEnum; import me.eigenraven.lwjgl3ify.api.MakeEnumExtensible; + import org.apache.commons.lang3.ArrayUtils; import org.apache.logging.log4j.Logger; import org.objectweb.asm.Label; @@ -20,17 +21,22 @@ import org.objectweb.asm.tree.FieldNode; import org.objectweb.asm.tree.MethodNode; public class ExtensibleEnumTransformerHelper { + private final Logger LOGGER = Lwjgl3ifyCoremod.LOGGER; private final Type STRING = Type.getType(String.class); private final Type ENUM = Type.getType(Enum.class); public final Type MARKER_IFACE = Type.getType(IExtensibleEnum.class); public final Type MARKER_ANNOTATION = Type.getType(MakeEnumExtensible.class); - private final Type ARRAY_UTILS = Type.getType( - "Lorg/apache/commons/lang3/ArrayUtils;"); // Don't directly reference this to prevent class loading. + private final Type ARRAY_UTILS = Type.getType("Lorg/apache/commons/lang3/ArrayUtils;"); // Don't directly reference + // this to prevent class + // loading. private final String ADD_DESC = Type.getMethodDescriptor( - Type.getType(Object[].class), Type.getType(Object[].class), Type.getType(Object.class)); - private final Type UNSAFE_HACKS = Type.getType( - "Lme/eigenraven/lwjgl3ify/UnsafeHacks;"); // Again, not direct reference to prevent class loading. + Type.getType(Object[].class), + Type.getType(Object[].class), + Type.getType(Object.class)); + private final Type UNSAFE_HACKS = Type.getType("Lme/eigenraven/lwjgl3ify/UnsafeHacks;"); // Again, not direct + // reference to prevent + // class loading. private final String CLEAN_DESC = Type.getMethodDescriptor(Type.VOID_TYPE, Type.getType(Class.class)); private final String NAME_DESC = Type.getMethodDescriptor(STRING); private final String EQUALS_DESC = Type.getMethodDescriptor(Type.BOOLEAN_TYPE, STRING); @@ -46,8 +52,7 @@ public class ExtensibleEnumTransformerHelper { final int flags = Opcodes.ACC_PRIVATE | Opcodes.ACC_STATIC | Opcodes.ACC_FINAL | Opcodes.ACC_SYNTHETIC; FieldNode values = classNode.fields.stream() - .filter(f -> f.desc.contentEquals(array.getDescriptor()) && ((f.access & flags) == flags)) - .findFirst() + .filter(f -> f.desc.contentEquals(array.getDescriptor()) && ((f.access & flags) == flags)).findFirst() .orElse(null); boolean process = false; @@ -64,22 +69,23 @@ public class ExtensibleEnumTransformerHelper { return false; } - List constructors = - classNode.methods.stream().filter(m -> m.name.equals("")).collect(Collectors.toList()); + List constructors = classNode.methods.stream().filter(m -> m.name.equals("")) + .collect(Collectors.toList()); // Static methods named "create" with first argument as a string - List candidates = constructors.stream() - .map(ctor -> { - final String[] exceptions = ctor.exceptions == null ? null : ctor.exceptions.toArray(new String[0]); - final Type ctorDesc = Type.getMethodType(ctor.desc); - final Type creatorDesc = - Type.getMethodType(classType, ArrayUtils.remove(ctorDesc.getArgumentTypes(), 1)); - final MethodNode creator = new MethodNode( - ctor.access, CREATE_METHOD_NAME, creatorDesc.getDescriptor(), null, exceptions); - creator.access = Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC; - return creator; - }) - .collect(Collectors.toList()); + List candidates = constructors.stream().map(ctor -> { + final String[] exceptions = ctor.exceptions == null ? null : ctor.exceptions.toArray(new String[0]); + final Type ctorDesc = Type.getMethodType(ctor.desc); + final Type creatorDesc = Type.getMethodType(classType, ArrayUtils.remove(ctorDesc.getArgumentTypes(), 1)); + final MethodNode creator = new MethodNode( + ctor.access, + CREATE_METHOD_NAME, + creatorDesc.getDescriptor(), + null, + exceptions); + creator.access = Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC; + return creator; + }).collect(Collectors.toList()); if (candidates.isEmpty()) { throw new IllegalStateException( @@ -93,8 +99,12 @@ public class ExtensibleEnumTransformerHelper { if (args.length == 0 || !args[0].equals(STRING)) { if (LOGGER.isErrorEnabled()) { String sb = "Enum has create method without String as first parameter:\n" + " Enum: " - + classType.getDescriptor() + "\n" + " Target: " - + mtd.name + mtd.desc + "\n"; + + classType.getDescriptor() + + "\n" + + " Target: " + + mtd.name + + mtd.desc + + "\n"; LOGGER.error(sb); } throw new IllegalStateException( @@ -105,9 +115,16 @@ public class ExtensibleEnumTransformerHelper { if (!ret.equals(classType)) { if (LOGGER.isErrorEnabled()) { String sb = "Enum has create method with incorrect return type:\n" + " Enum: " - + classType.getDescriptor() + "\n" + " Target: " - + mtd.name + mtd.desc + "\n" + " Found: " - + ret.getClassName() + ", Expected: " + classType.getClassName(); + + classType.getDescriptor() + + "\n" + + " Target: " + + mtd.name + + mtd.desc + + "\n" + + " Found: " + + ret.getClassName() + + ", Expected: " + + classType.getClassName(); LOGGER.error(sb); } throw new IllegalStateException( @@ -121,10 +138,8 @@ public class ExtensibleEnumTransformerHelper { String desc = Type.getMethodDescriptor(Type.VOID_TYPE, ctrArgs); - MethodNode ctr = classNode.methods.stream() - .filter(m -> m.name.equals("") && m.desc.equals(desc)) - .findFirst() - .orElse(null); + MethodNode ctr = classNode.methods.stream().filter(m -> m.name.equals("") && m.desc.equals(desc)) + .findFirst().orElse(null); if (ctr == null) { if (LOGGER.isErrorEnabled()) { StringBuilder sb = new StringBuilder(); @@ -132,8 +147,7 @@ public class ExtensibleEnumTransformerHelper { sb.append(" Enum: ").append(classType.getDescriptor()).append("\n"); sb.append(" Candidate: ").append(mtd.desc).append("\n"); sb.append(" Target: ").append(desc).append("\n"); - classNode.methods.stream() - .filter(m -> m.name.equals("")) + classNode.methods.stream().filter(m -> m.name.equals("")) .forEach(m -> sb.append(" : ").append(m.desc).append("\n")); LOGGER.error(sb.toString()); } @@ -144,13 +158,8 @@ public class ExtensibleEnumTransformerHelper { if (LOGGER.isErrorEnabled()) { StringBuilder sb = new StringBuilder(); sb.append("Enum has create method but we could not find $VALUES. Found:\n"); - classNode.fields.stream() - .filter(f -> (f.access & Opcodes.ACC_STATIC) != 0) - .forEach(m -> sb.append(" ") - .append(m.name) - .append(" ") - .append(m.desc) - .append("\n")); + classNode.fields.stream().filter(f -> (f.access & Opcodes.ACC_STATIC) != 0) + .forEach(m -> sb.append(" ").append(m.name).append(" ").append(m.desc).append("\n")); LOGGER.error(sb.toString()); } throw new IllegalStateException("Enum has create method but we could not find $VALUES"); diff --git a/src/main/java/me/eigenraven/lwjgl3ify/core/FixConstantPoolInterfaceMethodRefHelper.java b/src/main/java/me/eigenraven/lwjgl3ify/core/FixConstantPoolInterfaceMethodRefHelper.java index f6c16ac..99b881d 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/core/FixConstantPoolInterfaceMethodRefHelper.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/core/FixConstantPoolInterfaceMethodRefHelper.java @@ -1,6 +1,7 @@ package me.eigenraven.lwjgl3ify.core; import java.util.concurrent.atomic.AtomicBoolean; + import org.objectweb.asm.Handle; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.AbstractInsnNode; @@ -10,13 +11,15 @@ import org.objectweb.asm.tree.MethodNode; /** * Fixes a compilation bug of the java 8 compiler leading to the following exception at runtime: - * cpw.mods.fml.common.LoaderException: java.lang.IncompatibleClassChangeError: Inconsistent constant pool data - * in classfile for class com/gtnewhorizon/structurelib/alignment/IAlignmentLimits. Method - * 'boolean lambda$static$0(net.minecraftforge.common.util.ForgeDirection, - * com.gtnewhorizon.structurelib.alignment.enumerable.Rotation, com.gtnewhorizon.structurelib.alignment.enumerable.Flip)' - * at index 77 is CONSTANT_MethodRef and should be CONSTANT_InterfaceMethodRef + * cpw.mods.fml.common.LoaderException: java.lang.IncompatibleClassChangeError: Inconsistent constant pool data in + * classfile for class com/gtnewhorizon/structurelib/alignment/IAlignmentLimits. Method 'boolean + * lambda$static$0(net.minecraftforge.common.util.ForgeDirection, + * com.gtnewhorizon.structurelib.alignment.enumerable.Rotation, + * com.gtnewhorizon.structurelib.alignment.enumerable.Flip)' at index 77 is CONSTANT_MethodRef and should be + * CONSTANT_InterfaceMethodRef */ public class FixConstantPoolInterfaceMethodRefHelper { + public boolean transform(ClassNode node) { if (System.getProperty("java.specification.version", "1.8").trim().startsWith("1.8")) { return false; @@ -53,8 +56,7 @@ public class FixConstantPoolInterfaceMethodRefHelper { } } } - default -> { - } + default -> {} // no-op } return changed.get(); diff --git a/src/main/java/me/eigenraven/lwjgl3ify/core/Lwjgl3ifyCoremod.java b/src/main/java/me/eigenraven/lwjgl3ify/core/Lwjgl3ifyCoremod.java index 0889b8d..e3e51c9 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/core/Lwjgl3ifyCoremod.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/core/Lwjgl3ifyCoremod.java @@ -1,23 +1,22 @@ package me.eigenraven.lwjgl3ify.core; -import cpw.mods.fml.relauncher.IFMLLoadingPlugin; import java.util.List; import java.util.Map; + import me.eigenraven.lwjgl3ify.Tags; + import net.minecraft.launchwrapper.LaunchClassLoader; + import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.spongepowered.asm.launch.GlobalProperties; import org.spongepowered.asm.service.mojang.MixinServiceLaunchWrapper; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin; + @IFMLLoadingPlugin.MCVersion("1.7.10") -@IFMLLoadingPlugin.TransformerExclusions({ - "org.lwjglx", - "org.lwjgl", - "org.lwjgl.input", - "org.lwjglx.input", - "me.eigenraven.lwjgl3ify.core" -}) +@IFMLLoadingPlugin.TransformerExclusions({ "org.lwjglx", "org.lwjgl", "org.lwjgl.input", "org.lwjglx.input", + "me.eigenraven.lwjgl3ify.core" }) @IFMLLoadingPlugin.SortingIndex(Integer.MAX_VALUE - 2) public class Lwjgl3ifyCoremod implements IFMLLoadingPlugin { @@ -29,10 +28,7 @@ public class Lwjgl3ifyCoremod implements IFMLLoadingPlugin { LaunchClassLoader launchLoader = (LaunchClassLoader) getClass().getClassLoader(); launchLoader.addClassLoaderExclusion("javax"); } catch (ClassCastException e) { - LOGGER.warn( - "Unsupported launch class loader type " - + getClass().getClassLoader().getClass(), - e); + LOGGER.warn("Unsupported launch class loader type " + getClass().getClassLoader().getClass(), e); } // Ensure javax.script.ScriptEngineManager gets loaded try { @@ -51,9 +47,8 @@ public class Lwjgl3ifyCoremod implements IFMLLoadingPlugin { tweakClasses.add(PostMixinTransformInjector.class.getName()); } - return new String[] { - LwjglRedirectTransformer.class.getName(), UnfinalizeObjectHoldersTransformer.class.getName() - }; + return new String[] { LwjglRedirectTransformer.class.getName(), + UnfinalizeObjectHoldersTransformer.class.getName() }; } @Override diff --git a/src/main/java/me/eigenraven/lwjgl3ify/core/LwjglRedirectTransformer.java b/src/main/java/me/eigenraven/lwjgl3ify/core/LwjglRedirectTransformer.java index f3ea654..9dbaf36 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/core/LwjglRedirectTransformer.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/core/LwjglRedirectTransformer.java @@ -1,7 +1,9 @@ package me.eigenraven.lwjgl3ify.core; import me.eigenraven.lwjgl3ify.api.Lwjgl3Aware; + import net.minecraft.launchwrapper.IClassTransformer; + import org.spongepowered.libraries.org.objectweb.asm.AnnotationVisitor; import org.spongepowered.libraries.org.objectweb.asm.ClassReader; import org.spongepowered.libraries.org.objectweb.asm.ClassVisitor; @@ -11,6 +13,7 @@ import org.spongepowered.libraries.org.objectweb.asm.commons.ClassRemapper; import org.spongepowered.libraries.org.objectweb.asm.commons.Remapper; public class LwjglRedirectTransformer extends Remapper implements IClassTransformer { + int remaps = 0, calls = 0; public static LwjglRedirectTransformer activeInstance = null; @@ -34,6 +37,7 @@ public class LwjglRedirectTransformer extends Remapper implements IClassTransfor ClassReader reader = new ClassReader(basicClass); ClassWriter writer = new ClassWriter(0); ClassVisitor visitor = new ClassRemapper(writer, this) { + @Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { if (desc.equals(Type.getDescriptor(Lwjgl3Aware.class))) { @@ -55,13 +59,10 @@ public class LwjglRedirectTransformer extends Remapper implements IClassTransfor return writer.toByteArray(); } - final String[] fromPrefixes = new String[] { - "org/lwjgl/", "paulscode/sound/libraries/", "javax/xml/bind/", - }; + final String[] fromPrefixes = new String[] { "org/lwjgl/", "paulscode/sound/libraries/", "javax/xml/bind/", }; - final String[] toPrefixes = new String[] { - "org/lwjglx/", "me/eigenraven/lwjgl3ify/paulscode/sound/libraries/", "jakarta/xml/bind/", - }; + final String[] toPrefixes = new String[] { "org/lwjglx/", "me/eigenraven/lwjgl3ify/paulscode/sound/libraries/", + "jakarta/xml/bind/", }; @Override public String map(String typeName) { @@ -79,5 +80,6 @@ public class LwjglRedirectTransformer extends Remapper implements IClassTransfor return typeName; } - private static class Lwjgl3AwareException extends RuntimeException {} + private static class Lwjgl3AwareException extends RuntimeException { + } } diff --git a/src/main/java/me/eigenraven/lwjgl3ify/core/PostMixinTransformInjector.java b/src/main/java/me/eigenraven/lwjgl3ify/core/PostMixinTransformInjector.java index 79807fa..4462461 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/core/PostMixinTransformInjector.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/core/PostMixinTransformInjector.java @@ -2,16 +2,20 @@ package me.eigenraven.lwjgl3ify.core; import java.io.File; import java.util.List; + import net.minecraft.launchwrapper.ITweaker; import net.minecraft.launchwrapper.Launch; import net.minecraft.launchwrapper.LaunchClassLoader; /** - * Mixins inject themselves at the end of the asm transformer chain in the class loader via a ITweaker hack, we do the same for compatibility because lwjgl3ify has to run after mixins. + * Mixins inject themselves at the end of the asm transformer chain in the class loader via a ITweaker hack, we do the + * same for compatibility because lwjgl3ify has to run after mixins. + * * @see org.spongepowered.asm.mixin.EnvironmentStateTweaker * @see org.spongepowered.asm.service.mojang.MixinServiceLaunchWrapper */ public class PostMixinTransformInjector implements ITweaker { + @Override public void acceptOptions(List args, File gameDir, File assetsDir, String profile) { // no-op diff --git a/src/main/java/me/eigenraven/lwjgl3ify/core/UnfinalizeObjectHoldersTransformer.java b/src/main/java/me/eigenraven/lwjgl3ify/core/UnfinalizeObjectHoldersTransformer.java index 31f3125..1a6785a 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/core/UnfinalizeObjectHoldersTransformer.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/core/UnfinalizeObjectHoldersTransformer.java @@ -2,8 +2,11 @@ package me.eigenraven.lwjgl3ify.core; import java.util.ArrayList; import java.util.List; + import me.eigenraven.lwjgl3ify.WasFinalObjectHolder; + import net.minecraft.launchwrapper.IClassTransformer; + import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.Opcodes; @@ -13,10 +16,10 @@ import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.FieldNode; public class UnfinalizeObjectHoldersTransformer implements IClassTransformer { + // Keep ClassNode-operating transformers together for efficiency (don't read/write the class multiple times) final ExtensibleEnumTransformerHelper enumTransformer = new ExtensibleEnumTransformerHelper(); - final FixConstantPoolInterfaceMethodRefHelper cpiMethodRefTransformer = - new FixConstantPoolInterfaceMethodRefHelper(); + final FixConstantPoolInterfaceMethodRefHelper cpiMethodRefTransformer = new FixConstantPoolInterfaceMethodRefHelper(); private static boolean isHolder(List annotations) { if (annotations == null) { @@ -70,8 +73,8 @@ public class UnfinalizeObjectHoldersTransformer implements IClassTransformer { if ((field.access & Opcodes.ACC_FINAL) != 0) { if (field.visibleAnnotations == null) { field.visibleAnnotations = new ArrayList<>(1); - field.visibleAnnotations.add( - new AnnotationNode(Type.getDescriptor(WasFinalObjectHolder.class))); + field.visibleAnnotations + .add(new AnnotationNode(Type.getDescriptor(WasFinalObjectHolder.class))); } field.access = field.access & (~Opcodes.ACC_FINAL); } @@ -101,7 +104,9 @@ public class UnfinalizeObjectHoldersTransformer implements IClassTransformer { if (ifaceMethodRefsTransformed) { workDone = true; Lwjgl3ifyCoremod.LOGGER.warn( - "Fixed missing CONSTANT_InterfaceMethodRef miscompilation in {}={}", name, transformedName); + "Fixed missing CONSTANT_InterfaceMethodRef miscompilation in {}={}", + name, + transformedName); } if (workDone) { diff --git a/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ItemStackHolderRef.java b/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ItemStackHolderRef.java index ef3c825..b53d2de 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ItemStackHolderRef.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ItemStackHolderRef.java @@ -1,20 +1,22 @@ package me.eigenraven.lwjgl3ify.mixins.fml; -import com.google.common.base.Throwables; -import cpw.mods.fml.common.FMLLog; -import cpw.mods.fml.common.registry.GameRegistry; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.reflect.Field; + import net.minecraft.item.ItemStack; + import org.apache.logging.log4j.Level; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; -@Mixin( - targets = {"cpw.mods.fml.common.registry.ItemStackHolderRef"}, - remap = false) +import com.google.common.base.Throwables; + +import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.common.registry.GameRegistry; + +@Mixin(targets = { "cpw.mods.fml.common.registry.ItemStackHolderRef" }, remap = false) public class ItemStackHolderRef { @Shadow(remap = false) @@ -55,28 +57,26 @@ public class ItemStackHolderRef { try { is = GameRegistry.makeItemStack(itemName, meta, 1, serializednbt); } catch (RuntimeException e) { - FMLLog.getLogger() - .log( - Level.ERROR, - "Caught exception processing itemstack {},{},{} in annotation at {}.{}", - itemName, - meta, - serializednbt, - field.getClass().getName(), - field.getName()); + FMLLog.getLogger().log( + Level.ERROR, + "Caught exception processing itemstack {},{},{} in annotation at {}.{}", + itemName, + meta, + serializednbt, + field.getClass().getName(), + field.getName()); throw e; } try { fieldSetter.invoke(is); } catch (Throwable e) { - FMLLog.getLogger() - .log( - Level.WARN, - "Unable to set {} with value {},{},{}", - this.field, - this.itemName, - this.meta, - this.serializednbt); + FMLLog.getLogger().log( + Level.WARN, + "Unable to set {} with value {},{},{}", + this.field, + this.itemName, + this.meta, + this.serializednbt); } } } diff --git a/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/JarDiscoverer.java b/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/JarDiscoverer.java index 3660786..347f9dd 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/JarDiscoverer.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/JarDiscoverer.java @@ -1,18 +1,17 @@ package me.eigenraven.lwjgl3ify.mixins.fml; import java.util.zip.ZipEntry; + import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; -@Mixin( - value = {cpw.mods.fml.common.discovery.JarDiscoverer.class}, - remap = false) +@Mixin(value = { cpw.mods.fml.common.discovery.JarDiscoverer.class }, remap = false) public class JarDiscoverer { + @Redirect( method = { - "Lcpw/mods/fml/common/discovery/JarDiscoverer;discover(Lcpw/mods/fml/common/discovery/ModCandidate;Lcpw/mods/fml/common/discovery/ASMDataTable;)Ljava/util/List;" - }, + "Lcpw/mods/fml/common/discovery/JarDiscoverer;discover(Lcpw/mods/fml/common/discovery/ModCandidate;Lcpw/mods/fml/common/discovery/ASMDataTable;)Ljava/util/List;" }, at = @At(ordinal = 1, value = "INVOKE", target = "Ljava/util/zip/ZipEntry;getName()Ljava/lang/String;"), remap = false, require = 1) @@ -21,8 +20,7 @@ public class JarDiscoverer { if (name == null) { return null; } - if (name.contains("module-info.class") - || name.startsWith("META-INF/versions/") + if (name.contains("module-info.class") || name.startsWith("META-INF/versions/") || name.contains("org/openjdk/nashorn")) { // Triggers the continue in the loop return "__MACOSX_ignoreme"; diff --git a/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ObjectHolderRef.java b/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ObjectHolderRef.java index 878a609..0d32d47 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ObjectHolderRef.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ObjectHolderRef.java @@ -1,20 +1,22 @@ package me.eigenraven.lwjgl3ify.mixins.fml; -import com.google.common.base.Throwables; -import cpw.mods.fml.common.FMLLog; -import cpw.mods.fml.common.registry.GameData; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.reflect.Field; + import net.minecraft.init.Blocks; + import org.apache.logging.log4j.Level; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; -@Mixin( - targets = {"cpw.mods.fml.common.registry.ObjectHolderRef"}, - remap = false) +import com.google.common.base.Throwables; + +import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.common.registry.GameData; + +@Mixin(targets = { "cpw.mods.fml.common.registry.ObjectHolderRef" }, remap = false) public class ObjectHolderRef { @Shadow(remap = false) @@ -70,12 +72,11 @@ public class ObjectHolderRef { } if (thing == null) { - FMLLog.getLogger() - .log( - Level.DEBUG, - "Unable to lookup {} for {}. This means the object wasn't registered. It's likely just mod options.", - injectedObject, - field); + FMLLog.getLogger().log( + Level.DEBUG, + "Unable to lookup {} for {}. This means the object wasn't registered. It's likely just mod options.", + injectedObject, + field); return; } try { diff --git a/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ObjectHolderRegistry.java b/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ObjectHolderRegistry.java index 7445c16..e0403ec 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ObjectHolderRegistry.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/mixins/fml/ObjectHolderRegistry.java @@ -2,17 +2,18 @@ package me.eigenraven.lwjgl3ify.mixins.fml; import java.lang.reflect.Field; import java.lang.reflect.Modifier; + import me.eigenraven.lwjgl3ify.WasFinalObjectHolder; + import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; -@Mixin( - value = {cpw.mods.fml.common.registry.ObjectHolderRegistry.class}, - remap = false) +@Mixin(value = { cpw.mods.fml.common.registry.ObjectHolderRegistry.class }, remap = false) public abstract class ObjectHolderRegistry { + @Redirect( - method = {"cpw.mods.fml.common.registry.ObjectHolderRegistry.scanClassForFields"}, + method = { "cpw.mods.fml.common.registry.ObjectHolderRegistry.scanClassForFields" }, at = @At(value = "INVOKE", target = "Ljava/lang/reflect/Field;getModifiers()I"), remap = false, require = 1) diff --git a/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinStitcher.java b/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinStitcher.java index b1353ba..c2adf0f 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinStitcher.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinStitcher.java @@ -1,17 +1,21 @@ package me.eigenraven.lwjgl3ify.mixins.game; import java.util.*; + import me.eigenraven.lwjgl3ify.textures.StbStitcher; + import net.minecraft.client.renderer.texture.Stitcher; import net.minecraft.client.renderer.texture.TextureAtlasSprite; + import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; import org.spongepowered.asm.mixin.Shadow; @Mixin(Stitcher.class) -@SuppressWarnings({"unchecked", "rawtypes"}) +@SuppressWarnings({ "unchecked", "rawtypes" }) public abstract class MixinStitcher { + @Shadow @Final private Set setStitchHolders = new HashSet(256); @@ -28,8 +32,8 @@ public abstract class MixinStitcher { */ @Overwrite public void doStitch() { - Stitcher.Holder[] aholder = - (Stitcher.Holder[]) this.setStitchHolders.toArray(new Stitcher.Holder[this.setStitchHolders.size()]); + Stitcher.Holder[] aholder = (Stitcher.Holder[]) this.setStitchHolders + .toArray(new Stitcher.Holder[this.setStitchHolders.size()]); Arrays.sort(aholder); int size = StbStitcher.packRects(aholder); diff --git a/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinTextureAtlasSprite.java b/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinTextureAtlasSprite.java index 3568ef3..2f2b7aa 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinTextureAtlasSprite.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinTextureAtlasSprite.java @@ -1,8 +1,10 @@ package me.eigenraven.lwjgl3ify.mixins.game; import java.awt.image.BufferedImage; + import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.data.AnimationMetadataSection; + import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -10,9 +12,10 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(TextureAtlasSprite.class) public class MixinTextureAtlasSprite { + @Inject(method = "loadSprite", at = @At("TAIL")) - void cleanupAfterLoadSprite( - BufferedImage[] frames, AnimationMetadataSection aniData, boolean anisotropicFiltering, CallbackInfo info) { + void cleanupAfterLoadSprite(BufferedImage[] frames, AnimationMetadataSection aniData, boolean anisotropicFiltering, + CallbackInfo info) { for (BufferedImage img : frames) { // Close any NativeBackedImage instances if (img instanceof AutoCloseable) { diff --git a/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinTextureMap.java b/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinTextureMap.java index fa3738a..76dc61c 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinTextureMap.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/mixins/game/MixinTextureMap.java @@ -3,22 +3,25 @@ package me.eigenraven.lwjgl3ify.mixins.game; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; + import me.eigenraven.lwjgl3ify.textures.NativeBackedImage; + import net.minecraft.client.renderer.texture.AbstractTexture; import net.minecraft.client.renderer.texture.TextureMap; + import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(TextureMap.class) public abstract class MixinTextureMap extends AbstractTexture { + @Redirect( method = "loadTextureAtlas", - at = - @At( - value = "INVOKE", - target = "Ljavax/imageio/ImageIO;read(Ljava/io/InputStream;)Ljava/awt/image/BufferedImage;", - remap = false)) + at = @At( + value = "INVOKE", + target = "Ljavax/imageio/ImageIO;read(Ljava/io/InputStream;)Ljava/awt/image/BufferedImage;", + remap = false)) private BufferedImage redirectImageRead(InputStream stream) { try { return NativeBackedImage.make(stream); diff --git a/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/ChannelLWJGLOpenAL.java b/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/ChannelLWJGLOpenAL.java index e2dc913..d8b5a5f 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/ChannelLWJGLOpenAL.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/ChannelLWJGLOpenAL.java @@ -3,90 +3,63 @@ package me.eigenraven.lwjgl3ify.paulscode.sound.libraries; import java.nio.ByteBuffer; import java.nio.IntBuffer; import java.util.LinkedList; + import javax.sound.sampled.AudioFormat; + import org.lwjgl.BufferUtils; import org.lwjgl.openal.AL10; import org.lwjgl.openal.AL11; + import paulscode.sound.Channel; import paulscode.sound.SoundSystemConfig; /** - * The ChannelLWJGLOpenAL class is used to reserve a sound-card voice using the - * lwjgl binding of OpenAL. Channels can be either normal or streaming - * channels. - *

- * This software is based on or using the LWJGL Lightweight Java Gaming - * Library available from - * http://www.lwjgl.org/. - *


- * LWJGL License: - *
- * Copyright (c) 2002-2008 Lightweight Java Game Library Project - * All rights reserved. - *
- * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * The ChannelLWJGLOpenAL class is used to reserve a sound-card voice using the lwjgl binding of OpenAL. Channels can be + * either normal or streaming channels.
*
- * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - *
- * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - *
- * * Neither the name of 'Light Weight Java Game Library' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * This software is based on or using the LWJGL Lightweight Java Gaming Library available from http://www.lwjgl.org/. + *

*
- * 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. - *


- * SoundSystem LibraryLWJGLOpenAL License:

- * - * You are free to use this library for any purpose, commercial or otherwise. - * You may modify this library or source code, and distribute it any way you - * like, provided the following conditions are met: - *
- * 1) You must abide by the conditions of the aforementioned LWJGL License. - *
- * 2) You may not falsely claim to be the author of this library or any - * unmodified portion of it. - *
- * 3) You may not copyright this library or a modified version of it and then - * sue me for copyright infringement. - *
- * 4) If you modify the source code, you must clearly document the changes - * made before redistributing the modified source code, so other users know - * it is not the original code. - *
- * 5) You are not required to give me credit for this library in any derived - * work, but if you do, you must also mention my website: - * http://www.paulscode.com - *
- * 6) I the author will not be responsible for any damages (physical, - * financial, or otherwise) caused by the use if this library or any part - * of it. - *
- * 7) I the author do not guarantee, warrant, or make any representations, - * either expressed or implied, regarding the use of this library or any - * part of it. - *

- * Author: Paul Lamb + * LWJGL License:
+ * Copyright (c) 2002-2008 Lightweight Java Game Library Project All rights reserved.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the + * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following + * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the name of 'Light Weight Java Game Library' nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * http://www.paulscode.com - *
+ *
+ *
SoundSystem LibraryLWJGLOpenAL License:
+ *
+ * You are free to use this library for any purpose, commercial or otherwise. You may modify this library or source + * code, and distribute it any way you like, provided the following conditions are met:
+ * 1) You must abide by the conditions of the aforementioned LWJGL License.
+ * 2) You may not falsely claim to be the author of this library or any unmodified portion of it.
+ * 3) You may not copyright this library or a modified version of it and then sue me for copyright infringement.
+ * 4) If you modify the source code, you must clearly document the changes made before redistributing the modified + * source code, so other users know it is not the original code.
+ * 5) You are not required to give me credit for this library in any derived work, but if you do, you must also mention + * my website: http://www.paulscode.com
+ * 6) I the author will not be responsible for any damages (physical, financial, or otherwise) caused by the use if this + * library or any part of it.
+ * 7) I the author do not guarantee, warrant, or make any representations, either expressed or implied, regarding the + * use of this library or any part of it.
+ *
+ * Author: Paul Lamb
+ * http://www.paulscode.com
*/ public class ChannelLWJGLOpenAL extends Channel { + /** * OpenAL's IntBuffer identifier for this channel. */ @@ -108,12 +81,12 @@ public class ChannelLWJGLOpenAL extends Channel { public float millisPreviouslyPlayed = 0; /** - * Constructor: takes channelType identifier and a handle to the OpenAL - * IntBuffer identifier to use for this channel. Possible values for channel - * type can be found in the - * {@link paulscode.sound.SoundSystemConfig SoundSystemConfig} class. + * Constructor: takes channelType identifier and a handle to the OpenAL IntBuffer identifier to use for this + * channel. Possible values for channel type can be found in the {@link paulscode.sound.SoundSystemConfig + * SoundSystemConfig} class. + * * @param type Type of channel (normal or streaming). - * @param src Handle to the OpenAL source identifier. + * @param src Handle to the OpenAL source identifier. */ public ChannelLWJGLOpenAL(int type, IntBuffer src) { super(type); @@ -122,8 +95,8 @@ public class ChannelLWJGLOpenAL extends Channel { } /** - * Empties the streamBuffers list, stops and deletes the ALSource, shuts the - * channel down, and removes references to all instantiated objects. + * Empties the streamBuffers list, stops and deletes the ALSource, shuts the channel down, and removes references to + * all instantiated objects. */ @Override public void cleanup() { @@ -132,14 +105,12 @@ public class ChannelLWJGLOpenAL extends Channel { // Stop playing the source: AL10.alSourceStop(ALSource.get(0)); checkALError(); - } catch (Exception e) { - } + } catch (Exception e) {} try { // Delete the source: AL10.alDeleteSources(ALSource.get(0)); checkALError(); - } catch (Exception e) { - } + } catch (Exception e) {} ALSource.clear(); } ALSource = null; @@ -148,8 +119,8 @@ public class ChannelLWJGLOpenAL extends Channel { } /** - * Attaches an OpenAL sound-buffer identifier for the sound data to be played - * back for a normal source. + * Attaches an OpenAL sound-buffer identifier for the sound data to be played back for a normal source. + * * @param buf Intbuffer identifier for the sound data to play. * @return False if an error occurred. */ @@ -157,22 +128,24 @@ public class ChannelLWJGLOpenAL extends Channel { // A sound buffer can only be attached to a normal source: if (errorCheck( channelType != SoundSystemConfig.TYPE_NORMAL, - "Sound buffers may only be attached to normal " + "sources.")) return false; + "Sound buffers may only be attached to normal " + "sources.")) + return false; // send the sound buffer to the channel: AL10.alSourcei(ALSource.get(0), AL10.AL_BUFFER, buf.get(0)); // save the format for later, for determining milliseconds played - if (attachedSource != null - && attachedSource.soundBuffer != null + if (attachedSource != null && attachedSource.soundBuffer != null && attachedSource.soundBuffer.audioFormat != null) setAudioFormat(attachedSource.soundBuffer.audioFormat); // Check for errors and return: return checkALError(); } + /** * Sets the channel up to receive the specified audio format. + * * @param audioFormat Format to use when playing the stream data. */ @Override @@ -203,11 +176,12 @@ public class ChannelLWJGLOpenAL extends Channel { ALformat = soundFormat; sampleRate = (int) audioFormat.getSampleRate(); } + /** - * Sets the channel up to receive the specified OpenAL audio format and sample - * rate. + * Sets the channel up to receive the specified OpenAL audio format and sample rate. + * * @param format Format to use. - * @param rate Sample rate (speed) to use. + * @param rate Sample rate (speed) to use. */ public void setFormat(int format, int rate) { ALformat = format; @@ -216,6 +190,7 @@ public class ChannelLWJGLOpenAL extends Channel { /** * Queues up the initial byte[] buffers of data to be streamed. + * * @param bufferList List of the first buffers to be played for a streaming source. * @return False if problem occurred or if end of stream was reached. */ @@ -223,7 +198,8 @@ public class ChannelLWJGLOpenAL extends Channel { public boolean preLoadBuffers(LinkedList bufferList) { // Stream buffers can only be queued for streaming sources: if (errorCheck( - channelType != SoundSystemConfig.TYPE_STREAMING, "Buffers may only be queued for streaming sources.")) + channelType != SoundSystemConfig.TYPE_STREAMING, + "Buffers may only be queued for streaming sources.")) return false; if (errorCheck(bufferList == null, "Buffer List null in method 'preLoadBuffers'")) return false; @@ -260,9 +236,8 @@ public class ChannelLWJGLOpenAL extends Channel { ByteBuffer byteBuffer = null; for (int i = 0; i < bufferList.size(); i++) { // byteBuffer = ByteBuffer.wrap( bufferList.get(i), 0, - // bufferList.get(i).length ); - byteBuffer = (ByteBuffer) BufferUtils.createByteBuffer(bufferList.get(i).length) - .put(bufferList.get(i)) + // bufferList.get(i).length ); + byteBuffer = (ByteBuffer) BufferUtils.createByteBuffer(bufferList.get(i).length).put(bufferList.get(i)) .flip(); try { @@ -293,6 +268,7 @@ public class ChannelLWJGLOpenAL extends Channel { /** * Queues up a byte[] buffer of data to be streamed. + * * @param buffer The next buffer to be played for a streaming source. * @return False if an error occurred or if the channel is shutting down. */ @@ -300,12 +276,12 @@ public class ChannelLWJGLOpenAL extends Channel { public boolean queueBuffer(byte[] buffer) { // Stream buffers can only be queued for streaming sources: if (errorCheck( - channelType != SoundSystemConfig.TYPE_STREAMING, "Buffers may only be queued for streaming sources.")) + channelType != SoundSystemConfig.TYPE_STREAMING, + "Buffers may only be queued for streaming sources.")) return false; // ByteBuffer byteBuffer = ByteBuffer.wrap( buffer, 0, buffer.length ); - ByteBuffer byteBuffer = (ByteBuffer) - BufferUtils.createByteBuffer(buffer.length).put(buffer).flip(); + ByteBuffer byteBuffer = (ByteBuffer) BufferUtils.createByteBuffer(buffer.length).put(buffer).flip(); IntBuffer intBuffer = BufferUtils.createIntBuffer(1); @@ -326,6 +302,7 @@ public class ChannelLWJGLOpenAL extends Channel { /** * Feeds raw data to the stream. + * * @param buffer Buffer containing raw audio data to stream. * @return Number of prior buffers that have been processed., or -1 if error. */ @@ -334,11 +311,11 @@ public class ChannelLWJGLOpenAL extends Channel { // Stream buffers can only be queued for streaming sources: if (errorCheck( channelType != SoundSystemConfig.TYPE_STREAMING, - "Raw audio data can only be fed to streaming sources.")) return -1; + "Raw audio data can only be fed to streaming sources.")) + return -1; // ByteBuffer byteBuffer = ByteBuffer.wrap( buffer, 0, buffer.length ); - ByteBuffer byteBuffer = (ByteBuffer) - BufferUtils.createByteBuffer(buffer.length).put(buffer).flip(); + ByteBuffer byteBuffer = (ByteBuffer) BufferUtils.createByteBuffer(buffer.length).put(buffer).flip(); IntBuffer intBuffer; @@ -385,18 +362,19 @@ public class ChannelLWJGLOpenAL extends Channel { /** * Returns the number of milliseconds of audio contained in specified buffer. + * * @return milliseconds, or 0 if unable to calculate. */ public float millisInBuffer(int alBufferi) { return (((float) AL10.alGetBufferi(alBufferi, AL10.AL_SIZE) - / (float) AL10.alGetBufferi(alBufferi, AL10.AL_CHANNELS) - / ((float) AL10.alGetBufferi(alBufferi, AL10.AL_BITS) / 8.0f) - / (float) sampleRate) - * 1000); + / (float) AL10.alGetBufferi(alBufferi, AL10.AL_CHANNELS) + / ((float) AL10.alGetBufferi(alBufferi, AL10.AL_BITS) / 8.0f) + / (float) sampleRate) * 1000); } /** * Calculates the number of milliseconds since the channel began playing. + * * @return Milliseconds, or -1 if unable to calculate. */ @Override @@ -410,8 +388,7 @@ public class ChannelLWJGLOpenAL extends Channel { case AL10.AL_FORMAT_MONO16 -> bytesPerFrame = 2f; case AL10.AL_FORMAT_STEREO8 -> bytesPerFrame = 2f; case AL10.AL_FORMAT_STEREO16 -> bytesPerFrame = 4f; - default -> { - } + default -> {} } offset = (((float) offset / bytesPerFrame) / (float) sampleRate) * 1000; @@ -425,6 +402,7 @@ public class ChannelLWJGLOpenAL extends Channel { /** * Returns the number of queued byte[] buffers that have finished playing. + * * @return Number of buffers processed. */ @Override @@ -477,15 +455,14 @@ public class ChannelLWJGLOpenAL extends Channel { try { AL10.alSourceStop(ALSource.get(0)); checkALError(); - } catch (Exception e) { - } + } catch (Exception e) {} if (channelType == SoundSystemConfig.TYPE_STREAMING) flush(); } /** - * Plays the currently attached normal source, opens this channel up for - * streaming, or resumes playback if this channel was paused. + * Plays the currently attached normal source, opens this channel up for streaming, or resumes playback if this + * channel was paused. */ @Override public void play() { @@ -503,8 +480,7 @@ public class ChannelLWJGLOpenAL extends Channel { } /** - * Stops playback for this channel and rewinds the attached source to the - * beginning. + * Stops playback for this channel and rewinds the attached source to the beginning. */ @Override public void stop() { @@ -513,8 +489,7 @@ public class ChannelLWJGLOpenAL extends Channel { } /** - * Rewinds the attached source to the beginning. Stops the source if it was - * paused. + * Rewinds the attached source to the beginning. Stops the source if it was paused. */ @Override public void rewind() { @@ -526,9 +501,9 @@ public class ChannelLWJGLOpenAL extends Channel { } /** - * Used to determine if a channel is actively playing a source. This method - * will return false if the channel is paused or stopped and when no data is - * queued to be streamed. + * Used to determine if a channel is actively playing a source. This method will return false if the channel is + * paused or stopped and when no data is queued to be streamed. + * * @return True if this channel is playing a source. */ @Override @@ -541,6 +516,7 @@ public class ChannelLWJGLOpenAL extends Channel { /** * Checks for OpenAL errors, and prints a message if there is an error. + * * @return True if there was an error, False if not. */ private boolean checkALError() { diff --git a/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/LibraryLWJGLOpenAL.java b/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/LibraryLWJGLOpenAL.java index 1d6d202..f3a68f8 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/LibraryLWJGLOpenAL.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/LibraryLWJGLOpenAL.java @@ -7,10 +7,13 @@ import java.nio.IntBuffer; import java.util.HashMap; import java.util.Iterator; import java.util.Set; + import javax.sound.sampled.AudioFormat; + import org.lwjgl.BufferUtils; import org.lwjgl.openal.AL10; import org.lwjglx.LWJGLException; + import paulscode.sound.Channel; import paulscode.sound.FilenameURL; import paulscode.sound.ICodec; @@ -22,83 +25,53 @@ import paulscode.sound.SoundSystemException; import paulscode.sound.Source; /** - * The LibraryLWJGLOpenAL class interfaces the lwjgl binding of OpenAL. - *

- * This software is based on or using the LWJGL Lightweight Java Gaming - * Library available from - * http://www.lwjgl.org/. - *


- * LWJGL License: - *
- * Copyright (c) 2002-2008 Lightweight Java Game Library Project - * All rights reserved. - *
- * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * The LibraryLWJGLOpenAL class interfaces the lwjgl binding of OpenAL.
*
- * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - *
- * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - *
- * * Neither the name of 'Light Weight Java Game Library' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * This software is based on or using the LWJGL Lightweight Java Gaming Library available from http://www.lwjgl.org/. + *

*
- * 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. - *


- * SoundSystem LibraryLWJGLOpenAL License:

- * - * You are free to use this library for any purpose, commercial or otherwise. - * You may modify this library or source code, and distribute it any way you - * like, provided the following conditions are met: - *
- * 1) You must abide by the conditions of the aforementioned LWJGL License. - *
- * 2) You may not falsely claim to be the author of this library or any - * unmodified portion of it. - *
- * 3) You may not copyright this library or a modified version of it and then - * sue me for copyright infringement. - *
- * 4) If you modify the source code, you must clearly document the changes - * made before redistributing the modified source code, so other users know - * it is not the original code. - *
- * 5) You are not required to give me credit for this library in any derived - * work, but if you do, you must also mention my website: - * http://www.paulscode.com - *
- * 6) I the author will not be responsible for any damages (physical, - * financial, or otherwise) caused by the use if this library or any part - * of it. - *
- * 7) I the author do not guarantee, warrant, or make any representations, - * either expressed or implied, regarding the use of this library or any - * part of it. - *

- * Author: Paul Lamb + * LWJGL License:
+ * Copyright (c) 2002-2008 Lightweight Java Game Library Project All rights reserved.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the + * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following + * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the name of 'Light Weight Java Game Library' nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * http://www.paulscode.com - *
+ *
+ *
SoundSystem LibraryLWJGLOpenAL License:
+ *
+ * You are free to use this library for any purpose, commercial or otherwise. You may modify this library or source + * code, and distribute it any way you like, provided the following conditions are met:
+ * 1) You must abide by the conditions of the aforementioned LWJGL License.
+ * 2) You may not falsely claim to be the author of this library or any unmodified portion of it.
+ * 3) You may not copyright this library or a modified version of it and then sue me for copyright infringement.
+ * 4) If you modify the source code, you must clearly document the changes made before redistributing the modified + * source code, so other users know it is not the original code.
+ * 5) You are not required to give me credit for this library in any derived work, but if you do, you must also mention + * my website: http://www.paulscode.com
+ * 6) I the author will not be responsible for any damages (physical, financial, or otherwise) caused by the use if this + * library or any part of it.
+ * 7) I the author do not guarantee, warrant, or make any representations, either expressed or implied, regarding the + * use of this library or any part of it.
+ *
+ * Author: Paul Lamb
+ * http://www.paulscode.com
*/ public class LibraryLWJGLOpenAL extends Library { + /** - * Used to return a current value from one of the synchronized - * boolean-interface methods. + * Used to return a current value from one of the synchronized boolean-interface methods. */ private static final boolean GET = false; /** @@ -106,8 +79,7 @@ public class LibraryLWJGLOpenAL extends Library { */ private static final boolean SET = true; /** - * Used when a parameter for one of the synchronized boolean-interface methods - * is not aplicable. + * Used when a parameter for one of the synchronized boolean-interface methods is not aplicable. */ private static final boolean XXX = false; @@ -134,8 +106,7 @@ public class LibraryLWJGLOpenAL extends Library { private static boolean alPitchSupported = true; /** - * Constructor: Instantiates the source map, buffer map and listener - * information. Also sets the library type to + * Constructor: Instantiates the source map, buffer map and listener information. Also sets the library type to * SoundSystemConfig.LIBRARY_OPENAL */ public LibraryLWJGLOpenAL() throws SoundSystemException { @@ -168,11 +139,11 @@ public class LibraryLWJGLOpenAL extends Library { // Listener is at the origin, facing along the z axis, no velocity: listenerPositionAL = BufferUtils.createFloatBuffer(3) - .put(new float[] {listener.position.x, listener.position.y, listener.position.z}); - listenerOrientation = BufferUtils.createFloatBuffer(6).put(new float[] { - listener.lookAt.x, listener.lookAt.y, listener.lookAt.z, listener.up.x, listener.up.y, listener.up.z - }); - listenerVelocity = BufferUtils.createFloatBuffer(3).put(new float[] {0.0f, 0.0f, 0.0f}); + .put(new float[] { listener.position.x, listener.position.y, listener.position.z }); + listenerOrientation = BufferUtils.createFloatBuffer(6).put( + new float[] { listener.lookAt.x, listener.lookAt.y, listener.lookAt.z, listener.up.x, listener.up.y, + listener.up.z }); + listenerVelocity = BufferUtils.createFloatBuffer(3).put(new float[] { 0.0f, 0.0f, 0.0f }); // Flip the buffers, so they can be used: listenerPositionAL.flip(); @@ -213,19 +184,22 @@ public class LibraryLWJGLOpenAL extends Library { if (checkALError()) { alPitchSupported(SET, false); throw new LibraryLWJGLOpenAL.Exception( - "OpenAL: AL_PITCH not " + "supported.", LibraryLWJGLOpenAL.Exception.NO_AL_PITCH); + "OpenAL: AL_PITCH not " + "supported.", + LibraryLWJGLOpenAL.Exception.NO_AL_PITCH); } else { alPitchSupported(SET, true); } } catch (java.lang.Exception e) { alPitchSupported(SET, false); throw new LibraryLWJGLOpenAL.Exception( - "OpenAL: AL_PITCH not " + "supported.", LibraryLWJGLOpenAL.Exception.NO_AL_PITCH); + "OpenAL: AL_PITCH not " + "supported.", + LibraryLWJGLOpenAL.Exception.NO_AL_PITCH); } } /** * Checks if the OpenAL library type is compatible. + * * @return True or false. */ public static boolean libraryCompatible() { @@ -233,9 +207,9 @@ public class LibraryLWJGLOpenAL extends Library { } /** - * Creates a new channel of the specified type (normal or streaming). Possible - * values for channel type can be found in the - * {@link paulscode.sound.SoundSystemConfig SoundSystemConfig} class. + * Creates a new channel of the specified type (normal or streaming). Possible values for channel type can be found + * in the {@link paulscode.sound.SoundSystemConfig SoundSystemConfig} class. + * * @param type Type of channel. */ @Override @@ -258,8 +232,7 @@ public class LibraryLWJGLOpenAL extends Library { } /** - * Stops all sources, shuts down OpenAL, and removes references to all - * instantiated objects. + * Stops all sources, shuts down OpenAL, and removes references to all instantiated objects. */ @Override public void cleanup() { @@ -292,6 +265,7 @@ public class LibraryLWJGLOpenAL extends Library { /** * Pre-loads a sound into memory. + * * @param filenameURL Filename/URL of the sound file to load. * @return True if the sound loaded properly. */ @@ -316,7 +290,8 @@ public class LibraryLWJGLOpenAL extends Library { ICodec codec = SoundSystemConfig.getCodec(filenameURL.getFilename()); if (errorCheck( - codec == null, "No codec found for file '" + filenameURL.getFilename() + "' in method 'loadSound'")) + codec == null, + "No codec found for file '" + filenameURL.getFilename() + "' in method 'loadSound'")) return false; codec.reverseByteOrder(true); @@ -360,22 +335,22 @@ public class LibraryLWJGLOpenAL extends Library { IntBuffer intBuffer = BufferUtils.createIntBuffer(1); AL10.alGenBuffers(intBuffer); if (errorCheck( - AL10.alGetError() != AL10.AL_NO_ERROR, "alGenBuffers error when loading " + filenameURL.getFilename())) + AL10.alGetError() != AL10.AL_NO_ERROR, + "alGenBuffers error when loading " + filenameURL.getFilename())) return false; - // AL10.alBufferData( intBuffer.get( 0 ), soundFormat, - // ByteBuffer.wrap( buffer.audioData ), - // (int) audioFormat.getSampleRate() ); + // AL10.alBufferData( intBuffer.get( 0 ), soundFormat, + // ByteBuffer.wrap( buffer.audioData ), + // (int) audioFormat.getSampleRate() ); AL10.alBufferData( intBuffer.get(0), soundFormat, - (ByteBuffer) BufferUtils.createByteBuffer(buffer.audioData.length) - .put(buffer.audioData) - .flip(), + (ByteBuffer) BufferUtils.createByteBuffer(buffer.audioData.length).put(buffer.audioData).flip(), (int) audioFormat.getSampleRate()); if (errorCheck( - AL10.alGetError() != AL10.AL_NO_ERROR, "alBufferData error when loading " + filenameURL.getFilename())) + AL10.alGetError() != AL10.AL_NO_ERROR, + "alBufferData error when loading " + filenameURL.getFilename())) if (errorCheck(intBuffer == null, "Sound buffer was not created for " + filenameURL.getFilename())) return false; @@ -385,10 +360,10 @@ public class LibraryLWJGLOpenAL extends Library { } /** - * Saves the specified sample data, under the specified identifier. This - * identifier can be later used in place of 'filename' parameters to reference - * the sample data. - * @param buffer the sample data and audio format to save. + * Saves the specified sample data, under the specified identifier. This identifier can be later used in place of + * 'filename' parameters to reference the sample data. + * + * @param buffer the sample data and audio format to save. * @param identifier What to call the sample. * @return True if there weren't any problems. */ @@ -445,15 +420,13 @@ public class LibraryLWJGLOpenAL extends Library { if (errorCheck(AL10.alGetError() != AL10.AL_NO_ERROR, "alGenBuffers error when saving " + identifier)) return false; - // AL10.alBufferData( intBuffer.get( 0 ), soundFormat, - // ByteBuffer.wrap( buffer.audioData ), - // (int) audioFormat.getSampleRate() ); + // AL10.alBufferData( intBuffer.get( 0 ), soundFormat, + // ByteBuffer.wrap( buffer.audioData ), + // (int) audioFormat.getSampleRate() ); AL10.alBufferData( intBuffer.get(0), soundFormat, - (ByteBuffer) BufferUtils.createByteBuffer(buffer.audioData.length) - .put(buffer.audioData) - .flip(), + (ByteBuffer) BufferUtils.createByteBuffer(buffer.audioData.length).put(buffer.audioData).flip(), (int) audioFormat.getSampleRate()); if (errorCheck(AL10.alGetError() != AL10.AL_NO_ERROR, "alBufferData error when saving " + identifier)) @@ -465,10 +438,10 @@ public class LibraryLWJGLOpenAL extends Library { } /** - * Removes a pre-loaded sound from memory. This is a good method to use for - * freeing up memory after a large sound file is no longer needed. NOTE: the - * source will remain in memory after this method has been called, for as long + * Removes a pre-loaded sound from memory. This is a good method to use for freeing up memory after a large sound + * file is no longer needed. NOTE: the source will remain in memory after this method has been called, for as long * as the sound is attached to an existing source. + * * @param filename Filename/identifier of the sound file to unload. */ @Override @@ -479,6 +452,7 @@ public class LibraryLWJGLOpenAL extends Library { /** * Sets the overall volume to the specified value, affecting all sources. + * * @param value New volume, float value ( 0.0f - 1.0f ). */ @Override @@ -491,29 +465,21 @@ public class LibraryLWJGLOpenAL extends Library { /** * Creates a new source and places it into the source map. - * @param priority Setting this to true will prevent other sounds from overriding this one. - * @param toStream Setting this to true will load the sound in pieces rather than all at once. - * @param toLoop Should this source loop, or play only once. - * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. + * + * @param priority Setting this to true will prevent other sounds from overriding this one. + * @param toStream Setting this to true will load the sound in pieces rather than all at once. + * @param toLoop Should this source loop, or play only once. + * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. * @param filenameURL Filename/URL of the sound file to play at this source. - * @param x X position for this source. - * @param y Y position for this source. - * @param z Z position for this source. - * @param attModel Attenuation model to use. - * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of "attmodel". + * @param x X position for this source. + * @param y Y position for this source. + * @param z Z position for this source. + * @param attModel Attenuation model to use. + * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of "attmodel". */ @Override - public void newSource( - boolean priority, - boolean toStream, - boolean toLoop, - String sourcename, - FilenameURL filenameURL, - float x, - float y, - float z, - int attModel, - float distOrRoll) { + public void newSource(boolean priority, boolean toStream, boolean toLoop, String sourcename, + FilenameURL filenameURL, float x, float y, float z, int attModel, float distOrRoll) { IntBuffer myBuffer = null; if (!toStream) { // Grab the sound buffer for this file: @@ -522,9 +488,11 @@ public class LibraryLWJGLOpenAL extends Library { // if not found, try loading it: if (myBuffer == null) { if (!loadSound(filenameURL)) { - errorMessage("Source '" + sourcename + "' was not created " - + "because an error occurred while loading " - + filenameURL.getFilename()); + errorMessage( + "Source '" + sourcename + + "' was not created " + + "because an error occurred while loading " + + filenameURL.getFilename()); return; } } @@ -533,9 +501,11 @@ public class LibraryLWJGLOpenAL extends Library { myBuffer = ALBufferMap.get(filenameURL.getFilename()); // see if it was there this time: if (myBuffer == null) { - errorMessage("Source '" + sourcename + "' was not created " - + "because a sound buffer was not found for " - + filenameURL.getFilename()); + errorMessage( + "Source '" + sourcename + + "' was not created " + + "because a sound buffer was not found for " + + filenameURL.getFilename()); return; } } @@ -547,9 +517,11 @@ public class LibraryLWJGLOpenAL extends Library { // if not found, try loading it: if (buffer == null) { if (!loadSound(filenameURL)) { - errorMessage("Source '" + sourcename + "' was not created " - + "because an error occurred while loading " - + filenameURL.getFilename()); + errorMessage( + "Source '" + sourcename + + "' was not created " + + "because an error occurred while loading " + + filenameURL.getFilename()); return; } } @@ -557,9 +529,11 @@ public class LibraryLWJGLOpenAL extends Library { buffer = bufferMap.get(filenameURL.getFilename()); // see if it was there this time: if (buffer == null) { - errorMessage("Source '" + sourcename + "' was not created " - + "because audio data was not found for " - + filenameURL.getFilename()); + errorMessage( + "Source '" + sourcename + + "' was not created " + + "because audio data was not found for " + + filenameURL.getFilename()); return; } } @@ -585,58 +559,51 @@ public class LibraryLWJGLOpenAL extends Library { /** * Opens a direct line for streaming audio data. + * * @param audioFormat Format that the data will be in. - * @param priority Setting this to true will prevent other sounds from overriding this one. - * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. - * @param x X position for this source. - * @param y Y position for this source. - * @param z Z position for this source. - * @param attModel Attenuation model to use. - * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of "attmodel". + * @param priority Setting this to true will prevent other sounds from overriding this one. + * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. + * @param x X position for this source. + * @param y Y position for this source. + * @param z Z position for this source. + * @param attModel Attenuation model to use. + * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of "attmodel". */ @Override - public void rawDataStream( - AudioFormat audioFormat, - boolean priority, - String sourcename, - float x, - float y, - float z, - int attModel, - float distOrRoll) { + public void rawDataStream(AudioFormat audioFormat, boolean priority, String sourcename, float x, float y, float z, + int attModel, float distOrRoll) { sourceMap.put( sourcename, new SourceLWJGLOpenAL( - listenerPositionAL, audioFormat, priority, sourcename, x, y, z, attModel, distOrRoll)); + listenerPositionAL, + audioFormat, + priority, + sourcename, + x, + y, + z, + attModel, + distOrRoll)); } /** * Creates and immediately plays a new source. - * @param priority Setting this to true will prevent other sounds from overriding this one. - * @param toStream Setting this to true will load the sound in pieces rather than all at once. - * @param toLoop Should this source loop, or play only once. - * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. + * + * @param priority Setting this to true will prevent other sounds from overriding this one. + * @param toStream Setting this to true will load the sound in pieces rather than all at once. + * @param toLoop Should this source loop, or play only once. + * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. * @param filenameURL Filename/URL of the sound file to play at this source. - * @param x X position for this source. - * @param y Y position for this source. - * @param z Z position for this source. - * @param attModel Attenuation model to use. - * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of "attmodel". - * @param temporary Whether or not this source should be removed after it finishes playing. + * @param x X position for this source. + * @param y Y position for this source. + * @param z Z position for this source. + * @param attModel Attenuation model to use. + * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of "attmodel". + * @param temporary Whether or not this source should be removed after it finishes playing. */ @Override - public void quickPlay( - boolean priority, - boolean toStream, - boolean toLoop, - String sourcename, - FilenameURL filenameURL, - float x, - float y, - float z, - int attModel, - float distOrRoll, - boolean temporary) { + public void quickPlay(boolean priority, boolean toStream, boolean toLoop, String sourcename, + FilenameURL filenameURL, float x, float y, float z, int attModel, float distOrRoll, boolean temporary) { IntBuffer myBuffer = null; if (!toStream) { // Grab the sound buffer for this file: @@ -660,9 +627,11 @@ public class LibraryLWJGLOpenAL extends Library { // if not found, try loading it: if (buffer == null) { if (!loadSound(filenameURL)) { - errorMessage("Source '" + sourcename + "' was not created " - + "because an error occurred while loading " - + filenameURL.getFilename()); + errorMessage( + "Source '" + sourcename + + "' was not created " + + "because an error occurred while loading " + + filenameURL.getFilename()); return; } } @@ -670,9 +639,11 @@ public class LibraryLWJGLOpenAL extends Library { buffer = bufferMap.get(filenameURL.getFilename()); // see if it was there this time: if (buffer == null) { - errorMessage("Source '" + sourcename + "' was not created " - + "because audio data was not found for " - + filenameURL.getFilename()); + errorMessage( + "Source '" + sourcename + + "' was not created " + + "because audio data was not found for " + + filenameURL.getFilename()); return; } } @@ -699,6 +670,7 @@ public class LibraryLWJGLOpenAL extends Library { /** * Creates sources based on the source map provided. + * * @param srcMap Sources to copy. */ @Override @@ -734,20 +706,20 @@ public class LibraryLWJGLOpenAL extends Library { loadSound(source.filenameURL); buffer = bufferMap.get(source.filenameURL.getFilename()); } - if (source.toStream || buffer != null) - sourceMap.put( - sourcename, - new SourceLWJGLOpenAL( - listenerPositionAL, - ALBufferMap.get(source.filenameURL.getFilename()), - source, - buffer)); + if (source.toStream || buffer != null) sourceMap.put( + sourcename, + new SourceLWJGLOpenAL( + listenerPositionAL, + ALBufferMap.get(source.filenameURL.getFilename()), + source, + buffer)); } } } /** * Changes the listener's position. + * * @param x Destination X coordinate. * @param y Destination Y coordinate. * @param z Destination Z coordinate. @@ -767,8 +739,8 @@ public class LibraryLWJGLOpenAL extends Library { } /** - * Changes the listeners orientation to the specified 'angle' radians - * counterclockwise around the y-Axis. + * Changes the listeners orientation to the specified 'angle' radians counterclockwise around the y-Axis. + * * @param angle Radians. */ @Override @@ -786,12 +758,13 @@ public class LibraryLWJGLOpenAL extends Library { /** * Changes the listeners orientation using the specified coordinates. + * * @param lookX X element of the look-at direction. * @param lookY Y element of the look-at direction. * @param lookZ Z element of the look-at direction. - * @param upX X element of the up direction. - * @param upY Y element of the up direction. - * @param upZ Z element of the up direction. + * @param upX X element of the up direction. + * @param upY Y element of the up direction. + * @param upZ Z element of the up direction. */ @Override public void setListenerOrientation(float lookX, float lookY, float lookZ, float upX, float upY, float upZ) { @@ -807,8 +780,8 @@ public class LibraryLWJGLOpenAL extends Library { } /** - * Changes the listeners position and orientation using the specified listener - * data. + * Changes the listeners position and orientation using the specified listener data. + * * @param l Listener data to use. */ @Override @@ -839,6 +812,7 @@ public class LibraryLWJGLOpenAL extends Library { /** * Sets the listener's velocity, for use in Doppler effect. + * * @param x Velocity along world x-axis. * @param y Velocity along world y-axis. * @param z Velocity along world z-axis. @@ -868,6 +842,7 @@ public class LibraryLWJGLOpenAL extends Library { /** * Checks for OpenAL errors, and prints a message if there is an error. + * * @return True if there was an error, False if not. */ private boolean checkALError() { @@ -904,15 +879,18 @@ public class LibraryLWJGLOpenAL extends Library { /** * Whether or not the AL_PITCH control is supported. + * * @return True if AL_PITCH is supported. */ public static boolean alPitchSupported() { return alPitchSupported(GET, XXX); } + /** * Sets or returns the value of boolean 'alPitchSupported'. + * * @param action Action to perform (GET or SET). - * @param value New value if action is SET, otherwise XXX. + * @param value New value if action is SET, otherwise XXX. * @return value of boolean 'alPitchSupported'. */ private static synchronized boolean alPitchSupported(boolean action, boolean value) { @@ -922,6 +900,7 @@ public class LibraryLWJGLOpenAL extends Library { /** * Returns the short title of this library type. + * * @return A short title. */ public static String getTitle() { @@ -930,6 +909,7 @@ public class LibraryLWJGLOpenAL extends Library { /** * Returns a longer description of this library type. + * * @return A longer description. */ public static String getDescription() { @@ -938,6 +918,7 @@ public class LibraryLWJGLOpenAL extends Library { /** * Returns the name of the class. + * * @return "Library" + library title. */ @Override @@ -946,14 +927,13 @@ public class LibraryLWJGLOpenAL extends Library { } /** - * The LibraryLWJGLOpenAL.Exception class provides library-specific error - * information. + * The LibraryLWJGLOpenAL.Exception class provides library-specific error information. */ public static class Exception extends SoundSystemException { + private static final long serialVersionUID = -7502452059037798035L; /** - * Global identifier for an exception during AL.create(). Probably - * means that OpenAL is not supported. + * Global identifier for an exception during AL.create(). Probably means that OpenAL is not supported. */ public static final int CREATE = 101; /** @@ -986,8 +966,8 @@ public class LibraryLWJGLOpenAL extends Library { public static final int NO_AL_PITCH = 108; /** - * Constructor: Generates a standard "unknown error" exception with the - * specified message. + * Constructor: Generates a standard "unknown error" exception with the specified message. + * * @param message A brief description of the problem that occurred. */ public Exception(String message) { @@ -995,10 +975,10 @@ public class LibraryLWJGLOpenAL extends Library { } /** - * Constructor: Generates an exception of the specified type, with the - * specified message. + * Constructor: Generates an exception of the specified type, with the specified message. + * * @param message A brief description of the problem that occurred. - * @param type Identifier indicating they type of error. + * @param type Identifier indicating they type of error. */ public Exception(String message, int type) { super(message, type); diff --git a/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/SourceLWJGLOpenAL.java b/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/SourceLWJGLOpenAL.java index 4bdd617..eec88a4 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/SourceLWJGLOpenAL.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/paulscode/sound/libraries/SourceLWJGLOpenAL.java @@ -3,9 +3,12 @@ package me.eigenraven.lwjgl3ify.paulscode.sound.libraries; import java.nio.FloatBuffer; import java.nio.IntBuffer; import java.util.LinkedList; + import javax.sound.sampled.AudioFormat; + import org.lwjgl.BufferUtils; import org.lwjgl.openal.AL10; + import paulscode.sound.Channel; import paulscode.sound.FilenameURL; import paulscode.sound.SoundBuffer; @@ -13,88 +16,58 @@ import paulscode.sound.SoundSystemConfig; import paulscode.sound.Source; /** - * The SourceLWJGLOpenAL class provides an interface to the lwjgl binding of OpenAL. - *

- * This software is based on or using the LWJGL Lightweight Java Gaming - * Library available from - * http://www.lwjgl.org/. - *


- * LWJGL License: - *
- * Copyright (c) 2002-2008 Lightweight Java Game Library Project - * All rights reserved. - *
- * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: + * The SourceLWJGLOpenAL class provides an interface to the lwjgl binding of OpenAL.
*
- * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - *
- * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - *
- * * Neither the name of 'Light Weight Java Game Library' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. + * This software is based on or using the LWJGL Lightweight Java Gaming Library available from http://www.lwjgl.org/. + *

*
- * 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. - *


- * SoundSystem LibraryLWJGLOpenAL License:

- * - * You are free to use this library for any purpose, commercial or otherwise. - * You may modify this library or source code, and distribute it any way you - * like, provided the following conditions are met: - *
- * 1) You must abide by the conditions of the aforementioned LWJGL License. - *
- * 2) You may not falsely claim to be the author of this library or any - * unmodified portion of it. - *
- * 3) You may not copyright this library or a modified version of it and then - * sue me for copyright infringement. - *
- * 4) If you modify the source code, you must clearly document the changes - * made before redistributing the modified source code, so other users know - * it is not the original code. - *
- * 5) You are not required to give me credit for this library in any derived - * work, but if you do, you must also mention my website: - * http://www.paulscode.com - *
- * 6) I the author will not be responsible for any damages (physical, - * financial, or otherwise) caused by the use if this library or any part - * of it. - *
- * 7) I the author do not guarantee, warrant, or make any representations, - * either expressed or implied, regarding the use of this library or any - * part of it. - *

- * Author: Paul Lamb + * LWJGL License:
+ * Copyright (c) 2002-2008 Lightweight Java Game Library Project All rights reserved.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the + * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following + * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the name of 'Light Weight Java Game Library' nor the names of its contributors may be used to endorse or + * promote products derived from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * http://www.paulscode.com - *
+ *
+ *
SoundSystem LibraryLWJGLOpenAL License:
+ *
+ * You are free to use this library for any purpose, commercial or otherwise. You may modify this library or source + * code, and distribute it any way you like, provided the following conditions are met:
+ * 1) You must abide by the conditions of the aforementioned LWJGL License.
+ * 2) You may not falsely claim to be the author of this library or any unmodified portion of it.
+ * 3) You may not copyright this library or a modified version of it and then sue me for copyright infringement.
+ * 4) If you modify the source code, you must clearly document the changes made before redistributing the modified + * source code, so other users know it is not the original code.
+ * 5) You are not required to give me credit for this library in any derived work, but if you do, you must also mention + * my website: http://www.paulscode.com
+ * 6) I the author will not be responsible for any damages (physical, financial, or otherwise) caused by the use if this + * library or any part of it.
+ * 7) I the author do not guarantee, warrant, or make any representations, either expressed or implied, regarding the + * use of this library or any part of it.
+ *
+ * Author: Paul Lamb
+ * http://www.paulscode.com
*/ public class SourceLWJGLOpenAL extends Source { + /** * The source's basic Channel type-cast to a ChannelLWJGLOpenAL. */ private ChannelLWJGLOpenAL channelOpenAL = (ChannelLWJGLOpenAL) channel; /** - * OpenAL IntBuffer sound-buffer identifier for this source if it is a normal - * source. + * OpenAL IntBuffer sound-buffer identifier for this source if it is a normal source. */ private IntBuffer myBuffer; @@ -114,37 +87,26 @@ public class SourceLWJGLOpenAL extends Source { private FloatBuffer sourceVelocity; /** - * Constructor: Creates a new source using the specified parameters. + * Constructor: Creates a new source using the specified parameters. + * * @param listenerPosition FloatBuffer containing the listener's 3D coordinates. - * @param myBuffer OpenAL IntBuffer sound-buffer identifier to use for a new normal source. - * @param priority Setting this to true will prevent other sounds from overriding this one. - * @param toStream Setting this to true will create a streaming source. - * @param toLoop Should this source loop, or play only once. - * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. - * @param filenameURL Filename/URL of the sound file to play at this source. - * @param soundBuffer Buffer containing audio data, or null if not loaded yet. - * @param x X position for this source. - * @param y Y position for this source. - * @param z Z position for this source. - * @param attModel Attenuation model to use. - * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of 'att'. - * @param temporary Whether or not to remove this source after it finishes playing. + * @param myBuffer OpenAL IntBuffer sound-buffer identifier to use for a new normal source. + * @param priority Setting this to true will prevent other sounds from overriding this one. + * @param toStream Setting this to true will create a streaming source. + * @param toLoop Should this source loop, or play only once. + * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. + * @param filenameURL Filename/URL of the sound file to play at this source. + * @param soundBuffer Buffer containing audio data, or null if not loaded yet. + * @param x X position for this source. + * @param y Y position for this source. + * @param z Z position for this source. + * @param attModel Attenuation model to use. + * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of 'att'. + * @param temporary Whether or not to remove this source after it finishes playing. */ - public SourceLWJGLOpenAL( - FloatBuffer listenerPosition, - IntBuffer myBuffer, - boolean priority, - boolean toStream, - boolean toLoop, - String sourcename, - FilenameURL filenameURL, - SoundBuffer soundBuffer, - float x, - float y, - float z, - int attModel, - float distOrRoll, - boolean temporary) { + public SourceLWJGLOpenAL(FloatBuffer listenerPosition, IntBuffer myBuffer, boolean priority, boolean toStream, + boolean toLoop, String sourcename, FilenameURL filenameURL, SoundBuffer soundBuffer, float x, float y, + float z, int attModel, float distOrRoll, boolean temporary) { super( priority, toStream, @@ -167,11 +129,12 @@ public class SourceLWJGLOpenAL extends Source { } /** - * Constructor: Creates a new source matching the specified source. + * Constructor: Creates a new source matching the specified source. + * * @param listenerPosition FloatBuffer containing the listener's 3D coordinates. - * @param myBuffer OpenAL IntBuffer sound-buffer identifier to use for a new normal source. - * @param old Source to copy information from. - * @param soundBuffer Buffer containing audio data, or null if not loaded yet. + * @param myBuffer OpenAL IntBuffer sound-buffer identifier to use for a new normal source. + * @param old Source to copy information from. + * @param soundBuffer Buffer containing audio data, or null if not loaded yet. */ public SourceLWJGLOpenAL(FloatBuffer listenerPosition, IntBuffer myBuffer, Source old, SoundBuffer soundBuffer) { super(old, soundBuffer); @@ -184,28 +147,20 @@ public class SourceLWJGLOpenAL extends Source { } /** - * Constructor: Creates a new streaming source that will be directly fed with - * raw audio data. + * Constructor: Creates a new streaming source that will be directly fed with raw audio data. + * * @param listenerPosition FloatBuffer containing the listener's 3D coordinates. - * @param audioFormat Format that the data will be in. - * @param priority Setting this to true will prevent other sounds from overriding this one. - * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. - * @param x X position for this source. - * @param y Y position for this source. - * @param z Z position for this source. - * @param attModel Attenuation model to use. - * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of 'att'. + * @param audioFormat Format that the data will be in. + * @param priority Setting this to true will prevent other sounds from overriding this one. + * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. + * @param x X position for this source. + * @param y Y position for this source. + * @param z Z position for this source. + * @param attModel Attenuation model to use. + * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of 'att'. */ - public SourceLWJGLOpenAL( - FloatBuffer listenerPosition, - AudioFormat audioFormat, - boolean priority, - String sourcename, - float x, - float y, - float z, - int attModel, - float distOrRoll) { + public SourceLWJGLOpenAL(FloatBuffer listenerPosition, AudioFormat audioFormat, boolean priority, String sourcename, + float x, float y, float z, int attModel, float distOrRoll) { super(audioFormat, priority, sourcename, x, y, z, attModel, distOrRoll); this.listenerPosition = listenerPosition; libraryType = LibraryLWJGLOpenAL.class; @@ -223,38 +178,26 @@ public class SourceLWJGLOpenAL extends Source { } /** - * Changes the peripheral information about the source using the specified - * parameters. + * Changes the peripheral information about the source using the specified parameters. + * * @param listenerPosition FloatBuffer containing the listener's 3D coordinates. - * @param myBuffer OpenAL IntBuffer sound-buffer identifier to use for a new normal source. - * @param priority Setting this to true will prevent other sounds from overriding this one. - * @param toStream Setting this to true will create a streaming source. - * @param toLoop Should this source loop, or play only once. - * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. - * @param filenameURL Filename/URL of the sound file to play at this source. - * @param soundBuffer Buffer containing audio data, or null if not loaded yet. - * @param x X position for this source. - * @param y Y position for this source. - * @param z Z position for this source. - * @param attModel Attenuation model to use. - * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of 'att'. - * @param temporary Whether or not to remove this source after it finishes playing. + * @param myBuffer OpenAL IntBuffer sound-buffer identifier to use for a new normal source. + * @param priority Setting this to true will prevent other sounds from overriding this one. + * @param toStream Setting this to true will create a streaming source. + * @param toLoop Should this source loop, or play only once. + * @param sourcename A unique identifier for this source. Two sources may not use the same sourcename. + * @param filenameURL Filename/URL of the sound file to play at this source. + * @param soundBuffer Buffer containing audio data, or null if not loaded yet. + * @param x X position for this source. + * @param y Y position for this source. + * @param z Z position for this source. + * @param attModel Attenuation model to use. + * @param distOrRoll Either the fading distance or rolloff factor, depending on the value of 'att'. + * @param temporary Whether or not to remove this source after it finishes playing. */ - public void changeSource( - FloatBuffer listenerPosition, - IntBuffer myBuffer, - boolean priority, - boolean toStream, - boolean toLoop, - String sourcename, - FilenameURL filenameURL, - SoundBuffer soundBuffer, - float x, - float y, - float z, - int attModel, - float distOrRoll, - boolean temporary) { + public void changeSource(FloatBuffer listenerPosition, IntBuffer myBuffer, boolean priority, boolean toStream, + boolean toLoop, String sourcename, FilenameURL filenameURL, SoundBuffer soundBuffer, float x, float y, + float z, int attModel, float distOrRoll, boolean temporary) { super.changeSource( priority, toStream, @@ -275,10 +218,10 @@ public class SourceLWJGLOpenAL extends Source { } /** - * Removes the next filename from the sound sequence queue and assigns it to - * this source. This method has no effect on non-streaming sources. This - * method is used internally by SoundSystem, and it is unlikely that the user - * will ever need to use it. + * Removes the next filename from the sound sequence queue and assigns it to this source. This method has no effect + * on non-streaming sources. This method is used internally by SoundSystem, and it is unlikely that the user will + * ever need to use it. + * * @return True if there was something in the queue. */ @Override @@ -347,6 +290,7 @@ public class SourceLWJGLOpenAL extends Source { /** * Moves the source to the specified position. + * * @param x X coordinate to move to. * @param y Y coordinate to move to. * @param z Z coordinate to move to. @@ -365,8 +309,7 @@ public class SourceLWJGLOpenAL extends Source { sourcePosition.put(2, z); // make sure we are assigned to a channel: - if (channel != null - && channel.attachedSource == this + if (channel != null && channel.attachedSource == this && channelOpenAL != null && channelOpenAL.ALSource != null) { // move the source: @@ -383,8 +326,7 @@ public class SourceLWJGLOpenAL extends Source { calculateDistance(); calculateGain(); - if (channel != null - && channel.attachedSource == this + if (channel != null && channel.attachedSource == this && channelOpenAL != null && channelOpenAL.ALSource != null) { AL10.alSourcef( @@ -400,8 +342,7 @@ public class SourceLWJGLOpenAL extends Source { * Checks the source's pitch. */ private void checkPitch() { - if (channel != null - && channel.attachedSource == this + if (channel != null && channel.attachedSource == this && LibraryLWJGLOpenAL.alPitchSupported() && channelOpenAL != null && channelOpenAL.ALSource != null) { @@ -412,6 +353,7 @@ public class SourceLWJGLOpenAL extends Source { /** * Sets whether this source should loop or only play once. + * * @param lp True or false. */ @Override @@ -419,8 +361,7 @@ public class SourceLWJGLOpenAL extends Source { super.setLooping(lp); // make sure we are assigned to a channel: - if (channel != null - && channel.attachedSource == this + if (channel != null && channel.attachedSource == this && channelOpenAL != null && channelOpenAL.ALSource != null) { if (lp) AL10.alSourcei(channelOpenAL.ALSource.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); @@ -431,14 +372,14 @@ public class SourceLWJGLOpenAL extends Source { /** * Sets this source's attenuation model. + * * @param model Attenuation model to use. */ @Override public void setAttenuation(int model) { super.setAttenuation(model); // make sure we are assigned to a channel: - if (channel != null - && channel.attachedSource == this + if (channel != null && channel.attachedSource == this && channelOpenAL != null && channelOpenAL.ALSource != null) { // attenuation changed, so update the rolloff factor accordingly @@ -450,16 +391,15 @@ public class SourceLWJGLOpenAL extends Source { } /** - * Sets this source's fade distance or rolloff factor, depending on the - * attenuation model. + * Sets this source's fade distance or rolloff factor, depending on the attenuation model. + * * @param dr New value for fade distance or rolloff factor. */ @Override public void setDistOrRoll(float dr) { super.setDistOrRoll(dr); // make sure we are assigned to a channel: - if (channel != null - && channel.attachedSource == this + if (channel != null && channel.attachedSource == this && channelOpenAL != null && channelOpenAL.ALSource != null) { // if we are using rolloff attenuation, then dr is a rolloff factor: @@ -472,6 +412,7 @@ public class SourceLWJGLOpenAL extends Source { /** * Sets this source's velocity, for use in Doppler effect. + * * @param x Velocity along world x-axis. * @param y Velocity along world y-axis. * @param z Velocity along world z-axis. @@ -480,11 +421,10 @@ public class SourceLWJGLOpenAL extends Source { public void setVelocity(float x, float y, float z) { super.setVelocity(x, y, z); - sourceVelocity = BufferUtils.createFloatBuffer(3).put(new float[] {x, y, z}); + sourceVelocity = BufferUtils.createFloatBuffer(3).put(new float[] { x, y, z }); sourceVelocity.flip(); // make sure we are assigned to a channel: - if (channel != null - && channel.attachedSource == this + if (channel != null && channel.attachedSource == this && channelOpenAL != null && channelOpenAL.ALSource != null) { AL10.alSourcefv(channelOpenAL.ALSource.get(0), AL10.AL_VELOCITY, sourceVelocity); @@ -494,6 +434,7 @@ public class SourceLWJGLOpenAL extends Source { /** * Manually sets this source's pitch. + * * @param value A float value ( 0.5f - 2.0f ). */ @Override @@ -504,6 +445,7 @@ public class SourceLWJGLOpenAL extends Source { /** * Plays the source on the specified channel. + * * @param c Channel to play on. */ @Override @@ -618,6 +560,7 @@ public class SourceLWJGLOpenAL extends Source { /** * Queues up the initial stream-buffers for the stream. + * * @return False if the end of the stream was reached. */ @Override @@ -646,8 +589,8 @@ public class SourceLWJGLOpenAL extends Source { */ private void resetALInformation() { // Create buffers for the source's position and velocity - sourcePosition = BufferUtils.createFloatBuffer(3).put(new float[] {position.x, position.y, position.z}); - sourceVelocity = BufferUtils.createFloatBuffer(3).put(new float[] {velocity.x, velocity.y, velocity.z}); + sourcePosition = BufferUtils.createFloatBuffer(3).put(new float[] { position.x, position.y, position.z }); + sourceVelocity = BufferUtils.createFloatBuffer(3).put(new float[] { velocity.x, velocity.y, velocity.z }); // flip the buffers, so they can be used: sourcePosition.flip(); @@ -670,8 +613,7 @@ public class SourceLWJGLOpenAL extends Source { } /** - * If using linear attenuation, calculates the gain for this source based on - * its distance from the listener. + * If using linear attenuation, calculates the gain for this source based on its distance from the listener. */ private void calculateGain() { // If using linear attenuation, calculate the source's gain: @@ -692,6 +634,7 @@ public class SourceLWJGLOpenAL extends Source { /** * Checks for OpenAL errors, and prints a message if there is an error. + * * @return True if there was an error, False if not. */ private boolean checkALError() { diff --git a/src/main/java/me/eigenraven/lwjgl3ify/textures/FastByteChannel.java b/src/main/java/me/eigenraven/lwjgl3ify/textures/FastByteChannel.java index f37f825..92d54d8 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/textures/FastByteChannel.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/textures/FastByteChannel.java @@ -10,6 +10,7 @@ import java.nio.channels.spi.AbstractInterruptibleChannel; // ReadableByteChannel impl without locking. // In cases where the channel can never be accessed concurrently, this is a significant performance improvement. public class FastByteChannel extends AbstractInterruptibleChannel implements ReadableByteChannel { + private final InputStream in; private static final int TRANSFER_SIZE = 8192; private byte[] buf = new byte[0]; diff --git a/src/main/java/me/eigenraven/lwjgl3ify/textures/NativeBackedImage.java b/src/main/java/me/eigenraven/lwjgl3ify/textures/NativeBackedImage.java index 66efaff..6b00201 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/textures/NativeBackedImage.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/textures/NativeBackedImage.java @@ -8,12 +8,14 @@ import java.nio.ByteBuffer; import java.nio.IntBuffer; import java.nio.channels.FileChannel; import java.nio.channels.ReadableByteChannel; + import org.apache.commons.io.IOUtils; import org.lwjgl.stb.STBImage; import org.lwjgl.system.MemoryStack; import org.lwjgl.system.MemoryUtil; public class NativeBackedImage extends BufferedImage implements AutoCloseable { + private final int width; private final int height; private long pointer; @@ -135,8 +137,7 @@ public class NativeBackedImage extends BufferedImage implements AutoCloseable { int sizeGuess = 4096; try { sizeGuess = Math.max(4096, inputStream.available()); - } catch (IOException ignored) { - } + } catch (IOException ignored) {} byteBuffer = MemoryUtil.memAlloc(sizeGuess * 2); ReadableByteChannel readableByteChannel = new FastByteChannel(inputStream); diff --git a/src/main/java/me/eigenraven/lwjgl3ify/textures/StbStitcher.java b/src/main/java/me/eigenraven/lwjgl3ify/textures/StbStitcher.java index 0261b39..6bfe1d0 100644 --- a/src/main/java/me/eigenraven/lwjgl3ify/textures/StbStitcher.java +++ b/src/main/java/me/eigenraven/lwjgl3ify/textures/StbStitcher.java @@ -1,27 +1,30 @@ package me.eigenraven.lwjgl3ify.textures; -import cpw.mods.fml.common.ProgressManager; import me.eigenraven.lwjgl3ify.Lwjgl3ify; import me.eigenraven.lwjgl3ify.api.Lwjgl3Aware; + import net.minecraft.client.renderer.StitcherException; import net.minecraft.client.renderer.texture.Stitcher; import net.minecraft.util.MathHelper; + import org.lwjgl.stb.STBRPContext; import org.lwjgl.stb.STBRPNode; import org.lwjgl.stb.STBRPRect; import org.lwjgl.stb.STBRectPack; +import cpw.mods.fml.common.ProgressManager; + @Lwjgl3Aware @SuppressWarnings("deprecation") public class StbStitcher { + // Returns size public static int packRects(Stitcher.Holder[] holders) { ProgressManager.ProgressBar bar = ProgressManager.push("Stitch setup", (holders.length + 99) / 100); int holderSize = holders.length; // Allocate memory for the rectangles and the context - try (STBRPRect.Buffer rectBuf = STBRPRect.malloc(holderSize); - STBRPContext ctx = STBRPContext.malloc(); ) { + try (STBRPRect.Buffer rectBuf = STBRPRect.malloc(holderSize); STBRPContext ctx = STBRPContext.malloc();) { // Initialize the rectangles that we'll be using in the calculation // While that's happening, sum up the area needed to fit all of the images @@ -60,8 +63,8 @@ public class StbStitcher { if (!rect.was_packed()) { throw new StitcherException( holder, - "Could not fit " + holder.getAtlasSprite().getIconName() + " into " + size + "x" + size - + " atlas!"); + "Could not fit " + holder.getAtlasSprite() + .getIconName() + " into " + size + "x" + size + " atlas!"); } // Initialize the sprite now with the position and size that we've calculated so far diff --git a/src/main/java/org/lwjglx/BufferChecks.java b/src/main/java/org/lwjglx/BufferChecks.java index e8cb670..6e42d51 100644 --- a/src/main/java/org/lwjglx/BufferChecks.java +++ b/src/main/java/org/lwjglx/BufferChecks.java @@ -1,51 +1,36 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx; import java.nio.*; /** - *

A class to check buffer boundaries in general. If there is unsufficient space - * in the buffer when the call is made then a buffer overflow would otherwise - * occur and cause unexpected behaviour, a crash, or worse, a security risk. + *

+ * A class to check buffer boundaries in general. If there is unsufficient space in the buffer when the call is made + * then a buffer overflow would otherwise occur and cause unexpected behaviour, a crash, or worse, a security risk. * * Internal class, don't use. *

+ * * @author cix_foo * @author elias_naur - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public class BufferChecks { + /** Static methods only! */ private BufferChecks() {} @@ -156,8 +141,13 @@ public class BufferChecks { */ private static void throwBufferSizeException(Buffer buf, int size) { throw new IllegalArgumentException( - "Number of remaining buffer elements is " + buf.remaining() + ", must be at least " + size - + ". Because at most " + size + " elements can be returned, a buffer with at least " + size + "Number of remaining buffer elements is " + buf.remaining() + + ", must be at least " + + size + + ". Because at most " + + size + + " elements can be returned, a buffer with at least " + + size + " elements is required, regardless of actual returned element count"); } @@ -177,13 +167,10 @@ public class BufferChecks { } /** - * Helper method to ensure a buffer is big enough to receive data from a - * glGet* operation. + * Helper method to ensure a buffer is big enough to receive data from a glGet* operation. * - * @param buf - * The buffer to check - * @param size - * The minimum buffer size + * @param buf The buffer to check + * @param size The minimum buffer size * @throws IllegalArgumentException */ public static void checkBufferSize(Buffer buf, int size) { @@ -193,8 +180,7 @@ public class BufferChecks { } /** - * Detects the buffer type and performs the corresponding check - * and also returns the buffer position in bytes. + * Detects the buffer type and performs the corresponding check and also returns the buffer position in bytes. * * @param buffer the buffer to check * @param size the size to check diff --git a/src/main/java/org/lwjglx/BufferUtils.java b/src/main/java/org/lwjglx/BufferUtils.java index 8e0782f..bff4506 100644 --- a/src/main/java/org/lwjglx/BufferUtils.java +++ b/src/main/java/org/lwjglx/BufferUtils.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx; @@ -45,13 +29,13 @@ import java.nio.ShortBuffer; * Some often-used Buffer code for creating native buffers of the appropriate size. * * @author $Author: spasi $ - * @version $Revision: 3528 $ - * $Id: BufferUtils.java 3528 2011-05-11 00:12:52Z spasi $ + * @version $Revision: 3528 $ $Id: BufferUtils.java 3528 2011-05-11 00:12:52Z spasi $ */ public final class BufferUtils { /** * Construct a direct native-ordered bytebuffer with the specified size. + * * @param size The size, in bytes * @return a ByteBuffer */ @@ -60,8 +44,8 @@ public final class BufferUtils { } /** - * Construct a direct native-order shortbuffer with the specified number - * of elements. + * Construct a direct native-order shortbuffer with the specified number of elements. + * * @param size The size, in shorts * @return a ShortBuffer */ @@ -70,8 +54,8 @@ public final class BufferUtils { } /** - * Construct a direct native-order charbuffer with the specified number - * of elements. + * Construct a direct native-order charbuffer with the specified number of elements. + * * @param size The size, in chars * @return an CharBuffer */ @@ -80,8 +64,8 @@ public final class BufferUtils { } /** - * Construct a direct native-order intbuffer with the specified number - * of elements. + * Construct a direct native-order intbuffer with the specified number of elements. + * * @param size The size, in ints * @return an IntBuffer */ @@ -90,8 +74,8 @@ public final class BufferUtils { } /** - * Construct a direct native-order longbuffer with the specified number - * of elements. + * Construct a direct native-order longbuffer with the specified number of elements. + * * @param size The size, in longs * @return an LongBuffer */ @@ -100,8 +84,8 @@ public final class BufferUtils { } /** - * Construct a direct native-order floatbuffer with the specified number - * of elements. + * Construct a direct native-order floatbuffer with the specified number of elements. + * * @param size The size, in floats * @return a FloatBuffer */ @@ -110,8 +94,8 @@ public final class BufferUtils { } /** - * Construct a direct native-order doublebuffer with the specified number - * of elements. + * Construct a direct native-order doublebuffer with the specified number of elements. + * * @param size The size, in floats * @return a FloatBuffer */ @@ -120,8 +104,8 @@ public final class BufferUtils { } /** - * Construct a PointerBuffer with the specified number - * of elements. + * Construct a PointerBuffer with the specified number of elements. + * * @param size The size, in memory addresses * @return a PointerBuffer */ @@ -141,8 +125,8 @@ public final class BufferUtils { } /** - * A helper function which is used to get the byte offset in an arbitrary buffer - * based on its position + * A helper function which is used to get the byte offset in an arbitrary buffer based on its position + * * @return the position of the buffer, in BYTES */ public static int getOffset(Buffer buffer) { diff --git a/src/main/java/org/lwjglx/LWJGLException.java b/src/main/java/org/lwjglx/LWJGLException.java index 2a613fa..66ec183 100644 --- a/src/main/java/org/lwjglx/LWJGLException.java +++ b/src/main/java/org/lwjglx/LWJGLException.java @@ -1,45 +1,27 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx; /** *

- * This exception is supplied to make exception handling more generic for LWJGL - * specific exceptions + * This exception is supplied to make exception handling more generic for LWJGL specific exceptions *

* * @author Brian Matzon - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public class LWJGLException extends Exception { @@ -55,8 +37,7 @@ public class LWJGLException extends Exception { /** * Creates a new LWJGLException * - * @param msg - * String identifier for exception + * @param msg String identifier for exception */ public LWJGLException(String msg) { super(msg); diff --git a/src/main/java/org/lwjglx/LWJGLUtil.java b/src/main/java/org/lwjglx/LWJGLUtil.java index 5ad4104..64df590 100644 --- a/src/main/java/org/lwjglx/LWJGLUtil.java +++ b/src/main/java/org/lwjglx/LWJGLUtil.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx; @@ -41,6 +25,7 @@ import java.security.PrivilegedAction; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.util.*; + import org.lwjgl.system.Platform; /** @@ -49,11 +34,11 @@ import org.lwjgl.system.Platform; *

* * @author Brian Matzon - * @version $Revision: 3608 $ - * $Id: LWJGLUtil.java 3608 2011-08-10 16:05:46Z spasi $ + * @version $Revision: 3608 $ $Id: LWJGLUtil.java 3608 2011-08-10 16:05:46Z spasi $ */ @SuppressWarnings("rawtypes") public class LWJGLUtil { + public static final int PLATFORM_LINUX = 1; public static final int PLATFORM_MACOSX = 2; public static final int PLATFORM_WINDOWS = 3; @@ -61,201 +46,199 @@ public class LWJGLUtil { public static final String PLATFORM_MACOSX_NAME = "macosx"; public static final String PLATFORM_WINDOWS_NAME = "windows"; - private static final String LWJGL_ICON_DATA_16x16 = - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\376\377\377\377\302\327\350\377" - + "\164\244\313\377\120\213\275\377\124\216\277\377\206\257\322\377" - + "\347\357\366\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\365\365\365\377\215\217\221\377\166\202\215\377" - + "\175\215\233\377\204\231\252\377\224\267\325\377\072\175\265\377" - + "\110\206\272\377\332\347\361\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\364\370\373\377\234\236\240\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\344\344\344\377\204\255\320\377" - + "\072\175\265\377\133\222\301\377\374\375\376\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\221\266\325\377\137\137\137\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\042\042\042\377\377\377\377\377\350\360\366\377" - + "\071\174\265\377\072\175\265\377\304\330\351\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\306\331\351\377" - + "\201\253\316\377\035\035\035\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\146\146\146\377\377\377\377\377\320\340\355\377" - + "\072\175\265\377\072\175\265\377\215\264\324\377\377\377\377\377" - + "\362\362\362\377\245\245\245\377\337\337\337\377\242\301\334\377" - + "\260\305\326\377\012\012\012\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\250\250\250\377\377\377\377\377\227\272\330\377" - + "\072\175\265\377\072\175\265\377\161\241\312\377\377\377\377\377" - + "\241\241\241\377\000\000\000\377\001\001\001\377\043\043\043\377" - + "\314\314\314\377\320\320\320\377\245\245\245\377\204\204\204\377" - + "\134\134\134\377\357\357\357\377\377\377\377\377\140\226\303\377" - + "\072\175\265\377\072\175\265\377\155\236\310\377\377\377\377\377" - + "\136\136\136\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\317\317\317\377\037\037\037\377\003\003\003\377\053\053\053\377" - + "\154\154\154\377\306\306\306\377\372\374\375\377\236\277\332\377" - + "\167\245\314\377\114\211\274\377\174\250\316\377\377\377\377\377" - + "\033\033\033\377\000\000\000\377\000\000\000\377\027\027\027\377" - + "\326\326\326\377\001\001\001\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\122\122\122\377\345\345\345\377\075\075\075\377" - + "\150\150\150\377\246\246\247\377\332\336\341\377\377\377\377\377" - + "\164\164\164\377\016\016\016\377\000\000\000\377\131\131\131\377" - + "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\221\221\221\377\233\233\233\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\002\002\002\377\103\103\103\377" - + "\377\377\377\377\356\356\356\377\214\214\214\377\277\277\277\377" - + "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\323\323\323\377\130\130\130\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\063\063\063\377" - + "\377\377\377\377\377\377\377\377\374\375\376\377\377\377\377\377" - + "\300\300\300\377\100\100\100\377\002\002\002\377\000\000\000\377" - + "\033\033\033\377\373\373\373\377\027\027\027\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\170\170\170\377" - + "\377\377\377\377\377\377\377\377\322\341\356\377\176\251\316\377" - + "\340\352\363\377\377\377\377\377\324\324\324\377\155\155\155\377" - + "\204\204\204\377\323\323\323\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\275\275\275\377" - + "\377\377\377\377\377\377\377\377\376\376\376\377\146\232\305\377" - + "\075\177\266\377\202\254\320\377\344\355\365\377\377\377\377\377" - + "\377\377\377\377\345\345\345\377\055\055\055\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\014\014\014\377\366\366\366\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377" - + "\115\211\274\377\072\175\265\377\076\200\266\377\207\260\322\377" - + "\347\357\366\377\377\377\377\377\376\376\376\377\274\274\274\377" - + "\117\117\117\377\003\003\003\377\112\112\112\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\353\362\370\377\214\263\324\377\126\220\300\377\120\214\275\377" - + "\167\245\314\377\355\363\370\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\337\337\337\377\346\346\346\377\377\377\377\377"; + private static final String LWJGL_ICON_DATA_16x16 = "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\376\377\377\377\302\327\350\377" + + "\164\244\313\377\120\213\275\377\124\216\277\377\206\257\322\377" + + "\347\357\366\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\365\365\365\377\215\217\221\377\166\202\215\377" + + "\175\215\233\377\204\231\252\377\224\267\325\377\072\175\265\377" + + "\110\206\272\377\332\347\361\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\364\370\373\377\234\236\240\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\344\344\344\377\204\255\320\377" + + "\072\175\265\377\133\222\301\377\374\375\376\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\221\266\325\377\137\137\137\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\042\042\042\377\377\377\377\377\350\360\366\377" + + "\071\174\265\377\072\175\265\377\304\330\351\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\306\331\351\377" + + "\201\253\316\377\035\035\035\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\146\146\146\377\377\377\377\377\320\340\355\377" + + "\072\175\265\377\072\175\265\377\215\264\324\377\377\377\377\377" + + "\362\362\362\377\245\245\245\377\337\337\337\377\242\301\334\377" + + "\260\305\326\377\012\012\012\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\250\250\250\377\377\377\377\377\227\272\330\377" + + "\072\175\265\377\072\175\265\377\161\241\312\377\377\377\377\377" + + "\241\241\241\377\000\000\000\377\001\001\001\377\043\043\043\377" + + "\314\314\314\377\320\320\320\377\245\245\245\377\204\204\204\377" + + "\134\134\134\377\357\357\357\377\377\377\377\377\140\226\303\377" + + "\072\175\265\377\072\175\265\377\155\236\310\377\377\377\377\377" + + "\136\136\136\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\317\317\317\377\037\037\037\377\003\003\003\377\053\053\053\377" + + "\154\154\154\377\306\306\306\377\372\374\375\377\236\277\332\377" + + "\167\245\314\377\114\211\274\377\174\250\316\377\377\377\377\377" + + "\033\033\033\377\000\000\000\377\000\000\000\377\027\027\027\377" + + "\326\326\326\377\001\001\001\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\122\122\122\377\345\345\345\377\075\075\075\377" + + "\150\150\150\377\246\246\247\377\332\336\341\377\377\377\377\377" + + "\164\164\164\377\016\016\016\377\000\000\000\377\131\131\131\377" + + "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\221\221\221\377\233\233\233\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\002\002\002\377\103\103\103\377" + + "\377\377\377\377\356\356\356\377\214\214\214\377\277\277\277\377" + + "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\323\323\323\377\130\130\130\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\063\063\063\377" + + "\377\377\377\377\377\377\377\377\374\375\376\377\377\377\377\377" + + "\300\300\300\377\100\100\100\377\002\002\002\377\000\000\000\377" + + "\033\033\033\377\373\373\373\377\027\027\027\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\170\170\170\377" + + "\377\377\377\377\377\377\377\377\322\341\356\377\176\251\316\377" + + "\340\352\363\377\377\377\377\377\324\324\324\377\155\155\155\377" + + "\204\204\204\377\323\323\323\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\275\275\275\377" + + "\377\377\377\377\377\377\377\377\376\376\376\377\146\232\305\377" + + "\075\177\266\377\202\254\320\377\344\355\365\377\377\377\377\377" + + "\377\377\377\377\345\345\345\377\055\055\055\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\014\014\014\377\366\366\366\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377" + + "\115\211\274\377\072\175\265\377\076\200\266\377\207\260\322\377" + + "\347\357\366\377\377\377\377\377\376\376\376\377\274\274\274\377" + + "\117\117\117\377\003\003\003\377\112\112\112\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\353\362\370\377\214\263\324\377\126\220\300\377\120\214\275\377" + + "\167\245\314\377\355\363\370\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\337\337\337\377\346\346\346\377\377\377\377\377"; - private static final String LWJGL_ICON_DATA_32x32 = - "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377" - + "\313\335\354\377\223\267\326\377\157\240\311\377\134\223\302\377\140\226\303\377\172\247\315\377\254\310\340\377\355\363\370\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377\265\316\343\377\132\222\301\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\105\205\271\377" - + "\241\301\334\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\374\374\377\342\352\361\377\270\317\343\377\256\311\340\377" - + "\243\302\334\377\230\272\330\377\214\263\323\377\201\254\317\377\156\237\310\377\075\177\266\377\072\175\265\377\072\175\265\377" - + "\072\175\265\377\162\242\312\377\365\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\330\330\330\377\061\061\061\377\044\044\044\377\061\061\061\377\100\100\100\377" - + "\122\122\122\377\145\145\145\377\164\164\164\377\217\217\217\377\367\370\370\377\254\310\337\377\073\175\265\377\072\175\265\377" - + "\072\175\265\377\072\175\265\377\171\247\315\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\376\376\376\377\150\150\150\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\266\266\266\377\376\376\376\377\206\256\321\377\072\175\265\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\256\312\341\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\323\342\356\377\341\352\362\377\050\050\050\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\002\002\002\377\336\336\336\377\377\377\377\377\365\370\373\377\133\222\301\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\364\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\354\363\370\377\144\231\305\377\327\331\333\377\005\005\005\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\044\044\044\377\376\376\376\377\377\377\377\377\377\377\377\377\300\325\347\377" - + "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\253\310\340\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377" - + "\170\246\314\377\173\247\315\377\236\236\236\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\145\145\145\377\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377" - + "\067\173\264\377\072\175\265\377\072\175\265\377\072\175\265\377\146\232\305\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\327\350\377" - + "\071\175\265\377\262\314\341\377\130\130\130\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\251\251\251\377\377\377\377\377\377\377\377\377\377\377\377\377\274\322\345\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\100\201\267\377\356\364\371\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377\132\222\301\377" - + "\075\177\266\377\335\345\355\377\034\034\034\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\007\007\007\377\347\347\347\377\377\377\377\377\377\377\377\377\377\377\377\377\205\256\321\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\314\336\354\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\272\322\345\377\072\175\265\377" - + "\127\220\277\377\320\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\063\063\063\377\375\375\375\377\377\377\377\377\377\377\377\377\373\374\375\377\120\213\275\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\261\314\342\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\312\312\312\377\067\067\067\377\141\141\141\377\242\242\242\377\335\335\335\377\344\354\363\377\261\313\341\377" - + "\264\315\342\377\346\346\346\377\043\043\043\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\162\162\162\377\377\377\377\377\377\377\377\377\377\377\377\377\330\345\360\377\072\175\265\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\240\300\333\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\146\146\146\377\000\000\000\377\000\000\000\377\000\000\000\377\006\006\006\377\047\047\047\377\146\146\146\377" - + "\324\324\324\377\377\377\377\377\366\366\366\377\320\320\320\377\227\227\227\377\136\136\136\377\047\047\047\377\004\004\004\377" - + "\000\000\000\377\003\003\003\377\300\300\300\377\377\377\377\377\377\377\377\377\377\377\377\377\242\301\333\377\072\175\265\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\236\277\332\377\377\377\377\377\377\377\377\377" - + "\373\373\373\377\045\045\045\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\134\134\134\377\377\377\377\377\352\352\352\377\217\217\217\377\265\265\265\377\351\351\351\377\375\375\375\377\347\347\347\377" - + "\262\262\262\377\275\275\275\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\153\235\307\377\072\175\265\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\241\301\334\377\377\377\377\377\377\377\377\377" - + "\333\333\333\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\203\203\203\377\377\377\377\377\137\137\137\377\000\000\000\377\000\000\000\377\013\013\013\377\067\067\067\377\166\166\166\377" - + "\267\267\267\377\360\360\360\377\377\377\377\377\377\377\377\377\377\377\377\377\360\365\371\377\113\210\273\377\075\177\266\377" - + "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\262\314\342\377\377\377\377\377\377\377\377\377" - + "\232\232\232\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\305\305\305\377\367\367\367\377\035\035\035\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\007\007\007\377\074\074\074\377\337\337\337\377\377\377\377\377\373\374\375\377\374\375\376\377\363\367\372\377" - + "\314\335\353\377\236\276\332\377\162\241\311\377\114\211\273\377\072\175\265\377\311\334\353\377\377\377\377\377\377\377\377\377" - + "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\017\017\017\377" - + "\371\371\371\377\321\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\216\216\216\377\377\377\377\377\371\371\371\377\204\204\204\377\160\160\160\377" - + "\260\260\260\377\352\352\352\377\377\377\377\377\371\373\374\377\334\350\362\377\366\371\374\377\377\377\377\377\377\377\377\377" - + "\025\025\025\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\116\116\116\377" - + "\377\377\377\377\221\221\221\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\273\273\273\377\377\377\377\377\236\236\236\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\004\004\004\377\057\057\057\377\160\160\160\377\260\260\260\377\346\346\346\377\376\376\376\377\377\377\377\377" - + "\071\071\071\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\220\220\220\377" - + "\377\377\377\377\115\115\115\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\020\020\020\377\360\360\360\377\377\377\377\377\132\132\132\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\011\011\011\377\062\062\062\377\261\261\261\377" - + "\366\366\366\377\241\241\241\377\065\065\065\377\002\002\002\377\000\000\000\377\000\000\000\377\002\002\002\377\321\321\321\377" - + "\365\365\365\377\023\023\023\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\105\105\105\377\376\376\376\377\370\370\370\377\035\035\035\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\053\053\053\377" - + "\377\377\377\377\377\377\377\377\374\374\374\377\276\276\276\377\120\120\120\377\005\005\005\377\045\045\045\377\371\371\371\377" - + "\302\302\302\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\206\206\206\377\377\377\377\377\322\322\322\377\001\001\001\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\103\103\103\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377\334\334\334\377\340\340\340\377\377\377\377\377" - + "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\001\001\001\377\310\310\310\377\377\377\377\377\216\216\216\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\210\210\210\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\337\337\337\377\051\051\051\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\030\030\030\377\365\365\365\377\377\377\377\377\112\112\112\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\317\317\317\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\361\366\372\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\371\371\371\377\265\265\265\377\113\113\113\377\006\006\006\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\122\122\122\377\377\377\377\377\370\370\370\377\020\020\020\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\034\034\034\377\370\370\370\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\206\257\321\377\220\265\325\377\352\361\367\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\333\333\333\377\170\170\170\377\033\033\033\377\000\000\000\377" - + "\000\000\000\377\226\226\226\377\377\377\377\377\306\306\306\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\132\132\132\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\330\351\377\072\175\265\377\103\203\270\377" - + "\224\270\326\377\355\363\370\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\364\364\364\377\247\247\247\377" - + "\205\205\205\377\364\364\364\377\377\377\377\377\206\206\206\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\235\235\235\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\373\375\377\135\224\302\377\072\175\265\377" - + "\072\175\265\377\106\205\271\377\230\273\330\377\357\364\371\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\233\233\233\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\005\005\005\377\335\335\335\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\305\331\351\377\073\176\266\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\236\276\332\377\362\366\372\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\373\373\373\377\216\216\216\377\045\045\045\377\001\001\001\377\000\000\000\377" - + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\054\054\054\377\374\374\374\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\217\265\325\377" - + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\112\207\273\377\243\302\334\377\363\367\372\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\372\372\377\260\260\260\377\105\105\105\377" - + "\004\004\004\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\156\156\156\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377" - + "\205\257\321\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\115\211\274\377" - + "\250\305\336\377\366\371\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377" - + "\322\322\322\377\150\150\150\377\016\016\016\377\000\000\000\377\001\001\001\377\270\270\270\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\376\376\377\377\261\313\342\377\114\211\274\377\071\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377" - + "\072\175\265\377\115\211\274\377\277\324\347\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\354\354\354\377\223\223\223\377\233\233\233\377\375\375\375\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\363\367\372\377\265\316\343\377\201\254\320\377\145\231\305\377\141\227\304\377\154\236\310\377" - + "\217\265\325\377\305\331\351\377\367\372\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" - + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"; + private static final String LWJGL_ICON_DATA_32x32 = "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377" + + "\313\335\354\377\223\267\326\377\157\240\311\377\134\223\302\377\140\226\303\377\172\247\315\377\254\310\340\377\355\363\370\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377\265\316\343\377\132\222\301\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\105\205\271\377" + + "\241\301\334\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\374\374\377\342\352\361\377\270\317\343\377\256\311\340\377" + + "\243\302\334\377\230\272\330\377\214\263\323\377\201\254\317\377\156\237\310\377\075\177\266\377\072\175\265\377\072\175\265\377" + + "\072\175\265\377\162\242\312\377\365\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\330\330\330\377\061\061\061\377\044\044\044\377\061\061\061\377\100\100\100\377" + + "\122\122\122\377\145\145\145\377\164\164\164\377\217\217\217\377\367\370\370\377\254\310\337\377\073\175\265\377\072\175\265\377" + + "\072\175\265\377\072\175\265\377\171\247\315\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\376\376\376\377\150\150\150\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\266\266\266\377\376\376\376\377\206\256\321\377\072\175\265\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\256\312\341\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\323\342\356\377\341\352\362\377\050\050\050\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\002\002\002\377\336\336\336\377\377\377\377\377\365\370\373\377\133\222\301\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\364\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\354\363\370\377\144\231\305\377\327\331\333\377\005\005\005\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\044\044\044\377\376\376\376\377\377\377\377\377\377\377\377\377\300\325\347\377" + + "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\253\310\340\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377" + + "\170\246\314\377\173\247\315\377\236\236\236\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\145\145\145\377\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377" + + "\067\173\264\377\072\175\265\377\072\175\265\377\072\175\265\377\146\232\305\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\327\350\377" + + "\071\175\265\377\262\314\341\377\130\130\130\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\251\251\251\377\377\377\377\377\377\377\377\377\377\377\377\377\274\322\345\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\100\201\267\377\356\364\371\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377\132\222\301\377" + + "\075\177\266\377\335\345\355\377\034\034\034\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\007\007\007\377\347\347\347\377\377\377\377\377\377\377\377\377\377\377\377\377\205\256\321\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\314\336\354\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\272\322\345\377\072\175\265\377" + + "\127\220\277\377\320\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\063\063\063\377\375\375\375\377\377\377\377\377\377\377\377\377\373\374\375\377\120\213\275\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\261\314\342\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\312\312\312\377\067\067\067\377\141\141\141\377\242\242\242\377\335\335\335\377\344\354\363\377\261\313\341\377" + + "\264\315\342\377\346\346\346\377\043\043\043\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\162\162\162\377\377\377\377\377\377\377\377\377\377\377\377\377\330\345\360\377\072\175\265\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\240\300\333\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\146\146\146\377\000\000\000\377\000\000\000\377\000\000\000\377\006\006\006\377\047\047\047\377\146\146\146\377" + + "\324\324\324\377\377\377\377\377\366\366\366\377\320\320\320\377\227\227\227\377\136\136\136\377\047\047\047\377\004\004\004\377" + + "\000\000\000\377\003\003\003\377\300\300\300\377\377\377\377\377\377\377\377\377\377\377\377\377\242\301\333\377\072\175\265\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\236\277\332\377\377\377\377\377\377\377\377\377" + + "\373\373\373\377\045\045\045\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\134\134\134\377\377\377\377\377\352\352\352\377\217\217\217\377\265\265\265\377\351\351\351\377\375\375\375\377\347\347\347\377" + + "\262\262\262\377\275\275\275\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\153\235\307\377\072\175\265\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\241\301\334\377\377\377\377\377\377\377\377\377" + + "\333\333\333\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\203\203\203\377\377\377\377\377\137\137\137\377\000\000\000\377\000\000\000\377\013\013\013\377\067\067\067\377\166\166\166\377" + + "\267\267\267\377\360\360\360\377\377\377\377\377\377\377\377\377\377\377\377\377\360\365\371\377\113\210\273\377\075\177\266\377" + + "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\262\314\342\377\377\377\377\377\377\377\377\377" + + "\232\232\232\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\305\305\305\377\367\367\367\377\035\035\035\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\007\007\007\377\074\074\074\377\337\337\337\377\377\377\377\377\373\374\375\377\374\375\376\377\363\367\372\377" + + "\314\335\353\377\236\276\332\377\162\241\311\377\114\211\273\377\072\175\265\377\311\334\353\377\377\377\377\377\377\377\377\377" + + "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\017\017\017\377" + + "\371\371\371\377\321\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\216\216\216\377\377\377\377\377\371\371\371\377\204\204\204\377\160\160\160\377" + + "\260\260\260\377\352\352\352\377\377\377\377\377\371\373\374\377\334\350\362\377\366\371\374\377\377\377\377\377\377\377\377\377" + + "\025\025\025\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\116\116\116\377" + + "\377\377\377\377\221\221\221\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\273\273\273\377\377\377\377\377\236\236\236\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\004\004\004\377\057\057\057\377\160\160\160\377\260\260\260\377\346\346\346\377\376\376\376\377\377\377\377\377" + + "\071\071\071\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\220\220\220\377" + + "\377\377\377\377\115\115\115\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\020\020\020\377\360\360\360\377\377\377\377\377\132\132\132\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\011\011\011\377\062\062\062\377\261\261\261\377" + + "\366\366\366\377\241\241\241\377\065\065\065\377\002\002\002\377\000\000\000\377\000\000\000\377\002\002\002\377\321\321\321\377" + + "\365\365\365\377\023\023\023\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\105\105\105\377\376\376\376\377\370\370\370\377\035\035\035\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\053\053\053\377" + + "\377\377\377\377\377\377\377\377\374\374\374\377\276\276\276\377\120\120\120\377\005\005\005\377\045\045\045\377\371\371\371\377" + + "\302\302\302\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\206\206\206\377\377\377\377\377\322\322\322\377\001\001\001\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\103\103\103\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377\334\334\334\377\340\340\340\377\377\377\377\377" + + "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\001\001\001\377\310\310\310\377\377\377\377\377\216\216\216\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\210\210\210\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\337\337\337\377\051\051\051\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\030\030\030\377\365\365\365\377\377\377\377\377\112\112\112\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\317\317\317\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\361\366\372\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\371\371\371\377\265\265\265\377\113\113\113\377\006\006\006\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\122\122\122\377\377\377\377\377\370\370\370\377\020\020\020\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\034\034\034\377\370\370\370\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\206\257\321\377\220\265\325\377\352\361\367\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\333\333\333\377\170\170\170\377\033\033\033\377\000\000\000\377" + + "\000\000\000\377\226\226\226\377\377\377\377\377\306\306\306\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\132\132\132\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\330\351\377\072\175\265\377\103\203\270\377" + + "\224\270\326\377\355\363\370\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\364\364\364\377\247\247\247\377" + + "\205\205\205\377\364\364\364\377\377\377\377\377\206\206\206\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\235\235\235\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\373\375\377\135\224\302\377\072\175\265\377" + + "\072\175\265\377\106\205\271\377\230\273\330\377\357\364\371\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\233\233\233\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\005\005\005\377\335\335\335\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\305\331\351\377\073\176\266\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\236\276\332\377\362\366\372\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\373\373\373\377\216\216\216\377\045\045\045\377\001\001\001\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\054\054\054\377\374\374\374\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\217\265\325\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\112\207\273\377\243\302\334\377\363\367\372\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\372\372\377\260\260\260\377\105\105\105\377" + + "\004\004\004\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\156\156\156\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377" + + "\205\257\321\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\115\211\274\377" + + "\250\305\336\377\366\371\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377" + + "\322\322\322\377\150\150\150\377\016\016\016\377\000\000\000\377\001\001\001\377\270\270\270\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\376\376\377\377\261\313\342\377\114\211\274\377\071\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377" + + "\072\175\265\377\115\211\274\377\277\324\347\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\354\354\354\377\223\223\223\377\233\233\233\377\375\375\375\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\363\367\372\377\265\316\343\377\201\254\320\377\145\231\305\377\141\227\304\377\154\236\310\377" + + "\217\265\325\377\305\331\351\377\367\372\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"; /** LWJGL Logo - 16 by 16 pixels */ public static final ByteBuffer LWJGLIcon16x16 = loadIcon(LWJGL_ICON_DATA_16x16); @@ -316,21 +299,21 @@ public class LWJGLUtil { /** * Locates the paths required by a library. * - * @param libname Local Library Name to search the classloader with ("openal"). + * @param libname Local Library Name to search the classloader with ("openal"). * @param platform_lib_name The native library name ("libopenal.so") - * @param classloader The classloader to ask for library paths + * @param classloader The classloader to ask for library paths * @return Paths to located libraries, if any */ public static String[] getLibraryPaths(String libname, String platform_lib_name, ClassLoader classloader) { - return getLibraryPaths(libname, new String[] {platform_lib_name}, classloader); + return getLibraryPaths(libname, new String[] { platform_lib_name }, classloader); } /** * Locates the paths required by a library. * - * @param libname Local Library Name to search the classloader with ("openal"). + * @param libname Local Library Name to search the classloader with ("openal"). * @param platform_lib_names The list of possible library names ("libopenal.so") - * @param classloader The classloader to ask for library paths + * @param classloader The classloader to ask for library paths * @return Paths to located libraries, if any */ public static String[] getLibraryPaths(String libname, String[] platform_lib_names, ClassLoader classloader) { @@ -385,13 +368,11 @@ public class LWJGLUtil { } /** - * Tries to locate named library from the current ClassLoader - * This method exists because native libraries are loaded from native code, and as such - * is exempt from ClassLoader library loading rutines. It therefore always fails. - * We therefore invoke the protected method of the ClassLoader to see if it can - * locate it. + * Tries to locate named library from the current ClassLoader This method exists because native libraries are loaded + * from native code, and as such is exempt from ClassLoader library loading rutines. It therefore always fails. We + * therefore invoke the protected method of the ClassLoader to see if it can locate it. * - * @param libname Name of library to search for + * @param libname Name of library to search for * @param classloader Classloader to use * @return Absolute path to library if found, otherwise null */ @@ -446,8 +427,8 @@ public class LWJGLUtil { * @return the property value */ public static Integer getPrivilegedInteger(final String property_name, final int default_val) { - return AccessController.doPrivileged( - (PrivilegedAction) () -> Integer.getInteger(property_name, default_val)); + return AccessController + .doPrivileged((PrivilegedAction) () -> Integer.getInteger(property_name, default_val)); } /** @@ -462,9 +443,8 @@ public class LWJGLUtil { } /** - * Method to determine if the current system is running a version of - * Mac OS X better than the given version. This is only useful for Mac OS X - * specific code and will not work for any other platform. + * Method to determine if the current system is running a version of Mac OS X better than the given version. This is + * only useful for Mac OS X specific code and will not work for any other platform. */ public static boolean isMacOSXEqualsOrBetterThan(int major_required, int minor_required) { String os_version = getPrivilegedProperty("os.version"); @@ -485,9 +465,9 @@ public class LWJGLUtil { } /** - * Returns a map of public static final integer fields in the specified classes, to their String representations. - * An optional filter can be specified to only include specific fields. The target map may be null, in which - * case a new map is allocated and returned. + * Returns a map of public static final integer fields in the specified classes, to their String representations. An + * optional filter can be specified to only include specific fields. The target map may be null, in which case a new + * map is allocated and returned. *

* This method is useful when debugging to quickly identify values returned from the AL/GL/CL APIs. * @@ -497,15 +477,15 @@ public class LWJGLUtil { * * @return the token map */ - public static Map getClassTokens( - final TokenFilter filter, final Map target, final Class... tokenClasses) { + public static Map getClassTokens(final TokenFilter filter, final Map target, + final Class... tokenClasses) { return getClassTokens(filter, target, Arrays.asList(tokenClasses)); } /** - * Returns a map of public static final integer fields in the specified classes, to their String representations. - * An optional filter can be specified to only include specific fields. The target map may be null, in which - * case a new map is allocated and returned. + * Returns a map of public static final integer fields in the specified classes, to their String representations. An + * optional filter can be specified to only include specific fields. The target map may be null, in which case a new + * map is allocated and returned. *

* This method is useful when debugging to quickly identify values returned from the AL/GL/CL APIs. * @@ -515,8 +495,8 @@ public class LWJGLUtil { * * @return the token map */ - public static Map getClassTokens( - final TokenFilter filter, Map target, final Iterable tokenClasses) { + public static Map getClassTokens(final TokenFilter filter, Map target, + final Iterable tokenClasses) { if (target == null) target = new HashMap<>(); final int TOKEN_MODIFIERS = Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL; @@ -530,7 +510,7 @@ public class LWJGLUtil { if (filter != null && !filter.accept(field, value)) continue; if (target.containsKey(value)) // Print colliding tokens in their hex representation. - target.put(value, toHexString(value)); + target.put(value, toHexString(value)); else target.put(value, field.getName()); } catch (IllegalAccessException e) { // Ignore @@ -543,9 +523,8 @@ public class LWJGLUtil { } /** - * Returns a string representation of the integer argument as an - * unsigned integer in base 16. The string will be uppercase - * and will have a leading '0x'. + * Returns a string representation of the integer argument as an unsigned integer in base 16. The string will + * be uppercase and will have a leading '0x'. * * @param value the integer value * diff --git a/src/main/java/org/lwjglx/MemoryUtil.java b/src/main/java/org/lwjglx/MemoryUtil.java index 111d87b..a8635d6 100644 --- a/src/main/java/org/lwjglx/MemoryUtil.java +++ b/src/main/java/org/lwjglx/MemoryUtil.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2011 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. + * Copyright (c) 2002-2011 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.lwjglx; @@ -203,8 +187,8 @@ public final class MemoryUtil { // --- [ String utilities ] --- /** - * Returns a ByteBuffer containing the specified text ASCII encoded and null-terminated. - * If text is null, null is returned. + * Returns a ByteBuffer containing the specified text ASCII encoded and null-terminated. If text is null, null is + * returned. * * @param text the text to encode * @@ -217,8 +201,8 @@ public final class MemoryUtil { } /** - * Returns a ByteBuffer containing the specified text UTF-8 encoded and null-terminated. - * If text is null, null is returned. + * Returns a ByteBuffer containing the specified text UTF-8 encoded and null-terminated. If text is null, null is + * returned. * * @param text the text to encode * @@ -231,8 +215,8 @@ public final class MemoryUtil { } /** - * Returns a ByteBuffer containing the specified text UTF-16LE encoded and null-terminated. - * If text is null, null is returned. + * Returns a ByteBuffer containing the specified text UTF-16LE encoded and null-terminated. If text is null, null is + * returned. * * @param text the text to encode * diff --git a/src/main/java/org/lwjglx/PointerBuffer.java b/src/main/java/org/lwjglx/PointerBuffer.java index c60801d..7bc8185 100644 --- a/src/main/java/org/lwjglx/PointerBuffer.java +++ b/src/main/java/org/lwjglx/PointerBuffer.java @@ -1,41 +1,27 @@ /* - * Copyright (c) 2002-2010 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. + * Copyright (c) 2002-2010 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.lwjglx; import java.lang.reflect.Field; import java.nio.*; + import javax.annotation.Nullable; public class PointerBuffer extends org.lwjgl.PointerBuffer { + private static final Field containerAccess; static { @@ -55,8 +41,8 @@ public class PointerBuffer extends org.lwjgl.PointerBuffer { } } - protected PointerBuffer( - long address, @Nullable ByteBuffer container, int mark, int position, int limit, int capacity) { + protected PointerBuffer(long address, @Nullable ByteBuffer container, int mark, int position, int limit, + int capacity) { super(address, container, mark, position, limit, capacity); } @@ -67,7 +53,9 @@ public class PointerBuffer extends org.lwjgl.PointerBuffer { /** * Allocates a new pointer buffer. * - *

The new buffer's position will be zero, its limit will be its capacity, and its mark will be undefined.

+ *

+ * The new buffer's position will be zero, its limit will be its capacity, and its mark will be undefined. + *

* * @param capacity the new buffer's capacity, in pointers * diff --git a/src/main/java/org/lwjglx/PointerWrapper.java b/src/main/java/org/lwjglx/PointerWrapper.java index f367c53..2329582 100644 --- a/src/main/java/org/lwjglx/PointerWrapper.java +++ b/src/main/java/org/lwjglx/PointerWrapper.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx; diff --git a/src/main/java/org/lwjglx/PointerWrapperAbstract.java b/src/main/java/org/lwjglx/PointerWrapperAbstract.java index f30cbf0..36717fa 100644 --- a/src/main/java/org/lwjglx/PointerWrapperAbstract.java +++ b/src/main/java/org/lwjglx/PointerWrapperAbstract.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2010 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. + * Copyright (c) 2002-2010 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.lwjglx; @@ -45,10 +29,8 @@ public abstract class PointerWrapperAbstract implements PointerWrapper { } /** - * Returns true if this object represents a valid pointer. - * The pointer might be invalid because it is NULL or because - * some other action has deleted the object that this pointer - * represents. + * Returns true if this object represents a valid pointer. The pointer might be invalid because it is NULL or + * because some other action has deleted the object that this pointer represents. * * @return true if the pointer is valid */ @@ -57,9 +39,8 @@ public abstract class PointerWrapperAbstract implements PointerWrapper { } /** - * Checks if the pointer is valid and throws an IllegalStateException if - * it is not. This method is a NO-OP, unless the org.lwjgl.util.Debug - * property has been set to true. + * Checks if the pointer is valid and throws an IllegalStateException if it is not. This method is a NO-OP, unless + * the org.lwjgl.util.Debug property has been set to true. */ public final void checkValid() { if (LWJGLUtil.DEBUG && !isValid()) @@ -87,7 +68,6 @@ public abstract class PointerWrapperAbstract implements PointerWrapper { } public String toString() { - return getClass().getSimpleName() + " pointer (0x" - + Long.toHexString(pointer).toUpperCase() + ")"; + return getClass().getSimpleName() + " pointer (0x" + Long.toHexString(pointer).toUpperCase() + ")"; } } diff --git a/src/main/java/org/lwjglx/Sys.java b/src/main/java/org/lwjglx/Sys.java index f417a37..cfc5d2b 100644 --- a/src/main/java/org/lwjglx/Sys.java +++ b/src/main/java/org/lwjglx/Sys.java @@ -4,8 +4,10 @@ import static org.lwjgl.glfw.GLFW.glfwInit; import java.awt.Desktop; import java.net.URI; + import javax.swing.JOptionPane; import javax.swing.UIManager; + import org.lwjgl.Version; import org.lwjgl.glfw.GLFW; import org.lwjgl.system.Platform; @@ -25,8 +27,8 @@ public class Sys { } /** - * Obtains the number of ticks that the hires timer does in a second. This method is fast; - * it should be called as frequently as possible, as it recalibrates the timer. + * Obtains the number of ticks that the hires timer does in a second. This method is fast; it should be called as + * frequently as possible, as it recalibrates the timer. * * @return timer resolution in ticks per second or 0 if no timer is present. */ @@ -35,9 +37,10 @@ public class Sys { } /** - * Gets the current value of the hires timer, in ticks. When the Sys class is first loaded - * the hires timer is reset to 0. If no hires timer is present then this method will always - * return 0.

NOTEZ BIEN that the hires timer WILL wrap around. + * Gets the current value of the hires timer, in ticks. When the Sys class is first loaded the hires timer is reset + * to 0. If no hires timer is present then this method will always return 0. + *

+ * NOTEZ BIEN that the hires timer WILL wrap around. * * @return the current hires time, in ticks (always >= 0) */ diff --git a/src/main/java/org/lwjglx/input/Cursor.java b/src/main/java/org/lwjglx/input/Cursor.java index f7134d7..6ef4c2b 100644 --- a/src/main/java/org/lwjglx/input/Cursor.java +++ b/src/main/java/org/lwjglx/input/Cursor.java @@ -1,49 +1,33 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.input; import java.nio.IntBuffer; + import org.lwjglx.LWJGLException; /** * - * A class representing a native cursor. Instances of this - * class can be used with Mouse.setCursor(), if available. + * A class representing a native cursor. Instances of this class can be used with Mouse.setCursor(), if available. * * @author elias_naur - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public class Cursor { + /** 1 bit transparency for native cursor */ public static final int CURSOR_ONE_BIT_TRANSPARENCY = 1; @@ -62,18 +46,18 @@ public class Cursor { private boolean destroyed; /** - * Constructs a new Cursor, with the given parameters. Mouse must have been created before you can create - * Cursor objects. Cursor images are in ARGB format, but only one bit transparancy is guaranteed to be supported. - * So to maximize portability, lwjgl applications should only create cursor images with 0x00 or 0xff as alpha values. - * The constructor will copy the images and delays, so there's no need to keep them around. + * Constructs a new Cursor, with the given parameters. Mouse must have been created before you can create Cursor + * objects. Cursor images are in ARGB format, but only one bit transparancy is guaranteed to be supported. So to + * maximize portability, lwjgl applications should only create cursor images with 0x00 or 0xff as alpha values. The + * constructor will copy the images and delays, so there's no need to keep them around. * - * @param width cursor image width - * @param height cursor image height - * @param xHotspot the x coordinate of the cursor hotspot - * @param yHotspot the y coordinate of the cursor hotspot + * @param width cursor image width + * @param height cursor image height + * @param xHotspot the x coordinate of the cursor hotspot + * @param yHotspot the y coordinate of the cursor hotspot * @param numImages number of cursor images specified. Must be 1 if animations are not supported. - * @param images A buffer containing the images. The origin is at the lower left corner, like OpenGL. - * @param delays An int buffer of animation frame delays, if numImages is greater than 1, else null + * @param images A buffer containing the images. The origin is at the lower left corner, like OpenGL. + * @param delays An int buffer of animation frame delays, if numImages is greater than 1, else null * @throws LWJGLException if the cursor could not be created for any reason */ public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) @@ -83,9 +67,8 @@ public class Cursor { } /** - * Gets the minimum size of a native cursor. Can only be called if - * The Mouse is created and cursor caps includes at least - * CURSOR_ONE_BIT_TRANSPARANCY. + * Gets the minimum size of a native cursor. Can only be called if The Mouse is created and cursor caps includes at + * least CURSOR_ONE_BIT_TRANSPARANCY. * * @return the maximum size of a native cursor */ @@ -95,9 +78,8 @@ public class Cursor { } /** - * Gets the maximum size of a native cursor. Can only be called if - * The Mouse is created and cursor caps includes at least - * CURSOR_ONE_BIT_TRANSPARANCY. + * Gets the maximum size of a native cursor. Can only be called if The Mouse is created and cursor caps includes at + * least CURSOR_ONE_BIT_TRANSPARANCY. * * @return the maximum size of a native cursor */ @@ -107,10 +89,9 @@ public class Cursor { } /** - * Get the capabilities of the native cursor. Return a bit mask of the native cursor capabilities. - * The CURSOR_ONE_BIT_TRANSPARANCY indicates support for cursors with one bit transparancy, - * the CURSOR_8_BIT_ALPHA indicates support for 8 bit alpha and CURSOR_ANIMATION indicates - * support for cursor animations. + * Get the capabilities of the native cursor. Return a bit mask of the native cursor capabilities. The + * CURSOR_ONE_BIT_TRANSPARANCY indicates support for cursors with one bit transparancy, the CURSOR_8_BIT_ALPHA + * indicates support for 8 bit alpha and CURSOR_ANIMATION indicates support for cursor animations. * * @return A bit mask with native cursor capabilities. */ @@ -122,9 +103,8 @@ public class Cursor { /** * Creates the actual cursor, using a platform specific class */ - private static CursorElement[] createCursors( - int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) - throws LWJGLException { + private static CursorElement[] createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, + IntBuffer images, IntBuffer delays) throws LWJGLException { // TODO return null; } @@ -152,10 +132,10 @@ public class Cursor { /** * Flips the images so they're oriented according to opengl * - * @param width Width of image - * @param height Height of images - * @param numImages How many images to flip - * @param images Source images + * @param width Width of image + * @param height Height of images + * @param numImages How many images to flip + * @param images Source images * @param images_copy Destination images */ private static void flipImages(int width, int height, int numImages, IntBuffer images, IntBuffer images_copy) { @@ -166,10 +146,10 @@ public class Cursor { } /** - * @param width Width of image - * @param height Height of images + * @param width Width of image + * @param height Height of images * @param start_index index into source buffer to copy to - * @param images Source images + * @param images Source images * @param images_copy Destination images */ private static void flipImage(int width, int height, int start_index, IntBuffer images, IntBuffer images_copy) { @@ -199,9 +179,8 @@ public class Cursor { } /** - * Destroy the native cursor. If the cursor is current, - * the current native cursor is set to null (the default - * OS cursor) + * Destroy the native cursor. If the cursor is current, the current native cursor is set to null (the default OS + * cursor) */ public void destroy() { // TODO @@ -217,6 +196,7 @@ public class Cursor { /** * Determines whether this cursor has timed out + * * @return true if the this cursor has timed out, false if not */ protected boolean hasTimedOut() { @@ -236,6 +216,7 @@ public class Cursor { * A single cursor element, used when animating */ private static class CursorElement { + /** Handle to cursor */ final Object cursorHandle; diff --git a/src/main/java/org/lwjglx/input/EventQueue.java b/src/main/java/org/lwjglx/input/EventQueue.java index 1ead36b..216bfab 100644 --- a/src/main/java/org/lwjglx/input/EventQueue.java +++ b/src/main/java/org/lwjglx/input/EventQueue.java @@ -1,8 +1,8 @@ package org.lwjglx.input; /** - * Internal utility class to keep track of event positions in an array. - * When the array is full the position will wrap to the beginning. + * Internal utility class to keep track of event positions in an array. When the array is full the position will wrap to + * the beginning. */ class EventQueue { @@ -42,6 +42,7 @@ class EventQueue { /** * Increment the event queue + * * @return - true if there is an event available */ synchronized boolean next() { diff --git a/src/main/java/org/lwjglx/input/KeyCodes.java b/src/main/java/org/lwjglx/input/KeyCodes.java index 9833232..d282c3b 100644 --- a/src/main/java/org/lwjglx/input/KeyCodes.java +++ b/src/main/java/org/lwjglx/input/KeyCodes.java @@ -120,28 +120,28 @@ public class KeyCodes { case GLFW.GLFW_KEY_LEFT_BRACKET -> Keyboard.KEY_LBRACKET; case GLFW.GLFW_KEY_RIGHT_BRACKET -> Keyboard.KEY_RBRACKET; case GLFW.GLFW_KEY_APOSTROPHE -> Keyboard.KEY_APOSTROPHE; - // public static final int KEY_AT = 0x91; /* (NEC PC98) */ - // public static final int KEY_COLON = 0x92; /* (NEC PC98) */ - // public static final int KEY_UNDERLINE = 0x93; /* (NEC PC98) */ + // public static final int KEY_AT = 0x91; /* (NEC PC98) */ + // public static final int KEY_COLON = 0x92; /* (NEC PC98) */ + // public static final int KEY_UNDERLINE = 0x93; /* (NEC PC98) */ - // public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */ - // public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */ - // public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */ - // public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */ - // public static final int KEY_CIRCUMFLEX = 0x90; /* (Japanese keyboard) */ - // public static final int KEY_KANJI = 0x94; /* (Japanese keyboard) */ - // public static final int KEY_STOP = 0x95; /* (NEC PC98) */ - // public static final int KEY_AX = 0x96; /* (Japan AX) */ - // public static final int KEY_UNLABELED = 0x97; /* (J3100) */ - // public static final int KEY_SECTION = 0xA7; /* Section symbol (Mac) */ - // public static final int KEY_NUMPADCOMMA = 0xB3; /* , on numeric keypad (NEC PC98) */ - // public static final int KEY_SYSRQ = 0xB7; - // public static final int KEY_FUNCTION = 0xC4; /* Function (Mac) */ - // public static final int KEY_CLEAR = 0xDA; /* Clear key (Mac) */ + // public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */ + // public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */ + // public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */ + // public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */ + // public static final int KEY_CIRCUMFLEX = 0x90; /* (Japanese keyboard) */ + // public static final int KEY_KANJI = 0x94; /* (Japanese keyboard) */ + // public static final int KEY_STOP = 0x95; /* (NEC PC98) */ + // public static final int KEY_AX = 0x96; /* (Japan AX) */ + // public static final int KEY_UNLABELED = 0x97; /* (J3100) */ + // public static final int KEY_SECTION = 0xA7; /* Section symbol (Mac) */ + // public static final int KEY_NUMPADCOMMA = 0xB3; /* , on numeric keypad (NEC PC98) */ + // public static final int KEY_SYSRQ = 0xB7; + // public static final int KEY_FUNCTION = 0xC4; /* Function (Mac) */ + // public static final int KEY_CLEAR = 0xDA; /* Clear key (Mac) */ - // public static final int KEY_APPS = 0xDD; /* AppMenu key */ - // public static final int KEY_POWER = 0xDE; - // public static final int KEY_SLEEP = 0xDF; + // public static final int KEY_APPS = 0xDD; /* AppMenu key */ + // public static final int KEY_POWER = 0xDE; + // public static final int KEY_SLEEP = 0xDF; default -> Keyboard.KEY_NONE; }; @@ -265,30 +265,30 @@ public class KeyCodes { case Keyboard.KEY_LBRACKET -> GLFW.GLFW_KEY_LEFT_BRACKET; case Keyboard.KEY_RBRACKET -> GLFW.GLFW_KEY_RIGHT_BRACKET; case Keyboard.KEY_APOSTROPHE -> GLFW.GLFW_KEY_APOSTROPHE; - // public static final int KEY_AT = 0x91; /* (NEC PC98) */ - // public static final int KEY_COLON = 0x92; /* (NEC PC98) */ - // public static final int KEY_UNDERLINE = 0x93; /* (NEC PC98) */ + // public static final int KEY_AT = 0x91; /* (NEC PC98) */ + // public static final int KEY_COLON = 0x92; /* (NEC PC98) */ + // public static final int KEY_UNDERLINE = 0x93; /* (NEC PC98) */ - // public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */ - // public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */ - // public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */ - // public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */ + // public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */ + // public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */ + // public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */ + // public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */ - // public static final int KEY_CIRCUMFLEX = 0x90; /* (Japanese keyboard) */ - // public static final int KEY_KANJI = 0x94; /* (Japanese keyboard) */ - // public static final int KEY_STOP = 0x95; /* (NEC PC98) */ - // public static final int KEY_AX = 0x96; /* (Japan AX) */ - // public static final int KEY_UNLABELED = 0x97; /* (J3100) */ - // public static final int KEY_SECTION = 0xA7; /* Section symbol (Mac) */ - // public static final int KEY_NUMPADCOMMA = 0xB3; /* , on numeric keypad (NEC PC98) */ - // public static final int KEY_SYSRQ = 0xB7; - // public static final int KEY_FUNCTION = 0xC4; /* Function (Mac) */ + // public static final int KEY_CIRCUMFLEX = 0x90; /* (Japanese keyboard) */ + // public static final int KEY_KANJI = 0x94; /* (Japanese keyboard) */ + // public static final int KEY_STOP = 0x95; /* (NEC PC98) */ + // public static final int KEY_AX = 0x96; /* (Japan AX) */ + // public static final int KEY_UNLABELED = 0x97; /* (J3100) */ + // public static final int KEY_SECTION = 0xA7; /* Section symbol (Mac) */ + // public static final int KEY_NUMPADCOMMA = 0xB3; /* , on numeric keypad (NEC PC98) */ + // public static final int KEY_SYSRQ = 0xB7; + // public static final int KEY_FUNCTION = 0xC4; /* Function (Mac) */ - // public static final int KEY_CLEAR = 0xDA; /* Clear key (Mac) */ + // public static final int KEY_CLEAR = 0xDA; /* Clear key (Mac) */ - // public static final int KEY_APPS = 0xDD; /* AppMenu key */ - // public static final int KEY_POWER = 0xDE; - // public static final int KEY_SLEEP = 0xDF; + // public static final int KEY_APPS = 0xDD; /* AppMenu key */ + // public static final int KEY_POWER = 0xDE; + // public static final int KEY_SLEEP = 0xDF; default -> GLFW.GLFW_KEY_UNKNOWN; }; diff --git a/src/main/java/org/lwjglx/input/Keyboard.java b/src/main/java/org/lwjglx/input/Keyboard.java index ca2a978..cd61a84 100644 --- a/src/main/java/org/lwjglx/input/Keyboard.java +++ b/src/main/java/org/lwjglx/input/Keyboard.java @@ -5,6 +5,7 @@ import java.lang.reflect.Modifier; import java.util.Arrays; import java.util.HashMap; import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.lwjgl.glfw.GLFW; import org.lwjglx.LWJGLException; @@ -14,14 +15,12 @@ import org.lwjglx.opengl.Display; public class Keyboard { /** - * The special character meaning that no - * character was translated for the event. + * The special character meaning that no character was translated for the event. */ public static final int CHAR_NONE = '\0'; /** - * The special keycode meaning that only the - * translated character is valid. + * The special keycode meaning that only the translated character is valid. */ public static final int KEY_NONE = 0x00; @@ -110,26 +109,26 @@ public class Keyboard { public static final int KEY_DECIMAL = 0x53; /* . on numeric keypad */ public static final int KEY_F11 = 0x57; public static final int KEY_F12 = 0x58; - public static final int KEY_F13 = 0x64; /* (NEC PC98) */ - public static final int KEY_F14 = 0x65; /* (NEC PC98) */ - public static final int KEY_F15 = 0x66; /* (NEC PC98) */ + public static final int KEY_F13 = 0x64; /* (NEC PC98) */ + public static final int KEY_F14 = 0x65; /* (NEC PC98) */ + public static final int KEY_F15 = 0x66; /* (NEC PC98) */ public static final int KEY_F16 = 0x67; /* Extended Function keys - (Mac) */ public static final int KEY_F17 = 0x68; public static final int KEY_F18 = 0x69; - public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */ + public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */ public static final int KEY_F19 = 0x71; /* Extended Function keys - (Mac) */ - public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */ - public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */ - public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */ + public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */ + public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */ + public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */ public static final int KEY_NUMPADEQUALS = 0x8D; /* = on numeric keypad (NEC PC98) */ - public static final int KEY_CIRCUMFLEX = 0x90; /* (Japanese keyboard) */ - public static final int KEY_AT = 0x91; /* (NEC PC98) */ - public static final int KEY_COLON = 0x92; /* (NEC PC98) */ - public static final int KEY_UNDERLINE = 0x93; /* (NEC PC98) */ - public static final int KEY_KANJI = 0x94; /* (Japanese keyboard) */ - public static final int KEY_STOP = 0x95; /* (NEC PC98) */ - public static final int KEY_AX = 0x96; /* (Japan AX) */ - public static final int KEY_UNLABELED = 0x97; /* (J3100) */ + public static final int KEY_CIRCUMFLEX = 0x90; /* (Japanese keyboard) */ + public static final int KEY_AT = 0x91; /* (NEC PC98) */ + public static final int KEY_COLON = 0x92; /* (NEC PC98) */ + public static final int KEY_UNDERLINE = 0x93; /* (NEC PC98) */ + public static final int KEY_KANJI = 0x94; /* (Japanese keyboard) */ + public static final int KEY_STOP = 0x95; /* (NEC PC98) */ + public static final int KEY_AX = 0x96; /* (Japan AX) */ + public static final int KEY_UNLABELED = 0x97; /* (J3100) */ public static final int KEY_NUMPADENTER = 0x9C; /* Enter on numeric keypad */ public static final int KEY_RCONTROL = 0x9D; public static final int KEY_SECTION = 0xA7; /* Section symbol (Mac) */ @@ -163,9 +162,11 @@ public class Keyboard { private static EventQueue queue = new EventQueue(128); private enum KeyState { + PRESS(true), RELEASE(false), REPEAT(true); + public final boolean isPressed; KeyState(boolean isPressed) { @@ -196,8 +197,7 @@ public class Keyboard { int keyCounter = 0; try { for (Field field : fields) { - if (Modifier.isStatic(field.getModifiers()) - && Modifier.isPublic(field.getModifiers()) + if (Modifier.isStatic(field.getModifiers()) && Modifier.isPublic(field.getModifiers()) && Modifier.isFinal(field.getModifiers()) && field.getType().equals(int.class) && field.getName().startsWith("KEY_") @@ -209,8 +209,7 @@ public class Keyboard { keyCounter++; } } - } catch (Exception e) { - } + } catch (Exception e) {} keyCount = keyCounter; for (int i = 0; i < keyName.length; i++) { if (keyName[i] == null) { diff --git a/src/main/java/org/lwjglx/input/Mouse.java b/src/main/java/org/lwjglx/input/Mouse.java index 8a88ad0..ac6fd55 100644 --- a/src/main/java/org/lwjglx/input/Mouse.java +++ b/src/main/java/org/lwjglx/input/Mouse.java @@ -2,7 +2,9 @@ package org.lwjglx.input; import java.nio.ByteBuffer; import java.nio.IntBuffer; + import me.eigenraven.lwjgl3ify.core.Config; + import org.apache.commons.lang3.StringUtils; import org.lwjgl.BufferUtils; import org.lwjgl.glfw.GLFW; @@ -143,7 +145,9 @@ public class Mouse { public static void setGrabbed(boolean grab) { GLFW.glfwSetInputMode( - Display.getWindow(), GLFW.GLFW_CURSOR, grab ? GLFW.GLFW_CURSOR_DISABLED : GLFW.GLFW_CURSOR_NORMAL); + Display.getWindow(), + GLFW.GLFW_CURSOR, + grab ? GLFW.GLFW_CURSOR_DISABLED : GLFW.GLFW_CURSOR_NORMAL); grabbed = grab; if (!grab) { setCursorPosition(Display.getWidth() / 2, Display.getHeight() / 2); diff --git a/src/main/java/org/lwjglx/openal/AL.java b/src/main/java/org/lwjglx/openal/AL.java index e3fbe03..7ee6b80 100644 --- a/src/main/java/org/lwjglx/openal/AL.java +++ b/src/main/java/org/lwjglx/openal/AL.java @@ -1,6 +1,7 @@ package org.lwjglx.openal; import java.nio.IntBuffer; + import org.lwjgl.openal.ALC10; import org.lwjgl.openal.ALCCapabilities; import org.lwjglx.BufferUtils; diff --git a/src/main/java/org/lwjglx/openal/ALCcontext.java b/src/main/java/org/lwjglx/openal/ALCcontext.java index f76e528..45ea562 100644 --- a/src/main/java/org/lwjglx/openal/ALCcontext.java +++ b/src/main/java/org/lwjglx/openal/ALCcontext.java @@ -1,52 +1,34 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.openal; import java.nio.IntBuffer; + import org.lwjglx.BufferUtils; /** * The ALCcontext class represents a context opened in OpenAL space. * - * All operations of the AL core API affect a current AL context. Within the scope of AL, - * the ALC is implied - it is not visible as a handle or function parameter. Only one AL - * Context per process can be current at a time. Applications maintaining multiple AL - * Contexts, whether threaded or not, have to set the current context accordingly. - * Applications can have multiple threads that share one more or contexts. In other words, - * AL and ALC are threadsafe. + * All operations of the AL core API affect a current AL context. Within the scope of AL, the ALC is implied - it is not + * visible as a handle or function parameter. Only one AL Context per process can be current at a time. Applications + * maintaining multiple AL Contexts, whether threaded or not, have to set the current context accordingly. Applications + * can have multiple threads that share one more or contexts. In other words, AL and ALC are threadsafe. * * @author Brian Matzon - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public final class ALCcontext { @@ -78,8 +60,9 @@ public final class ALCcontext { /** * Creates an attribute list in a ByteBuffer - * @param contextFrequency Frequency to add - * @param contextRefresh Refresh rate to add + * + * @param contextFrequency Frequency to add + * @param contextRefresh Refresh rate to add * @param contextSynchronized Whether to synchronize the context * @return */ diff --git a/src/main/java/org/lwjglx/openal/ALCdevice.java b/src/main/java/org/lwjglx/openal/ALCdevice.java index d046fcc..f324136 100644 --- a/src/main/java/org/lwjglx/openal/ALCdevice.java +++ b/src/main/java/org/lwjglx/openal/ALCdevice.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.openal; @@ -36,16 +20,14 @@ import java.util.HashMap; /** * The ALCdevice class represents a device opened in OpenAL space. * - * ALC introduces the notion of a Device. A Device can be, depending on the - * implementation, a hardware device, or a daemon/OS service/actual server. This - * mechanism also permits different drivers (and hardware) to coexist within the same - * system, as well as allowing several applications to share system resources for audio, - * including a single hardware output device. The details are left to the implementation, - * which has to map the available backends to unique device specifiers. + * ALC introduces the notion of a Device. A Device can be, depending on the implementation, a hardware device, or a + * daemon/OS service/actual server. This mechanism also permits different drivers (and hardware) to coexist within the + * same system, as well as allowing several applications to share system resources for audio, including a single + * hardware output device. The details are left to the implementation, which has to map the available backends to unique + * device specifiers. * * @author Brian Matzon - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public final class ALCdevice { diff --git a/src/main/java/org/lwjglx/openal/EFX10.java b/src/main/java/org/lwjglx/openal/EFX10.java index e3392b7..5774753 100644 --- a/src/main/java/org/lwjglx/openal/EFX10.java +++ b/src/main/java/org/lwjglx/openal/EFX10.java @@ -1,6 +1,7 @@ package org.lwjglx.openal; import java.nio.IntBuffer; + import org.lwjgl.openal.EXTEfx; public class EFX10 { diff --git a/src/main/java/org/lwjglx/openal/EFXUtil.java b/src/main/java/org/lwjglx/openal/EFXUtil.java index e3c6c51..3bb3c77 100644 --- a/src/main/java/org/lwjglx/openal/EFXUtil.java +++ b/src/main/java/org/lwjglx/openal/EFXUtil.java @@ -1,6 +1,5 @@ /* - * Copyright LWJGL. All rights reserved. - * License terms: http://lwjgl.org/license.php + * Copyright LWJGL. All rights reserved. License terms: http://lwjgl.org/license.php */ package org.lwjglx.openal; @@ -10,8 +9,8 @@ import static org.lwjgl.openal.EXTEfx.*; import org.lwjgl.openal.ALC; /** - * Utility class for the OpenAL extension AL_EXT_EFX. Provides functions to check for the extension - * and support of various effects and filters. + * Utility class for the OpenAL extension AL_EXT_EFX. Provides functions to check for the extension and support of + * various effects and filters. *

* Currently supports AL_EXT_EFX version 1.0 effects and filters. * @@ -32,25 +31,23 @@ public final class EFXUtil { * * @return True if AL_EXT_EFX is supported, false if not. * - * @throws org.lwjgl.openal.OpenALException - * If OpenAL has not been created yet. + * @throws org.lwjgl.openal.OpenALException If OpenAL has not been created yet. */ public static boolean isEfxSupported() { return ALC.getCapabilities().ALC_EXT_EFX; } /** - * Tests OpenAL to see whether the given effect type is supported. This is done by creating an - * effect of the given type. If creation succeeds the effect is supported. + * Tests OpenAL to see whether the given effect type is supported. This is done by creating an effect of the given + * type. If creation succeeds the effect is supported. * * @param effectType Type of effect whose support is to be tested, e.g. AL_EFFECT_REVERB. * * @return True if it is supported, false if not. * - * @throws org.lwjgl.openal.OpenALException - * If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has - * not been created yet. - * @throws IllegalArgumentException effectType is not a valid effect type. + * @throws org.lwjgl.openal.OpenALException If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has not + * been created yet. + * @throws IllegalArgumentException effectType is not a valid effect type. */ public static boolean isEffectSupported(int effectType) { // Make sure type is a real effect. @@ -78,17 +75,16 @@ public final class EFXUtil { } /** - * Tests OpenAL to see whether the given filter type is supported. This is done by creating a - * filter of the given type. If creation succeeds the filter is supported. + * Tests OpenAL to see whether the given filter type is supported. This is done by creating a filter of the given + * type. If creation succeeds the filter is supported. * * @param filterType Type of filter whose support is to be tested, e.g. AL_FILTER_LOWPASS. * * @return True if it is supported, false if not. * - * @throws org.lwjgl.openal.OpenALException - * If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has - * not been created yet. - * @throws IllegalArgumentException filterType is not a valid filter type. + * @throws org.lwjgl.openal.OpenALException If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has not + * been created yet. + * @throws IllegalArgumentException filterType is not a valid filter type. */ public static boolean isFilterSupported(int filterType) { // Make sure type is a real filter. @@ -106,12 +102,11 @@ public final class EFXUtil { } /** - * Generic test function to see if an EFX object supports a given kind of type. Works for - * effects and filters. + * Generic test function to see if an EFX object supports a given kind of type. Works for effects and filters. * * @param objectType Type of object to test. Must be either EFXUtil.EFFECT or EFXUtil.FILTER. - * @param typeValue OpenAL type the object should be tested for support, e.g. AL_FILTER_LOWPASS - * or AL_EFFECT_REVERB. + * @param typeValue OpenAL type the object should be tested for support, e.g. AL_FILTER_LOWPASS or + * AL_EFFECT_REVERB. * * @return True if object supports typeValue, false else. */ diff --git a/src/main/java/org/lwjglx/openal/OpenALException.java b/src/main/java/org/lwjglx/openal/OpenALException.java index 8c83289..706a030 100644 --- a/src/main/java/org/lwjglx/openal/OpenALException.java +++ b/src/main/java/org/lwjglx/openal/OpenALException.java @@ -1,44 +1,26 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.openal; /** *
- * Thrown by the debug build library of the LWJGL if any OpenAL operation - * causes an error. + * Thrown by the debug build library of the LWJGL if any OpenAL operation causes an error. * * @author Brian Matzon - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public class OpenALException extends RuntimeException { @@ -60,6 +42,7 @@ public class OpenALException extends RuntimeException { /** * Constructor for OpenALException. + * * @param message */ public OpenALException(String message) { @@ -68,6 +51,7 @@ public class OpenALException extends RuntimeException { /** * Constructor for OpenALException. + * * @param message * @param cause */ @@ -77,6 +61,7 @@ public class OpenALException extends RuntimeException { /** * Constructor for OpenALException. + * * @param cause */ public OpenALException(Throwable cause) { diff --git a/src/main/java/org/lwjglx/openal/Util.java b/src/main/java/org/lwjglx/openal/Util.java index f853310..be914c1 100644 --- a/src/main/java/org/lwjglx/openal/Util.java +++ b/src/main/java/org/lwjglx/openal/Util.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.openal; @@ -39,11 +23,13 @@ package org.lwjglx.openal; * @version $Revision$ */ public final class Util { + /** No c'tor */ private Util() {} /** * Checks for any ALC errors and throws an unchecked exception on errors + * * @param device Device for which to check ALC errors */ public static void checkALCError(ALCdevice device) { @@ -61,6 +47,7 @@ public final class Util { /** * Checks for a valid device + * * @param device ALCdevice to check the validity of */ public static void checkALCValidDevice(ALCdevice device) { @@ -71,6 +58,7 @@ public final class Util { /** * Checks for a valid context + * * @param context ALCcontext to check the validity of */ public static void checkALCValidContext(ALCcontext context) { diff --git a/src/main/java/org/lwjglx/opengl/ARBBufferObject.java b/src/main/java/org/lwjglx/opengl/ARBBufferObject.java index 8cf9fee..ea25a06 100644 --- a/src/main/java/org/lwjglx/opengl/ARBBufferObject.java +++ b/src/main/java/org/lwjglx/opengl/ARBBufferObject.java @@ -1,3 +1,4 @@ package org.lwjglx.opengl; -public class ARBBufferObject {} +public class ARBBufferObject { +} diff --git a/src/main/java/org/lwjglx/opengl/ARBProgram.java b/src/main/java/org/lwjglx/opengl/ARBProgram.java index d37122e..d2bddb0 100644 --- a/src/main/java/org/lwjglx/opengl/ARBProgram.java +++ b/src/main/java/org/lwjglx/opengl/ARBProgram.java @@ -1,3 +1,4 @@ package org.lwjglx.opengl; -public class ARBProgram {} +public class ARBProgram { +} diff --git a/src/main/java/org/lwjglx/opengl/AWTGLCanvas.java b/src/main/java/org/lwjglx/opengl/AWTGLCanvas.java index f5727d3..fbb78b5 100644 --- a/src/main/java/org/lwjglx/opengl/AWTGLCanvas.java +++ b/src/main/java/org/lwjglx/opengl/AWTGLCanvas.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; @@ -36,6 +20,7 @@ import java.awt.event.ComponentEvent; import java.awt.event.ComponentListener; import java.awt.event.HierarchyEvent; import java.awt.event.HierarchyListener; + import org.lwjglx.LWJGLException; import org.lwjglx.PointerBuffer; diff --git a/src/main/java/org/lwjglx/opengl/Context.java b/src/main/java/org/lwjglx/opengl/Context.java index 4d54f6b..8dcab8c 100644 --- a/src/main/java/org/lwjglx/opengl/Context.java +++ b/src/main/java/org/lwjglx/opengl/Context.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2011 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. + * Copyright (c) 2002-2011 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.lwjglx.opengl; diff --git a/src/main/java/org/lwjglx/opengl/ContextAttribs.java b/src/main/java/org/lwjglx/opengl/ContextAttribs.java index 6fa81a9..5c05013 100644 --- a/src/main/java/org/lwjglx/opengl/ContextAttribs.java +++ b/src/main/java/org/lwjglx/opengl/ContextAttribs.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; diff --git a/src/main/java/org/lwjglx/opengl/ContextCapabilities.java b/src/main/java/org/lwjglx/opengl/ContextCapabilities.java index b9a7b2a..b1c2e83 100644 --- a/src/main/java/org/lwjglx/opengl/ContextCapabilities.java +++ b/src/main/java/org/lwjglx/opengl/ContextCapabilities.java @@ -22,8 +22,7 @@ public class ContextCapabilities { try { Field f = this.getClass().getField(name); f.setBoolean(this, value); - } catch (Exception e) { - } + } catch (Exception e) {} } } } catch (Exception e) { @@ -177,8 +176,7 @@ public class ContextCapabilities { public boolean GL_ARB_texture_env_combine; public boolean GL_ARB_texture_env_crossbar; public boolean GL_ARB_texture_env_dot3; - public boolean GL_ARB_texture_float; - ; + public boolean GL_ARB_texture_float;; public boolean GL_ARB_texture_gather; public boolean GL_ARB_texture_mirror_clamp_to_edge; public boolean GL_ARB_texture_mirrored_repeat; diff --git a/src/main/java/org/lwjglx/opengl/ContextGL.java b/src/main/java/org/lwjglx/opengl/ContextGL.java index 462e4a9..f9c4322 100644 --- a/src/main/java/org/lwjglx/opengl/ContextGL.java +++ b/src/main/java/org/lwjglx/opengl/ContextGL.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; @@ -44,8 +28,7 @@ import org.lwjglx.PointerBuffer; * This class is thread-safe. * * @author elias_naur - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public final class ContextGL implements Context { diff --git a/src/main/java/org/lwjglx/opengl/Display.java b/src/main/java/org/lwjglx/opengl/Display.java index 41a0a98..e7bfb26 100644 --- a/src/main/java/org/lwjglx/opengl/Display.java +++ b/src/main/java/org/lwjglx/opengl/Display.java @@ -6,7 +6,9 @@ import static org.lwjgl.system.MemoryUtil.NULL; import java.nio.ByteBuffer; import java.nio.IntBuffer; + import me.eigenraven.lwjgl3ify.core.Config; + import org.lwjgl.glfw.*; import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFWCharCallback; @@ -70,13 +72,14 @@ public class Display { } /** - * Create the OpenGL context with the given minimum parameters. If isFullscreen() is true or if windowed - * context are not supported on the platform, the display mode will be switched to the mode returned by - * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context - * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be - * created with the given parameters, a LWJGLException will be thrown. + * Create the OpenGL context with the given minimum parameters. If isFullscreen() is true or if windowed context are + * not supported on the platform, the display mode will be switched to the mode returned by getDisplayMode(), and a + * fullscreen context will be created. If isFullscreen() is false, a windowed context will be created with the + * dimensions given in the mode returned by getDisplayMode(). If a context can't be created with the given + * parameters, a LWJGLException will be thrown. *

- *

The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. + *

+ * The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * * @param pixel_format Describes the minimum specifications the context must fulfill. * @param shared_drawable The Drawable to share context with. (optional, may be null) @@ -141,6 +144,7 @@ public class Display { } Window.keyCallback = new GLFWKeyCallback() { + @Override public void invoke(long window, int key, int scancode, int action, int mods) { latestEventKey = key; @@ -155,6 +159,7 @@ public class Display { }; Window.charCallback = new GLFWCharCallback() { + @Override public void invoke(long window, int codepoint) { Keyboard.addCharEvent(latestEventKey, (char) codepoint); @@ -162,6 +167,7 @@ public class Display { }; Window.cursorPosCallback = new GLFWCursorPosCallback() { + @Override public void invoke(long window, double xpos, double ypos) { Mouse.addMoveEvent(xpos, ypos); @@ -169,6 +175,7 @@ public class Display { }; Window.mouseButtonCallback = new GLFWMouseButtonCallback() { + @Override public void invoke(long window, int button, int action, int mods) { Mouse.addButtonEvent(button, action == GLFW.GLFW_PRESS ? true : false); @@ -176,6 +183,7 @@ public class Display { }; Window.scrollCallback = new GLFWScrollCallback() { + @Override public void invoke(long window, double xoffset, double yoffset) { Mouse.addWheelEvent(yoffset); @@ -183,6 +191,7 @@ public class Display { }; Window.windowFocusCallback = new GLFWWindowFocusCallback() { + @Override public void invoke(long window, boolean focused) { displayFocused = focused; @@ -190,6 +199,7 @@ public class Display { }; Window.windowIconifyCallback = new GLFWWindowIconifyCallback() { + @Override public void invoke(long window, boolean iconified) { displayVisible = !iconified; @@ -197,6 +207,7 @@ public class Display { }; Window.windowSizeCallback = new GLFWWindowSizeCallback() { + @Override public void invoke(long window, int width, int height) { latestResized = true; @@ -206,6 +217,7 @@ public class Display { }; Window.windowPosCallback = new GLFWWindowPosCallback() { + @Override public void invoke(long window, int xpos, int ypos) { displayX = xpos; @@ -214,6 +226,7 @@ public class Display { }; Window.windowRefreshCallback = new GLFWWindowRefreshCallback() { + @Override public void invoke(long window) { displayDirty = true; @@ -221,6 +234,7 @@ public class Display { }; Window.framebufferSizeCallback = new GLFWFramebufferSizeCallback() { + @Override public void invoke(long window, int width, int height) { displayFramebufferWidth = width; @@ -318,11 +332,9 @@ public class Display { Window.releaseCallbacks(); glfwDestroyWindow(Window.handle); - /*try { - glfwTerminate(); - } catch (Throwable t) { - t.printStackTrace(); - }*/ + /* + * try { glfwTerminate(); } catch (Throwable t) { t.printStackTrace(); } + */ displayCreated = false; } @@ -500,8 +512,7 @@ public class Display { } /** - * An accurate sync method that will attempt to run at a constant frame rate. - * It should be called once every frame. + * An accurate sync method that will attempt to run at a constant frame rate. It should be called once every frame. * * @param fps - the desired frame rate, in frames per second */ @@ -520,6 +531,7 @@ public class Display { } private static class Window { + static long handle; static GLFWKeyCallback keyCallback; diff --git a/src/main/java/org/lwjglx/opengl/DisplayImplementation.java b/src/main/java/org/lwjglx/opengl/DisplayImplementation.java index ad4b5cb..9e47652 100644 --- a/src/main/java/org/lwjglx/opengl/DisplayImplementation.java +++ b/src/main/java/org/lwjglx/opengl/DisplayImplementation.java @@ -1,46 +1,31 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; /** - * This is the Display implementation interface. Display delegates - * to implementors of this interface. There is one DisplayImplementation - * for each supported platform. + * This is the Display implementation interface. Display delegates to implementors of this interface. There is one + * DisplayImplementation for each supported platform. + * * @author elias_naur */ import java.awt.Canvas; import java.nio.ByteBuffer; import java.nio.FloatBuffer; import java.nio.IntBuffer; + import org.lwjglx.LWJGLException; interface DisplayImplementation extends InputImplementation { @@ -52,14 +37,12 @@ interface DisplayImplementation extends InputImplementation { void switchDisplayMode(DisplayMode mode) throws LWJGLException; /** - * Reset the display mode to whatever it was when LWJGL was initialized. - * Fails silently. + * Reset the display mode to whatever it was when LWJGL was initialized. Fails silently. */ void resetDisplayMode(); /** - * Return the length of the gamma ramp arrays. Returns 0 if gamma settings are - * unsupported. + * Return the length of the gamma ramp arrays. Returns 0 if gamma settings are unsupported. * * @return the length of each gamma ramp array, or 0 if gamma settings are unsupported. */ @@ -71,8 +54,9 @@ interface DisplayImplementation extends InputImplementation { void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; /** - * Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", "PS2", - * "Radeon9700". If the adapter cannot be determined, this function returns null. + * Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", + * "PS2", "Radeon9700". If the adapter cannot be determined, this function returns null. + * * @return a String */ String getAdapter(); @@ -80,6 +64,7 @@ interface DisplayImplementation extends InputImplementation { /** * Get the driver version. This is a vendor/adapter specific version string. If the version cannot be determined, * this function returns null. + * * @return a String */ String getVersion(); @@ -90,8 +75,8 @@ interface DisplayImplementation extends InputImplementation { DisplayMode init() throws LWJGLException; /** - * Implementation of setTitle(). This will read the window's title member - * and stash it in the native title of the window. + * Implementation of setTitle(). This will read the window's title member and stash it in the native title of the + * window. */ void setTitle(String title); @@ -105,15 +90,16 @@ interface DisplayImplementation extends InputImplementation { /** * Create the native PeerInfo. + * * @throws LWJGLException */ PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException; - // void destroyPeerInfo(); + // void destroyPeerInfo(); /** - * Updates the windows internal state. This must be called at least once per video frame - * to handle window close requests, moves, paints, etc. + * Updates the windows internal state. This must be called at least once per video frame to handle window close + * requests, moves, paints, etc. */ void update(); @@ -135,14 +121,8 @@ interface DisplayImplementation extends InputImplementation { /** * Method to create a Pbuffer */ - PeerInfo createPbuffer( - int width, - int height, - PixelFormat pixel_format, - ContextAttribs attribs, - IntBuffer pixelFormatCaps, - IntBuffer pBufferAttribs) - throws LWJGLException; + PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, + IntBuffer pixelFormatCaps, IntBuffer pBufferAttribs) throws LWJGLException; void setPbufferAttrib(PeerInfo handle, int attrib, int value); @@ -157,7 +137,8 @@ interface DisplayImplementation extends InputImplementation { *

  • Linux (and similar platforms) expect one 32x32 icon.
  • *
  • Mac OS X should be supplied one 128x128 icon
  • * - * The implementation will use the supplied ByteBuffers with image data in RGBA and perform any conversions nescesarry for the specific platform. + * The implementation will use the supplied ByteBuffers with image data in RGBA and perform any conversions + * nescesarry for the specific platform. * * @param icons Array of icons in RGBA mode * @return number of icons used. @@ -167,8 +148,8 @@ interface DisplayImplementation extends InputImplementation { /** * Enable or disable the Display window to be resized. * - * @param resizable set to true to make the Display window resizable; - * false to disable resizing on the Display window. + * @param resizable set to true to make the Display window resizable; false to disable resizing on the Display + * window. */ void setResizable(boolean resizable); diff --git a/src/main/java/org/lwjglx/opengl/DisplayMode.java b/src/main/java/org/lwjglx/opengl/DisplayMode.java index a69bdfb..cad16f8 100644 --- a/src/main/java/org/lwjglx/opengl/DisplayMode.java +++ b/src/main/java/org/lwjglx/opengl/DisplayMode.java @@ -1,45 +1,28 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; /** * - * This class encapsulates the properties for a given display mode. - * This class is not instantiable, and is aquired from the Display. + * This class encapsulates the properties for a given display mode. This class is not instantiable, and is aquired from + * the Display. * getAvailableDisplayModes() method. * * @author cix_foo - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public final class DisplayMode { @@ -49,12 +32,11 @@ public final class DisplayMode { private final boolean fullscreen; /** - * Construct a display mode. DisplayModes constructed through the - * public constructor can only be used to specify the dimensions of - * the Display in windowed mode. To get the available DisplayModes for - * fullscreen modes, use Display.getAvailableDisplayModes(). + * Construct a display mode. DisplayModes constructed through the public constructor can only be used to specify the + * dimensions of the Display in windowed mode. To get the available DisplayModes for fullscreen modes, use + * Display.getAvailableDisplayModes(). * - * @param width The Display width. + * @param width The Display width. * @param height The Display height. * @see Display */ diff --git a/src/main/java/org/lwjglx/opengl/Drawable.java b/src/main/java/org/lwjglx/opengl/Drawable.java index ba25e2b..ddd007e 100644 --- a/src/main/java/org/lwjglx/opengl/Drawable.java +++ b/src/main/java/org/lwjglx/opengl/Drawable.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; @@ -35,8 +19,7 @@ import org.lwjglx.LWJGLException; import org.lwjglx.PointerBuffer; /** - * The Drawable interface describes an OpenGL drawable with an associated - * Context. + * The Drawable interface describes an OpenGL drawable with an associated Context. * * @author elias_naur */ @@ -53,7 +36,8 @@ public interface Drawable { void makeCurrent() throws LWJGLException; /** - * If the Drawable's context is current in the current thread, no context will be current after a call to this method. + * If the Drawable's context is current in the current thread, no context will be current after a call to this + * method. * * @throws LWJGLException */ @@ -63,11 +47,10 @@ public interface Drawable { void destroy(); /** - * Sets the appropriate khr_gl_sharing properties in the target PointerBuffer, - * so that if it is used in a clCreateContext(FromType) call, the created CL - * context will be sharing objects with this Drawable's GL context. After a - * call to this method, the target buffer position will have advanced by 2 to 4 positions, - * depending on the implementation. + * Sets the appropriate khr_gl_sharing properties in the target PointerBuffer, so that if it is used in + * a clCreateContext(FromType) call, the created CL context will be sharing objects with this + * Drawable's GL context. After a call to this method, the target buffer position will have advanced by + * 2 to 4 positions, depending on the implementation. * * @param properties The target properties buffer. It must have at least 4 positions remaining. */ diff --git a/src/main/java/org/lwjglx/opengl/DrawableGL.java b/src/main/java/org/lwjglx/opengl/DrawableGL.java index 59d6244..6291520 100644 --- a/src/main/java/org/lwjglx/opengl/DrawableGL.java +++ b/src/main/java/org/lwjglx/opengl/DrawableGL.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2011 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. + * Copyright (c) 2002-2011 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.lwjglx.opengl; diff --git a/src/main/java/org/lwjglx/opengl/DrawableLWJGL.java b/src/main/java/org/lwjglx/opengl/DrawableLWJGL.java index a624578..1339207 100644 --- a/src/main/java/org/lwjglx/opengl/DrawableLWJGL.java +++ b/src/main/java/org/lwjglx/opengl/DrawableLWJGL.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2011 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. + * Copyright (c) 2002-2011 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.lwjglx.opengl; diff --git a/src/main/java/org/lwjglx/opengl/GL15x.java b/src/main/java/org/lwjglx/opengl/GL15x.java index 179b0a4..415ee14 100644 --- a/src/main/java/org/lwjglx/opengl/GL15x.java +++ b/src/main/java/org/lwjglx/opengl/GL15x.java @@ -1,6 +1,7 @@ package org.lwjglx.opengl; import java.nio.ByteBuffer; + import org.lwjgl.BufferUtils; import org.lwjgl.PointerBuffer; import org.lwjgl.opengl.GL15; diff --git a/src/main/java/org/lwjglx/opengl/GL20x.java b/src/main/java/org/lwjglx/opengl/GL20x.java index 81659ec..f2f3081 100644 --- a/src/main/java/org/lwjglx/opengl/GL20x.java +++ b/src/main/java/org/lwjglx/opengl/GL20x.java @@ -3,6 +3,7 @@ package org.lwjglx.opengl; import java.nio.ByteBuffer; import java.nio.IntBuffer; import java.nio.ShortBuffer; + import org.lwjgl.BufferUtils; import org.lwjgl.PointerBuffer; import org.lwjgl.opengl.GL11; @@ -11,20 +12,20 @@ import org.lwjgl.system.MemoryUtil; public class GL20x { - public static void glVertexAttribPointer( - int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) { + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, + ByteBuffer buffer) { int type = unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE; GL20.glVertexAttribPointer(index, size, type, normalized, stride, buffer); } - public static void glVertexAttribPointer( - int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) { + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, + ShortBuffer buffer) { int type = unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT; GL20.nglVertexAttribPointer(index, size, type, normalized, stride, MemoryUtil.memAddress(buffer)); } - public static void glVertexAttribPointer( - int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) { + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, + IntBuffer buffer) { int type = unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT; GL20.nglVertexAttribPointer(index, size, type, normalized, stride, MemoryUtil.memAddress(buffer)); } diff --git a/src/main/java/org/lwjglx/opengl/GLSync.java b/src/main/java/org/lwjglx/opengl/GLSync.java index 8193ffb..0b59ccf 100644 --- a/src/main/java/org/lwjglx/opengl/GLSync.java +++ b/src/main/java/org/lwjglx/opengl/GLSync.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; diff --git a/src/main/java/org/lwjglx/opengl/GlobalLock.java b/src/main/java/org/lwjglx/opengl/GlobalLock.java index 6800d34..42af3de 100644 --- a/src/main/java/org/lwjglx/opengl/GlobalLock.java +++ b/src/main/java/org/lwjglx/opengl/GlobalLock.java @@ -1,40 +1,24 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; /** - * This class contains the global lock that LWJGL will use to - * synchronize access to Display. + * This class contains the global lock that LWJGL will use to synchronize access to Display. */ final class GlobalLock { + static final Object lock = new Object(); } diff --git a/src/main/java/org/lwjglx/opengl/InputImplementation.java b/src/main/java/org/lwjglx/opengl/InputImplementation.java index f838dce..a846eab 100644 --- a/src/main/java/org/lwjglx/opengl/InputImplementation.java +++ b/src/main/java/org/lwjglx/opengl/InputImplementation.java @@ -1,47 +1,33 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; /** - * This is the input implementation interface. Mouse and Keyboard delegates - * to implementors of this interface. There is one InputImplementation - * for each supported platform. + * This is the input implementation interface. Mouse and Keyboard delegates to implementors of this interface. There is + * one InputImplementation for each supported platform. + * * @author elias_naur */ import java.nio.ByteBuffer; import java.nio.IntBuffer; + import org.lwjglx.LWJGLException; public interface InputImplementation { + /* * Mouse methods */ @@ -107,8 +93,7 @@ public interface InputImplementation { /** * Method to poll the keyboard. * - * @param keyDownBuffer the address of a 256-byte buffer to place - * key states in. + * @param keyDownBuffer the address of a 256-byte buffer to place key states in. */ void pollKeyboard(ByteBuffer keyDownBuffer); @@ -117,12 +102,11 @@ public interface InputImplementation { */ void readKeyboard(ByteBuffer buffer); - // int isStateKeySet(int key); + // int isStateKeySet(int key); /** Native cursor handles */ - Object createCursor( - int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) - throws LWJGLException; + Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, + IntBuffer delays) throws LWJGLException; void destroyCursor(Object cursor_handle); diff --git a/src/main/java/org/lwjglx/opengl/OpenGLException.java b/src/main/java/org/lwjglx/opengl/OpenGLException.java index f97f4f2..f93446d 100644 --- a/src/main/java/org/lwjglx/opengl/OpenGLException.java +++ b/src/main/java/org/lwjglx/opengl/OpenGLException.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; @@ -36,8 +20,7 @@ package org.lwjglx.opengl; * Thrown by the debug build library of the LWJGL if any OpenGL operation causes an error. * * @author cix_foo - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public class OpenGLException extends RuntimeException { diff --git a/src/main/java/org/lwjglx/opengl/Pbuffer.java b/src/main/java/org/lwjglx/opengl/Pbuffer.java index 0317fbf..c26468e 100644 --- a/src/main/java/org/lwjglx/opengl/Pbuffer.java +++ b/src/main/java/org/lwjglx/opengl/Pbuffer.java @@ -1,37 +1,22 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; import java.nio.IntBuffer; + import org.lwjglx.BufferUtils; import org.lwjglx.LWJGLException; import org.lwjglx.Sys; @@ -44,10 +29,10 @@ import org.lwjglx.Sys; * This class is thread-safe. * * @author elias_naur - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public final class Pbuffer extends DrawableGL { + /** * Indicates that Pbuffers can be created. */ @@ -150,16 +135,17 @@ public final class Pbuffer extends DrawableGL { /** * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. *

    - * NOTE: The Pbuffer will have its own context that shares display lists and textures with shared_context, - * or, if shared_context is null, the Display context if it is created. The Pbuffer - * will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in the window context and vice versa. + * NOTE: The Pbuffer will have its own context that shares display lists and textures with + * shared_context, or, if shared_context is null, the Display context if it + * is created. The Pbuffer will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in + * the window context and vice versa. *

    * - * @param width Pbuffer width - * @param height Pbuffer height - * @param pixel_format Minimum Pbuffer context properties - * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the Pbuffer will share - * with the Display context (if created). + * @param width Pbuffer width + * @param height Pbuffer height + * @param pixel_format Minimum Pbuffer context properties + * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the + * Pbuffer will share with the Display context (if created). */ public Pbuffer(int width, int height, PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException { this(width, height, pixel_format, null, shared_drawable); @@ -168,58 +154,53 @@ public final class Pbuffer extends DrawableGL { /** * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. *

    - * NOTE: The Pbuffer will have its own context that shares display lists and textures with shared_context, - * or, if shared_context is null, the Display context if it is created. The Pbuffer - * will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in the window context and vice versa. + * NOTE: The Pbuffer will have its own context that shares display lists and textures with + * shared_context, or, if shared_context is null, the Display context if it + * is created. The Pbuffer will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in + * the window context and vice versa. *

    - * The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is null, - * render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be queried to ensure that - * it is supported. Currently only windows platform can support this feature, so it is recommended that EXT_framebuffer_object - * or similar is used if available, for maximum portability. + * The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is + * null, render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be + * queried to ensure that it is supported. Currently only windows platform can support this feature, so it is + * recommended that EXT_framebuffer_object or similar is used if available, for maximum portability. *

    * - * @param width Pbuffer width - * @param height Pbuffer height - * @param pixel_format Minimum Pbuffer context properties + * @param width Pbuffer width + * @param height Pbuffer height + * @param pixel_format Minimum Pbuffer context properties * @param renderTexture - * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the Pbuffer will share - * with the Display context (if created). + * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the + * Pbuffer will share with the Display context (if created). */ - public Pbuffer( - int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, Drawable shared_drawable) - throws LWJGLException { + public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, + Drawable shared_drawable) throws LWJGLException { this(width, height, pixel_format, renderTexture, shared_drawable, null); } /** * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. *

    - * NOTE: The Pbuffer will have its own context that shares display lists and textures with shared_context, - * or, if shared_context is null, the Display context if it is created. The Pbuffer - * will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in the window context and vice versa. + * NOTE: The Pbuffer will have its own context that shares display lists and textures with + * shared_context, or, if shared_context is null, the Display context if it + * is created. The Pbuffer will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in + * the window context and vice versa. *

    - * The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is null, - * render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be queried to ensure that - * it is supported. Currently only windows platform can support this feature, so it is recommended that EXT_framebuffer_object - * or similar is used if available, for maximum portability. + * The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is + * null, render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be + * queried to ensure that it is supported. Currently only windows platform can support this feature, so it is + * recommended that EXT_framebuffer_object or similar is used if available, for maximum portability. *

    * - * @param width Pbuffer width - * @param height Pbuffer height - * @param pixel_format Minimum Pbuffer context properties + * @param width Pbuffer width + * @param height Pbuffer height + * @param pixel_format Minimum Pbuffer context properties * @param renderTexture - * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the Pbuffer will share - * with the Display context (if created). - * @param attribs The ContextAttribs to use when creating the context. (optional, may be null) + * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the + * Pbuffer will share with the Display context (if created). + * @param attribs The ContextAttribs to use when creating the context. (optional, may be null) */ - public Pbuffer( - int width, - int height, - PixelFormat pixel_format, - RenderTexture renderTexture, - Drawable shared_drawable, - ContextAttribs attribs) - throws LWJGLException { + public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, + Drawable shared_drawable, ContextAttribs attribs) throws LWJGLException { if (pixel_format == null) throw new NullPointerException("Pixel format must be non-null"); this.width = width; this.height = height; @@ -230,9 +211,8 @@ public final class Pbuffer extends DrawableGL { // this.context = new ContextGL(peer_info, attribs, (ContextGL)shared_context); } - private static PeerInfo createPbuffer( - int width, int height, PixelFormat pixel_format, ContextAttribs attribs, RenderTexture renderTexture) - throws LWJGLException { + private static PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, + RenderTexture renderTexture) throws LWJGLException { if (renderTexture == null) { // Though null is a perfectly valid argument, Matrox Parhelia drivers expect // a 0 terminated list, or else they crash. Supplying NULL or 0, should @@ -240,21 +220,19 @@ public final class Pbuffer extends DrawableGL { IntBuffer defaultAttribs = BufferUtils.createIntBuffer(1); return Display.getImplementation() .createPbuffer(width, height, pixel_format, attribs, null, defaultAttribs); - } else - return Display.getImplementation() - .createPbuffer( - width, - height, - pixel_format, - attribs, - renderTexture.pixelFormatCaps, - renderTexture.pBufferAttribs); + } else return Display.getImplementation().createPbuffer( + width, + height, + pixel_format, + attribs, + renderTexture.pixelFormatCaps, + renderTexture.pBufferAttribs); } /** - * Method to test for validity of the buffer. If this function returns true, the buffer contents is lost. The buffer can still - * be used, but the results are undefined. The application is expected to release the buffer if needed, destroy it and recreate - * a new buffer. + * Method to test for validity of the buffer. If this function returns true, the buffer contents is lost. The buffer + * can still be used, but the results are undefined. The application is expected to release the buffer if needed, + * destroy it and recreate a new buffer. * * @return true if the buffer is lost and destroyed, false if the buffer is valid. */ @@ -279,8 +257,8 @@ public final class Pbuffer extends DrawableGL { /** * Sets a render-to-texture attribute. *

    - * The attrib parameter can be one of MIPMAP_LEVEL and CUBE_MAP_FACE. When the attrib parameter is CUBE_MAP_FACE then the value - * parameter can be on of the following: + * The attrib parameter can be one of MIPMAP_LEVEL and CUBE_MAP_FACE. When the attrib parameter is CUBE_MAP_FACE + * then the value parameter can be on of the following: *

    * TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y * TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z diff --git a/src/main/java/org/lwjglx/opengl/PeerInfo.java b/src/main/java/org/lwjglx/opengl/PeerInfo.java index 745d1d1..cbdb8c3 100644 --- a/src/main/java/org/lwjglx/opengl/PeerInfo.java +++ b/src/main/java/org/lwjglx/opengl/PeerInfo.java @@ -1,47 +1,32 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; import java.nio.ByteBuffer; + import org.lwjglx.LWJGLException; import org.lwjglx.LWJGLUtil; /** * * @author elias_naur - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ abstract class PeerInfo { + private final ByteBuffer handle; private Thread locking_thread; // Thread that has locked this PeerInfo private int lock_count; diff --git a/src/main/java/org/lwjglx/opengl/PixelFormat.java b/src/main/java/org/lwjglx/opengl/PixelFormat.java index e546b82..e638ffb 100644 --- a/src/main/java/org/lwjglx/opengl/PixelFormat.java +++ b/src/main/java/org/lwjglx/opengl/PixelFormat.java @@ -1,48 +1,29 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; /** - * This class describes pixel format properties for an OpenGL context. Instances - * of this class is used as arguments to Display.create(), Pbuffer.create() and - * AWTGLCanvas, to indicate minimum required properties. + * This class describes pixel format properties for an OpenGL context. Instances of this class is used as arguments to + * Display.create(), Pbuffer.create() and AWTGLCanvas, to indicate minimum required properties. *

    - * Instants of this class are immutable. An example of the expected way to set - * the PixelFormat property values is the following: - * PixelFormat pf = new PixelFormat().withDepthBits(24).withSamples(4).withSRGB(true); + * Instants of this class are immutable. An example of the expected way to set the PixelFormat property values is the + * following: PixelFormat pf = new PixelFormat().withDepthBits(24).withSamples(4).withSRGB(true); *

    - * WARNING: Some pixel formats are known to cause troubles on certain buggy drivers. - * Example: Under Windows, specifying samples != 0 will enable the ARB - * pixel format selection path, which could trigger a crash. + * WARNING: Some pixel formats are known to cause troubles on certain buggy drivers. Example: Under Windows, specifying + * samples != 0 will enable the ARB pixel format selection path, which could trigger a crash. * * @author elias_naur@sourceforge.net * @version $Revision$ @@ -50,8 +31,7 @@ package org.lwjglx.opengl; public final class PixelFormat implements PixelFormatLWJGL { /** - * The number of bits per pixel, exluding alpha. - * This parameter is ignored in Display.create(). + * The number of bits per pixel, exluding alpha. This parameter is ignored in Display.create(). */ private int bpp; /** The number of alpha bits. */ @@ -61,14 +41,12 @@ public final class PixelFormat implements PixelFormatLWJGL { /** The number of stencil bits */ private int stencil; /** - * The number of samples to use in anti-aliasing. - * 0 means that anti-aliasing is disabled. + * The number of samples to use in anti-aliasing. 0 means that anti-aliasing is disabled. */ private int samples; /** - * The number of COLOR_SAMPLES_NV to use for Coverage Sample Anti-aliasing (CSAA). - * When this number is greater than 0, the {@code samples} property will be treated - * as if it were the COVERAGE_SAMPLES_NV property. + * The number of COLOR_SAMPLES_NV to use for Coverage Sample Anti-aliasing (CSAA). When this number is greater than + * 0, the {@code samples} property will be treated as if it were the COVERAGE_SAMPLES_NV property. *

    * This property is currently a no-op for the MacOS implementation. */ @@ -84,19 +62,17 @@ public final class PixelFormat implements PixelFormatLWJGL { /** Whether this format specifies a floating point format */ private boolean floating_point; /** - * Whether this format specifies a packed floating point format (32 bit unsigned - R11F_G11F_B10F) - * This property is currently a no-op for the MacOS implementation. + * Whether this format specifies a packed floating point format (32 bit unsigned - R11F_G11F_B10F) This property is + * currently a no-op for the MacOS implementation. */ private boolean floating_point_packed; /** - * Whether this format specifies an sRGB format - * This property is currently a no-op for the MacOS implementation. + * Whether this format specifies an sRGB format This property is currently a no-op for the MacOS implementation. */ private boolean sRGB; /** - * Default pixel format is minimum 8 bits depth, and no alpha - * nor stencil requirements. + * Default pixel format is minimum 8 bits depth, and no alpha nor stencil requirements. */ public PixelFormat() { this(0, 8, 0); @@ -114,30 +90,13 @@ public final class PixelFormat implements PixelFormatLWJGL { this(bpp, alpha, depth, stencil, samples, 0, 0, 0, false); } - public PixelFormat( - int bpp, - int alpha, - int depth, - int stencil, - int samples, - int num_aux_buffers, - int accum_bpp, - int accum_alpha, - boolean stereo) { + public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples, int num_aux_buffers, int accum_bpp, + int accum_alpha, boolean stereo) { this(bpp, alpha, depth, stencil, samples, num_aux_buffers, accum_bpp, accum_alpha, stereo, false); } - public PixelFormat( - int bpp, - int alpha, - int depth, - int stencil, - int samples, - int num_aux_buffers, - int accum_bpp, - int accum_alpha, - boolean stereo, - boolean floating_point) { + public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples, int num_aux_buffers, int accum_bpp, + int accum_alpha, boolean stereo, boolean floating_point) { this.bpp = bpp; this.alpha = alpha; this.depth = depth; @@ -274,11 +233,11 @@ public final class PixelFormat implements PixelFormatLWJGL { } /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples values. - * A value greater than 0 is valid only if the {@code samples} property is also greater than 0. Additionally, the + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples values. A + * value greater than 0 is valid only if the {@code samples} property is also greater than 0. Additionally, the * color samples value needs to be lower than or equal to the {@code samples} property. * - * @param colorSamples the new color samples value. + * @param colorSamples the new color samples value. * * @return the new PixelFormat */ @@ -287,17 +246,17 @@ public final class PixelFormat implements PixelFormatLWJGL { } /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples - * and coverage samples values. + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples and + * coverage samples values. * - * @param colorSamples the new color samples value. This value must be lower than or equal to the coverage samples value. + * @param colorSamples the new color samples value. This value must be lower than or equal to the coverage + * samples value. * @param coverageSamples the new coverage samples value. * * @return the new PixelFormat */ public PixelFormat withCoverageSamples(final int colorSamples, final int coverageSamples) { - if (coverageSamples < 0 - || colorSamples < 0 + if (coverageSamples < 0 || colorSamples < 0 || (coverageSamples == 0 && 0 < colorSamples) || coverageSamples < colorSamples) throw new IllegalArgumentException( @@ -314,7 +273,8 @@ public final class PixelFormat implements PixelFormatLWJGL { } /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new auxiliary buffers value. + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new auxiliary buffers + * value. * * @param num_aux_buffers the new auxiliary buffers value. * @@ -334,16 +294,16 @@ public final class PixelFormat implements PixelFormatLWJGL { } /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new bits per pixel in the accumulation buffer value. + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new bits per pixel in the + * accumulation buffer value. * * @param accum_bpp the new bits per pixel in the accumulation buffer value. * * @return the new PixelFormat */ public PixelFormat withAccumulationBitsPerPixel(final int accum_bpp) { - if (accum_bpp < 0) - throw new IllegalArgumentException( - "Invalid number of bits per pixel in the accumulation buffer specified: " + accum_bpp); + if (accum_bpp < 0) throw new IllegalArgumentException( + "Invalid number of bits per pixel in the accumulation buffer specified: " + accum_bpp); final PixelFormat pf = new PixelFormat(this); pf.accum_bpp = accum_bpp; @@ -355,16 +315,16 @@ public final class PixelFormat implements PixelFormatLWJGL { } /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new alpha bits in the accumulation buffer value. + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new alpha bits in the + * accumulation buffer value. * * @param accum_alpha the new alpha bits in the accumulation buffer value. * * @return the new PixelFormat */ public PixelFormat withAccumulationAlpha(final int accum_alpha) { - if (accum_alpha < 0) - throw new IllegalArgumentException( - "Invalid number of alpha bits in the accumulation buffer specified: " + accum_alpha); + if (accum_alpha < 0) throw new IllegalArgumentException( + "Invalid number of alpha bits in the accumulation buffer specified: " + accum_alpha); final PixelFormat pf = new PixelFormat(this); pf.accum_alpha = accum_alpha; @@ -408,8 +368,8 @@ public final class PixelFormat implements PixelFormatLWJGL { } /** - * Returns a new PixelFormat object with the same properties as this PixelFormat and the new packed floating point value. - * If floating_point_packed is true, floating_point will be reset to false. + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new packed floating point + * value. If floating_point_packed is true, floating_point will be reset to false. * * @param floating_point_packed the new packed floating point value. * diff --git a/src/main/java/org/lwjglx/opengl/PixelFormatLWJGL.java b/src/main/java/org/lwjglx/opengl/PixelFormatLWJGL.java index e3ad74f..afb1e90 100644 --- a/src/main/java/org/lwjglx/opengl/PixelFormatLWJGL.java +++ b/src/main/java/org/lwjglx/opengl/PixelFormatLWJGL.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2011 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. + * Copyright (c) 2002-2011 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.lwjglx.opengl; diff --git a/src/main/java/org/lwjglx/opengl/RenderTexture.java b/src/main/java/org/lwjglx/opengl/RenderTexture.java index 9894dd7..363e311 100644 --- a/src/main/java/org/lwjglx/opengl/RenderTexture.java +++ b/src/main/java/org/lwjglx/opengl/RenderTexture.java @@ -1,39 +1,24 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; import static org.lwjgl.opengl.GL11.*; import java.nio.IntBuffer; + import org.lwjglx.BufferUtils; /** This class represents the state necessary for render-to-texture. */ @@ -44,51 +29,47 @@ public final class RenderTexture { // ---------------------------------------------------------------------------------- /* - Accepted by the parameter of wglGetPixelFormatAttribivARB, - wglGetPixelFormatAttribfvARB, and the and - parameters of wglChoosePixelFormatARB: - */ + * Accepted by the parameter of wglGetPixelFormatAttribivARB, wglGetPixelFormatAttribfvARB, and the + * and parameters of wglChoosePixelFormatARB: + */ private static final int WGL_BIND_TO_TEXTURE_RGB_ARB = 0x2070; private static final int WGL_BIND_TO_TEXTURE_RGBA_ARB = 0x2071; /* - Accepted by the parameter of wglCreatePbufferARB and - by the parameter of wglQueryPbufferARB: - */ + * Accepted by the parameter of wglCreatePbufferARB and by the parameter of + * wglQueryPbufferARB: + */ private static final int WGL_TEXTURE_FORMAT_ARB = 0x2072; private static final int WGL_TEXTURE_TARGET_ARB = 0x2073; private static final int WGL_MIPMAP_TEXTURE_ARB = 0x2074; /* - Accepted as a value in the parameter of - wglCreatePbufferARB and returned in the value parameter of - wglQueryPbufferARB when is WGL_TEXTURE_FORMAT_ARB: - */ + * Accepted as a value in the parameter of wglCreatePbufferARB and returned in the value parameter of + * wglQueryPbufferARB when is WGL_TEXTURE_FORMAT_ARB: + */ private static final int WGL_TEXTURE_RGB_ARB = 0x2075; private static final int WGL_TEXTURE_RGBA_ARB = 0x2076; /* - Accepted as a value in the parameter of - wglCreatePbufferARB and returned in the value parameter of - wglQueryPbufferARB when is WGL_TEXTURE_TARGET_ARB: - */ + * Accepted as a value in the parameter of wglCreatePbufferARB and returned in the value parameter of + * wglQueryPbufferARB when is WGL_TEXTURE_TARGET_ARB: + */ private static final int WGL_TEXTURE_CUBE_MAP_ARB = 0x2078; private static final int WGL_TEXTURE_1D_ARB = 0x2079; private static final int WGL_TEXTURE_2D_ARB = 0x207A; private static final int WGL_NO_TEXTURE_ARB = 0x2077; /* - Accepted by the parameter of wglSetPbufferAttribARB and - by the parameter of wglQueryPbufferARB: - */ + * Accepted by the parameter of wglSetPbufferAttribARB and by the parameter of + * wglQueryPbufferARB: + */ static final int WGL_MIPMAP_LEVEL_ARB = 0x207B; static final int WGL_CUBE_MAP_FACE_ARB = 0x207C; /* - Accepted as a value in the parameter of - wglSetPbufferAttribARB and returned in the value parameter of - wglQueryPbufferARB when is WGL_CUBE_MAP_FACE_ARB: - */ + * Accepted as a value in the parameter of wglSetPbufferAttribARB and returned in the value parameter + * of wglQueryPbufferARB when is WGL_CUBE_MAP_FACE_ARB: + */ static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x207D; static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x207E; static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x207F; @@ -97,44 +78,36 @@ public final class RenderTexture { static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x2082; /* - Accepted by the parameter of wglBindTexImageARB and - wglReleaseTexImageARB: - */ + * Accepted by the parameter of wglBindTexImageARB and wglReleaseTexImageARB: + */ static final int WGL_FRONT_LEFT_ARB = 0x2083; static final int WGL_FRONT_RIGHT_ARB = 0x2084; static final int WGL_BACK_LEFT_ARB = 0x2085; static final int WGL_BACK_RIGHT_ARB = 0x2086; /* - private static final int WGL_AUX0_ARB = 0x2087; - private static final int WGL_AUX1_ARB = 0x2088; - private static final int WGL_AUX2_ARB = 0x2089; - private static final int WGL_AUX3_ARB = 0x208A; - private static final int WGL_AUX4_ARB = 0x208B; - private static final int WGL_AUX5_ARB = 0x208C; - private static final int WGL_AUX6_ARB = 0x208D; - private static final int WGL_AUX7_ARB = 0x208E; - private static final int WGL_AUX8_ARB = 0x208F; - private static final int WGL_AUX9_ARB = 0x2090; - */ + * private static final int WGL_AUX0_ARB = 0x2087; private static final int WGL_AUX1_ARB = 0x2088; private static + * final int WGL_AUX2_ARB = 0x2089; private static final int WGL_AUX3_ARB = 0x208A; private static final int + * WGL_AUX4_ARB = 0x208B; private static final int WGL_AUX5_ARB = 0x208C; private static final int WGL_AUX6_ARB = + * 0x208D; private static final int WGL_AUX7_ARB = 0x208E; private static final int WGL_AUX8_ARB = 0x208F; private + * static final int WGL_AUX9_ARB = 0x2090; + */ // ------------------------------------------------------------------------------------------- // ----------------------------- WGL_NV_render_texture_rectangle ----------------------------- // ------------------------------------------------------------------------------------------- /* - Accepted by the parameter of wglGetPixelFormatAttribivARB, - wglGetPixelFormatAttribfvARB, and the and - parameters of wglChoosePixelFormatARB: - */ + * Accepted by the parameter of wglGetPixelFormatAttribivARB, wglGetPixelFormatAttribfvARB, and the + * and parameters of wglChoosePixelFormatARB: + */ private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV = 0x20A0; private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV = 0x20A1; /* - Accepted as a value in the parameter of wglCreatePbufferARB - and returned in the value parameter of wglQueryPbufferARB when - is WGL_TEXTURE_TARGET_ARB: - */ + * Accepted as a value in the parameter of wglCreatePbufferARB and returned in the value parameter of + * wglQueryPbufferARB when is WGL_TEXTURE_TARGET_ARB: + */ private static final int WGL_TEXTURE_RECTANGLE_NV = 0x20A2; // --------------------------------------------------------------------------------------- @@ -142,29 +115,27 @@ public final class RenderTexture { // --------------------------------------------------------------------------------------- /* - Accepted by the parameter of wglGetPixelFormatAttribivARB, - wglGetPixelFormatAttribfvARB, and the and - parameters of wglChoosePixelFormatARB: - */ + * Accepted by the parameter of wglGetPixelFormatAttribivARB, wglGetPixelFormatAttribfvARB, and the + * and parameters of wglChoosePixelFormatARB: + */ private static final int WGL_BIND_TO_TEXTURE_DEPTH_NV = 0x20A3; private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV = 0x20A4; /* - Accepted by the parameter of wglCreatePbufferARB and - by the parameter of wglQueryPbufferARB: - */ + * Accepted by the parameter of wglCreatePbufferARB and by the parameter of + * wglQueryPbufferARB: + */ private static final int WGL_DEPTH_TEXTURE_FORMAT_NV = 0x20A5; /* - Accepted as a value in the parameter of wglCreatePbufferARB - and returned in the value parameter of wglQueryPbufferARB when - is WGL_DEPTH_TEXTURE_FORMAT_NV: - */ + * Accepted as a value in the parameter of wglCreatePbufferARB and returned in the value parameter of + * wglQueryPbufferARB when is WGL_DEPTH_TEXTURE_FORMAT_NV: + */ private static final int WGL_TEXTURE_DEPTH_COMPONENT_NV = 0x20A6; /* - Accepted by the parameter of wglBindTexImageARB: - */ + * Accepted by the parameter of wglBindTexImageARB: + */ static final int WGL_DEPTH_COMPONENT_NV = 0x20A7; /** The TEXTURE_1D target. */ @@ -200,15 +171,14 @@ public final class RenderTexture { * @param target - The texture target of the render texture. * @param mipmaps - How many mipmap levels to allocate on the P-buffer. */ - public RenderTexture( - boolean useRGB, boolean useRGBA, boolean useDepth, boolean isRectangle, int target, int mipmaps) { + public RenderTexture(boolean useRGB, boolean useRGBA, boolean useDepth, boolean isRectangle, int target, + int mipmaps) { if (useRGB && useRGBA) throw new IllegalArgumentException("A RenderTexture can't be both RGB and RGBA."); if (mipmaps < 0) throw new IllegalArgumentException("The mipmap levels can't be negative."); - if (isRectangle && target != RENDER_TEXTURE_RECTANGLE) - throw new IllegalArgumentException( - "When the RenderTexture is rectangle the target must be RENDER_TEXTURE_RECTANGLE."); + if (isRectangle && target != RENDER_TEXTURE_RECTANGLE) throw new IllegalArgumentException( + "When the RenderTexture is rectangle the target must be RENDER_TEXTURE_RECTANGLE."); pixelFormatCaps = BufferUtils.createIntBuffer(4); pBufferAttribs = BufferUtils.createIntBuffer(8); diff --git a/src/main/java/org/lwjglx/opengl/SharedDrawable.java b/src/main/java/org/lwjglx/opengl/SharedDrawable.java index 7c7e0e9..0a4c612 100644 --- a/src/main/java/org/lwjglx/opengl/SharedDrawable.java +++ b/src/main/java/org/lwjglx/opengl/SharedDrawable.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; @@ -38,9 +22,8 @@ import org.lwjglx.LWJGLException; */ /** - * A Drawable implementation that shares its context with another Drawable. This is useful - * for background loading of resources. See org.lwjgl.test.opengl.multithread.BackgroundLoad - * for an example. + * A Drawable implementation that shares its context with another Drawable. This is useful for background loading of + * resources. See org.lwjgl.test.opengl.multithread.BackgroundLoad for an example. * * @author Spasi */ diff --git a/src/main/java/org/lwjglx/opengl/Sync.java b/src/main/java/org/lwjglx/opengl/Sync.java index 2a46e5f..ca08b53 100644 --- a/src/main/java/org/lwjglx/opengl/Sync.java +++ b/src/main/java/org/lwjglx/opengl/Sync.java @@ -1,41 +1,24 @@ /* - * Copyright (c) 2002-2012 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. + * Copyright (c) 2002-2012 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.lwjglx.opengl; import org.lwjglx.Sys; /** - * A highly accurate sync method that continually adapts to the system - * it runs on to provide reliable results. + * A highly accurate sync method that continually adapts to the system it runs on to provide reliable results. * * @author Riven * @author kappaOne @@ -57,8 +40,7 @@ class Sync { private static RunningAvg yieldDurations = new RunningAvg(10); /** - * An accurate sync method that will attempt to run at a constant frame rate. - * It should be called once every frame. + * An accurate sync method that will attempt to run at a constant frame rate. It should be called once every frame. * * @param fps - the desired frame rate, in frames per second */ @@ -90,8 +72,8 @@ class Sync { } /** - * This method will initialise the sync method by setting initial - * values for sleepDurations/yieldDurations and nextFrame. + * This method will initialise the sync method by setting initial values for sleepDurations/yieldDurations and + * nextFrame. * * If running on windows it will start the sleep timer fix. */ @@ -113,8 +95,7 @@ class Sync { Thread timerAccuracyThread = new Thread(() -> { try { Thread.sleep(Long.MAX_VALUE); - } catch (Exception e) { - } + } catch (Exception e) {} }); timerAccuracyThread.setName("LWJGL Timer"); @@ -133,6 +114,7 @@ class Sync { } private static class RunningAvg { + private final long[] slots; private int offset; diff --git a/src/main/java/org/lwjglx/opengl/Util.java b/src/main/java/org/lwjglx/opengl/Util.java index 817ea9c..c20695b 100644 --- a/src/main/java/org/lwjglx/opengl/Util.java +++ b/src/main/java/org/lwjglx/opengl/Util.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.opengl; diff --git a/src/main/java/org/lwjglx/test/opengl/Gears.java b/src/main/java/org/lwjglx/test/opengl/Gears.java index 4dee506..7a8626b 100644 --- a/src/main/java/org/lwjglx/test/opengl/Gears.java +++ b/src/main/java/org/lwjglx/test/opengl/Gears.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* @@ -39,6 +23,7 @@ import static org.lwjgl.opengl.ARBTransposeMatrix.*; import static org.lwjgl.opengl.GL11.*; import java.nio.FloatBuffer; + import org.lwjgl.Version; import org.lwjglx.BufferUtils; import org.lwjglx.LWJGLException; @@ -51,9 +36,9 @@ import org.lwjglx.opengl.GLContext; *

    * This is the OpenGL "standard" Gears demo, originally by Brian Paul *

    + * * @author Brian Matzon - * @version $Revision: 3418 $ - * $Id: Gears.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Gears.java 3418 2010-09-28 21:11:35Z spasi $ */ public class Gears { @@ -162,10 +147,10 @@ public class Gears { Display.create(); // setup ogl - FloatBuffer pos = BufferUtils.createFloatBuffer(4).put(new float[] {5.0f, 5.0f, 10.0f, 0.0f}); - FloatBuffer red = BufferUtils.createFloatBuffer(4).put(new float[] {0.8f, 0.1f, 0.0f, 1.0f}); - FloatBuffer green = BufferUtils.createFloatBuffer(4).put(new float[] {0.0f, 0.8f, 0.2f, 1.0f}); - FloatBuffer blue = BufferUtils.createFloatBuffer(4).put(new float[] {0.2f, 0.2f, 1.0f, 1.0f}); + FloatBuffer pos = BufferUtils.createFloatBuffer(4).put(new float[] { 5.0f, 5.0f, 10.0f, 0.0f }); + FloatBuffer red = BufferUtils.createFloatBuffer(4).put(new float[] { 0.8f, 0.1f, 0.0f, 1.0f }); + FloatBuffer green = BufferUtils.createFloatBuffer(4).put(new float[] { 0.0f, 0.8f, 0.2f, 1.0f }); + FloatBuffer blue = BufferUtils.createFloatBuffer(4).put(new float[] { 0.2f, 0.2f, 1.0f, 1.0f }); pos.flip(); red.flip(); @@ -213,8 +198,8 @@ public class Gears { glLoadIdentity(); } else { // --- using extensions - final FloatBuffer identityTranspose = - BufferUtils.createFloatBuffer(16).put(new float[] {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}); + final FloatBuffer identityTranspose = BufferUtils.createFloatBuffer(16) + .put(new float[] { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }); identityTranspose.flip(); glLoadTransposeMatrixfARB(identityTranspose); } @@ -227,14 +212,14 @@ public class Gears { } /** - * Draw a gear wheel. You'll probably want to call this function when - * building a display list since we do a lot of trig here. + * Draw a gear wheel. You'll probably want to call this function when building a display list since we do a lot of + * trig here. * * @param inner_radius radius of hole at center * @param outer_radius radius at center of teeth - * @param width width of gear - * @param teeth number of teeth - * @param tooth_depth depth of tooth + * @param width width of gear + * @param teeth number of teeth + * @param tooth_depth depth of tooth */ private void gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) { int i; @@ -275,9 +260,13 @@ public class Gears { glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); glVertex3f( - r2 * (float) Math.cos(angle + 2.0f * da), r2 * (float) Math.sin(angle + 2.0f * da), width * 0.5f); + r2 * (float) Math.cos(angle + 2.0f * da), + r2 * (float) Math.sin(angle + 2.0f * da), + width * 0.5f); glVertex3f( - r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), width * 0.5f); + r1 * (float) Math.cos(angle + 3.0f * da), + r1 * (float) Math.sin(angle + 3.0f * da), + width * 0.5f); } glEnd(); diff --git a/src/main/java/org/lwjglx/test/spaceinvaders/AlienEntity.java b/src/main/java/org/lwjglx/test/spaceinvaders/AlienEntity.java index 13eb7f9..fd189c6 100644 --- a/src/main/java/org/lwjglx/test/spaceinvaders/AlienEntity.java +++ b/src/main/java/org/lwjglx/test/spaceinvaders/AlienEntity.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.test.spaceinvaders; @@ -73,8 +57,8 @@ public class AlienEntity extends Entity { * Create a new alien entity * * @param game The game in which this entity is being created - * @param x The intial x location of this alien - * @param y The intial y location of this alient + * @param x The intial x location of this alien + * @param y The intial y location of this alient */ public AlienEntity(Game game, int x, int y) { super(game.getSprite("alien.gif"), x, y); diff --git a/src/main/java/org/lwjglx/test/spaceinvaders/Entity.java b/src/main/java/org/lwjglx/test/spaceinvaders/Entity.java index d84de35..1674132 100644 --- a/src/main/java/org/lwjglx/test/spaceinvaders/Entity.java +++ b/src/main/java/org/lwjglx/test/spaceinvaders/Entity.java @@ -1,48 +1,29 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.test.spaceinvaders; import java.awt.Rectangle; /** - * An entity represents any element that appears in the game. The - * entity is responsible for resolving collisions and movement - * based on a set of properties defined either by subclass or externally. + * An entity represents any element that appears in the game. The entity is responsible for resolving collisions and + * movement based on a set of properties defined either by subclass or externally. * - * Note that doubles are used for positions. This may seem strange - * given that pixels locations are integers. However, using double means - * that an entity can move a partial pixel. It doesn't of course mean that - * they will be display half way through a pixel but allows us not lose - * accuracy as we move. + * Note that doubles are used for positions. This may seem strange given that pixels locations are integers. However, + * using double means that an entity can move a partial pixel. It doesn't of course mean that they will be display half + * way through a pixel but allows us not lose accuracy as we move. * * @author Kevin Glass */ @@ -63,7 +44,7 @@ public abstract class Entity { /** The current speed of this entity vertically (pixels/sec) */ protected float dy; - /** The rectangle used for this entity during collisions resolution */ + /** The rectangle used for this entity during collisions resolution */ private Rectangle me = new Rectangle(); /** The rectangle used for other entities during collision resolution */ @@ -73,8 +54,8 @@ public abstract class Entity { * Construct a entity based on a sprite image and a location. * * @param sprite The reference to the image to be displayed for this entity - * @param x The initial x location of this entity - * @param y The initial y location of this entity + * @param x The initial x location of this entity + * @param y The initial y location of this entity */ protected Entity(Sprite sprite, int x, int y) { this.sprite = sprite; @@ -83,8 +64,7 @@ public abstract class Entity { } /** - * Request that this entity move itself based on a certain ammount - * of time passing. + * Request that this entity move itself based on a certain ammount of time passing. * * @param delta The ammount of time that has passed in milliseconds */ @@ -138,8 +118,7 @@ public abstract class Entity { } /** - * Do the logic associated with this entity. This method - * will be called periodically based on game events + * Do the logic associated with this entity. This method will be called periodically based on game events */ public void doLogic() {} diff --git a/src/main/java/org/lwjglx/test/spaceinvaders/Game.java b/src/main/java/org/lwjglx/test/spaceinvaders/Game.java index d170234..2d04a90 100644 --- a/src/main/java/org/lwjglx/test/spaceinvaders/Game.java +++ b/src/main/java/org/lwjglx/test/spaceinvaders/Game.java @@ -1,39 +1,24 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.test.spaceinvaders; import static org.lwjgl.opengl.GL11.*; import java.util.ArrayList; + import org.lwjglx.Sys; import org.lwjglx.input.Keyboard; import org.lwjglx.input.Mouse; @@ -41,26 +26,22 @@ import org.lwjglx.opengl.Display; import org.lwjglx.opengl.DisplayMode; /** - * The main hook of our game. This class with both act as a manager - * for the display and central mediator for the game logic. + * The main hook of our game. This class with both act as a manager for the display and central mediator for the game + * logic. * - * Display management will consist of a loop that cycles round all - * entities in the game asking them to move and then drawing them - * in the appropriate place. With the help of an inner class it - * will also allow the player to control the main ship. + * Display management will consist of a loop that cycles round all entities in the game asking them to move and then + * drawing them in the appropriate place. With the help of an inner class it will also allow the player to control the + * main ship. * - * As a mediator it will be informed when entities within our game - * detect events (e.g. alient killed, played died) and will take - * appropriate game actions. + * As a mediator it will be informed when entities within our game detect events (e.g. alient killed, played died) and + * will take appropriate game actions. * *

    * NOTE:
    - * This game is a LWJGLized implementation of the Space Invaders game by Kevin - * Glass. The original implementation is renderer agnostic and supports other - * OpenGL implementations as well as Java2D. This version has been made specific - * for LWJGL, and has added input control as well as sound (which the original doesn't, - * at the time of writing). - * You can find the original article here:
    + * This game is a LWJGLized implementation of the Space Invaders game by Kevin Glass. The original implementation is + * renderer agnostic and supports other OpenGL implementations as well as Java2D. This version has been made specific + * for LWJGL, and has added input control as well as sound (which the original doesn't, at the time of writing). You can + * find the original article here:
    * http://www.cokeandcode.com *

    * @@ -172,6 +153,7 @@ public class Game { /** * Construct our game and set it running. + * * @param fullscreen * */ @@ -201,8 +183,7 @@ public class Game { public static void sleep(long duration) { try { Thread.sleep((duration * timerTicksPerSecond) / 1000); - } catch (InterruptedException inte) { - } + } catch (InterruptedException inte) {} } /** @@ -275,12 +256,10 @@ public class Game { // get modes DisplayMode[] dm = org.lwjglx.util.Display.getAvailableDisplayModes(width, height, -1, -1, -1, -1, 60, 60); - org.lwjglx.util.Display.setDisplayMode(dm, new String[] { - "width=" + width, - "height=" + height, - "freq=" + 60, - "bpp=" + org.lwjglx.opengl.Display.getDisplayMode().getBitsPerPixel() - }); + org.lwjglx.util.Display.setDisplayMode( + dm, + new String[] { "width=" + width, "height=" + height, "freq=" + 60, + "bpp=" + org.lwjglx.opengl.Display.getDisplayMode().getBitsPerPixel() }); return true; } catch (Exception e) { e.printStackTrace(); @@ -291,8 +270,7 @@ public class Game { } /** - * Start a fresh game, this should clear out any old data and - * create a new set. + * Start a fresh game, this should clear out any old data and create a new set. */ private void startGame() { // clear out any existing entities and intialise a new set @@ -301,8 +279,8 @@ public class Game { } /** - * Initialise the starting state of the entities (ship and aliens). Each - * entitiy will be added to the overall list of entities in the game. + * Initialise the starting state of the entities (ship and aliens). Each entitiy will be added to the overall list + * of entities in the game. */ private void initEntities() { // create the player ship and place it roughly in the center of the screen @@ -321,17 +299,15 @@ public class Game { } /** - * Notification from a game entity that the logic of the game - * should be run at the next opportunity (normally as a result of some - * game event) + * Notification from a game entity that the logic of the game should be run at the next opportunity (normally as a + * result of some game event) */ public void updateLogic() { logicRequiredThisLoop = true; } /** - * Remove an entity from the game. The entity removed will - * no longer move or be drawn. + * Remove an entity from the game. The entity removed will no longer move or be drawn. * * @param entity The entity that should be removed */ @@ -351,8 +327,7 @@ public class Game { } /** - * Notification that the player has won since all the aliens - * are dead. + * Notification that the player has won since all the aliens are dead. */ public void notifyWin() { message = youWin; @@ -384,9 +359,8 @@ public class Game { } /** - * Attempt to fire a shot from the player. Its called "try" - * since we must first check that the player can fire at this - * point, i.e. has he/she waited long enough between shots + * Attempt to fire a shot from the player. Its called "try" since we must first check that the player can fire at + * this point, i.e. has he/she waited long enough between shots */ public void tryToFire() { // check that we have waiting long enough to fire @@ -404,8 +378,7 @@ public class Game { } /** - * Run the main game loop. This method keeps rendering the scene - * and requesting that the callback update its screen. + * Run the main game loop. This method keeps rendering the scene and requesting that the callback update its screen. */ private void gameLoop() { while (Game.gameRunning) { @@ -427,8 +400,7 @@ public class Game { } /** - * Notification that a frame is being rendered. Responsible for - * running game logic and rendering the scene. + * Notification that a frame is being rendered. Responsible for running game logic and rendering the scene. */ public void frameRendering() { // SystemTimer.sleep(lastLoopTime+10-SystemTimer.getTime()); @@ -556,8 +528,7 @@ public class Game { } /** - * The entry point into the game. We'll simply create an - * instance of class which will start the display and game + * The entry point into the game. We'll simply create an instance of class which will start the display and game * loop. * * @param argv The arguments that are passed into our game @@ -577,8 +548,7 @@ public class Game { } /** - * Create or get a sprite which displays the image that is pointed - * to in the classpath by "ref" + * Create or get a sprite which displays the image that is pointed to in the classpath by "ref" * * @param ref A reference to the image to load * @return A sprite that can be drawn onto the current graphics context. diff --git a/src/main/java/org/lwjglx/test/spaceinvaders/ShipEntity.java b/src/main/java/org/lwjglx/test/spaceinvaders/ShipEntity.java index 806533a..251f4dc 100644 --- a/src/main/java/org/lwjglx/test/spaceinvaders/ShipEntity.java +++ b/src/main/java/org/lwjglx/test/spaceinvaders/ShipEntity.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.test.spaceinvaders; @@ -52,9 +36,9 @@ public class ShipEntity extends Entity { * Create a new entity to represent the players ship * * @param game The game in which the ship is being created - * @param ref The reference to the sprite to show for the ship - * @param x The initial x location of the player's ship - * @param y The initial y location of the player's ship + * @param ref The reference to the sprite to show for the ship + * @param x The initial x location of the player's ship + * @param y The initial y location of the player's ship */ public ShipEntity(Game game, String ref, int x, int y) { super(game.getSprite(ref), x, y); @@ -63,8 +47,7 @@ public class ShipEntity extends Entity { } /** - * Request that the ship move itself based on an elapsed ammount of - * time + * Request that the ship move itself based on an elapsed ammount of time * * @param delta The time that has elapsed since last move (ms) */ diff --git a/src/main/java/org/lwjglx/test/spaceinvaders/ShotEntity.java b/src/main/java/org/lwjglx/test/spaceinvaders/ShotEntity.java index 849f919..3262009 100644 --- a/src/main/java/org/lwjglx/test/spaceinvaders/ShotEntity.java +++ b/src/main/java/org/lwjglx/test/spaceinvaders/ShotEntity.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.test.spaceinvaders; @@ -54,10 +38,10 @@ public class ShotEntity extends Entity { /** * Create a new shot from the player * - * @param game The game in which the shot has been created + * @param game The game in which the shot has been created * @param sprite The sprite representing this shot - * @param x The initial x location of the shot - * @param y The initial y location of the shot + * @param x The initial x location of the shot + * @param y The initial y location of the shot */ public ShotEntity(Game game, String sprite, int x, int y) { super(game.getSprite(sprite), x, y); @@ -94,8 +78,7 @@ public class ShotEntity extends Entity { } /** - * Notification that this shot has collided with another - * entity + * Notification that this shot has collided with another entity * * @param other The other entity with which we've collided */ diff --git a/src/main/java/org/lwjglx/test/spaceinvaders/SoundManager.java b/src/main/java/org/lwjglx/test/spaceinvaders/SoundManager.java index 457506d..8e60fd1 100644 --- a/src/main/java/org/lwjglx/test/spaceinvaders/SoundManager.java +++ b/src/main/java/org/lwjglx/test/spaceinvaders/SoundManager.java @@ -1,37 +1,22 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.test.spaceinvaders; import java.nio.IntBuffer; + import org.lwjglx.BufferUtils; import org.lwjglx.LWJGLException; import org.lwjglx.openal.AL; @@ -40,17 +25,16 @@ import org.lwjglx.util.WaveData; /** *

    - * Simple sound manager for OpenAL using n sources accessed in - * a round robin schedule. Source n is reserved for a single buffer and checking for - * whether it's playing. + * Simple sound manager for OpenAL using n sources accessed in a round robin schedule. Source n is reserved for a single + * buffer and checking for whether it's playing. *

    + * * @author Brian Matzon - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public class SoundManager { - /** We support at most 256 buffers*/ + /** We support at most 256 buffers */ private int[] buffers = new int[256]; /** Number of sources is limited tby user (and hardware) */ @@ -75,6 +59,7 @@ public class SoundManager { /** * Plays a sound effect + * * @param buffer Buffer index to play gotten from addSound */ public void playEffect(int buffer) { @@ -90,6 +75,7 @@ public class SoundManager { /** * Plays a sound on last source + * * @param buffer Buffer index to play gotten from addSound */ public void playSound(int buffer) { @@ -101,6 +87,7 @@ public class SoundManager { /** * Whether a sound is playing on last source + * * @return true if a source is playing right now on source n */ public boolean isPlayingSound() { diff --git a/src/main/java/org/lwjglx/test/spaceinvaders/Sprite.java b/src/main/java/org/lwjglx/test/spaceinvaders/Sprite.java index e1f19ea..1502b8a 100644 --- a/src/main/java/org/lwjglx/test/spaceinvaders/Sprite.java +++ b/src/main/java/org/lwjglx/test/spaceinvaders/Sprite.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.test.spaceinvaders; @@ -36,8 +20,7 @@ import static org.lwjgl.opengl.GL11.*; import java.io.IOException; /** - * Implementation of sprite that uses an OpenGL quad and a texture - * to render a given image to the screen. + * Implementation of sprite that uses an OpenGL quad and a texture to render a given image to the screen. * * @author Kevin Glass * @author Brian Matzon @@ -57,7 +40,7 @@ public class Sprite { * Create a new sprite from a specified image. * * @param loader the texture loader to use - * @param ref A reference to the image on which this sprite should be based + * @param ref A reference to the image on which this sprite should be based */ public Sprite(TextureLoader loader, String ref) { try { diff --git a/src/main/java/org/lwjglx/test/spaceinvaders/Texture.java b/src/main/java/org/lwjglx/test/spaceinvaders/Texture.java index f732fea..6c21de2 100644 --- a/src/main/java/org/lwjglx/test/spaceinvaders/Texture.java +++ b/src/main/java/org/lwjglx/test/spaceinvaders/Texture.java @@ -1,47 +1,28 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.test.spaceinvaders; import static org.lwjgl.opengl.GL11.*; /** - * A texture to be bound within OpenGL. This object is responsible for - * keeping track of a given OpenGL texture and for calculating the - * texturing mapping coordinates of the full image. + * A texture to be bound within OpenGL. This object is responsible for keeping track of a given OpenGL texture and for + * calculating the texturing mapping coordinates of the full image. * - * Since textures need to be powers of 2 the actual texture may be - * considerably bigged that the source image and hence the texture - * mapping coordinates need to be adjusted to matchup drawing the - * sprite against the texture. + * Since textures need to be powers of 2 the actual texture may be considerably bigged that the source image and hence + * the texture mapping coordinates need to be adjusted to matchup drawing the sprite against the texture. * * @author Kevin Glass * @author Brian Matzon @@ -75,7 +56,7 @@ public class Texture { /** * Create a new texture * - * @param target The GL target + * @param target The GL target * @param textureID The GL texture ID */ public Texture(int target, int textureID) { @@ -167,8 +148,7 @@ public class Texture { } /** - * Set the height of the texture. This will update the - * ratio also. + * Set the height of the texture. This will update the ratio also. */ private void setHeight() { if (texHeight != 0) { @@ -177,8 +157,7 @@ public class Texture { } /** - * Set the width of the texture. This will update the - * ratio also. + * Set the width of the texture. This will update the ratio also. */ private void setWidth() { if (texWidth != 0) { diff --git a/src/main/java/org/lwjglx/test/spaceinvaders/TextureLoader.java b/src/main/java/org/lwjglx/test/spaceinvaders/TextureLoader.java index d8c070c..b125ee1 100644 --- a/src/main/java/org/lwjglx/test/spaceinvaders/TextureLoader.java +++ b/src/main/java/org/lwjglx/test/spaceinvaders/TextureLoader.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.test.spaceinvaders; @@ -51,23 +35,24 @@ import java.nio.ByteOrder; import java.nio.IntBuffer; import java.util.HashMap; import java.util.Hashtable; + import javax.swing.ImageIcon; + import org.lwjglx.BufferUtils; /** - * A utility class to load textures for OpenGL. This source is based - * on a texture that can be found in the Java Gaming (www.javagaming.org) - * Wiki. It has been simplified slightly for explicit 2D graphics use. + * A utility class to load textures for OpenGL. This source is based on a texture that can be found in the Java Gaming + * (www.javagaming.org) Wiki. It has been simplified slightly for explicit 2D graphics use. * - * OpenGL uses a particular image format. Since the images that are - * loaded from disk may not match this format this loader introduces - * a intermediate image which the source image is copied into. In turn, - * this image is used as source for the OpenGL texture. + * OpenGL uses a particular image format. Since the images that are loaded from disk may not match this format this + * loader introduces a intermediate image which the source image is copied into. In turn, this image is used as source + * for the OpenGL texture. * * @author Kevin Glass * @author Brian Matzon */ public class TextureLoader { + /** The table of textures that have been loaded in this loader */ private HashMap table = new HashMap<>(); @@ -86,7 +71,7 @@ public class TextureLoader { public TextureLoader() { glAlphaColorModel = new ComponentColorModel( ColorSpace.getInstance(ColorSpace.CS_sRGB), - new int[] {8, 8, 8, 8}, + new int[] { 8, 8, 8, 8 }, true, false, ComponentColorModel.TRANSLUCENT, @@ -94,7 +79,7 @@ public class TextureLoader { glColorModel = new ComponentColorModel( ColorSpace.getInstance(ColorSpace.CS_sRGB), - new int[] {8, 8, 8, 0}, + new int[] { 8, 8, 8, 0 }, false, false, ComponentColorModel.OPAQUE, @@ -138,14 +123,13 @@ public class TextureLoader { } /** - * Load a texture into OpenGL from a image reference on - * disk. + * Load a texture into OpenGL from a image reference on disk. * - * @param resourceName The location of the resource to load - * @param target The GL target to load the texture against + * @param resourceName The location of the resource to load + * @param target The GL target to load the texture against * @param dstPixelFormat The pixel format of the screen - * @param minFilter The minimising filter - * @param magFilter The magnification filter + * @param minFilter The minimising filter + * @param magFilter The magnification filter * @return The loaded texture * @throws IOException Indicates a failure to access the resource */ @@ -211,7 +195,7 @@ public class TextureLoader { * Convert the buffered image to a texture * * @param bufferedImage The image to convert to a texture - * @param texture The texture to store the data into + * @param texture The texture to store the data into * @return A buffer containing the data */ private ByteBuffer convertImageData(BufferedImage bufferedImage, Texture texture) { @@ -280,8 +264,10 @@ public class TextureLoader { // we are now using good oldfashioned ImageIcon to load // images and the paint it on top of a new BufferedImage Image img = new ImageIcon(url).getImage(); - BufferedImage bufferedImage = - new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_RGB); + BufferedImage bufferedImage = new BufferedImage( + img.getWidth(null), + img.getHeight(null), + BufferedImage.TYPE_INT_RGB); Graphics g = bufferedImage.getGraphics(); g.drawImage(img, 0, 0, null); g.dispose(); diff --git a/src/main/java/org/lwjglx/util/Color.java b/src/main/java/org/lwjglx/util/Color.java index 721c5f0..91641d4 100644 --- a/src/main/java/org/lwjglx/util/Color.java +++ b/src/main/java/org/lwjglx/util/Color.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; @@ -36,9 +20,9 @@ import java.nio.ByteBuffer; /** * A mutable Color class + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public final class Color implements ReadableColor, Serializable, WritableColor { @@ -218,8 +202,7 @@ public final class Color implements ReadableColor, Serializable, WritableColor { * Equals */ public boolean equals(Object o) { - return (o != null) - && (o instanceof ReadableColor) + return (o != null) && (o instanceof ReadableColor) && (((ReadableColor) o).getRed() == this.getRed()) && (((ReadableColor) o).getGreen() == this.getGreen()) && (((ReadableColor) o).getBlue() == this.getBlue()) @@ -233,35 +216,40 @@ public final class Color implements ReadableColor, Serializable, WritableColor { return (red << 24) | (green << 16) | (blue << 8) | alpha; } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableColor#getAlphaByte() */ public byte getAlphaByte() { return alpha; } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableColor#getBlueByte() */ public byte getBlueByte() { return blue; } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableColor#getGreenByte() */ public byte getGreenByte() { return green; } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableColor#getRedByte() */ public byte getRedByte() { return red; } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableColor#writeRGBA(java.nio.ByteBuffer) */ public void writeRGBA(ByteBuffer dest) { @@ -271,7 +259,8 @@ public final class Color implements ReadableColor, Serializable, WritableColor { dest.put(alpha); } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableColor#writeRGB(java.nio.ByteBuffer) */ public void writeRGB(ByteBuffer dest) { @@ -280,7 +269,8 @@ public final class Color implements ReadableColor, Serializable, WritableColor { dest.put(blue); } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableColor#writeABGR(java.nio.ByteBuffer) */ public void writeABGR(ByteBuffer dest) { @@ -290,7 +280,8 @@ public final class Color implements ReadableColor, Serializable, WritableColor { dest.put(red); } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableColor#writeARGB(java.nio.ByteBuffer) */ public void writeARGB(ByteBuffer dest) { @@ -300,7 +291,8 @@ public final class Color implements ReadableColor, Serializable, WritableColor { dest.put(blue); } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableColor#writeBGR(java.nio.ByteBuffer) */ public void writeBGR(ByteBuffer dest) { @@ -309,7 +301,8 @@ public final class Color implements ReadableColor, Serializable, WritableColor { dest.put(red); } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableColor#writeBGRA(java.nio.ByteBuffer) */ public void writeBGRA(ByteBuffer dest) { @@ -321,6 +314,7 @@ public final class Color implements ReadableColor, Serializable, WritableColor { /** * Read a color from a byte buffer + * * @param src The source buffer */ public void readRGBA(ByteBuffer src) { @@ -332,6 +326,7 @@ public final class Color implements ReadableColor, Serializable, WritableColor { /** * Read a color from a byte buffer + * * @param src The source buffer */ public void readRGB(ByteBuffer src) { @@ -342,6 +337,7 @@ public final class Color implements ReadableColor, Serializable, WritableColor { /** * Read a color from a byte buffer + * * @param src The source buffer */ public void readARGB(ByteBuffer src) { @@ -353,6 +349,7 @@ public final class Color implements ReadableColor, Serializable, WritableColor { /** * Read a color from a byte buffer + * * @param src The source buffer */ public void readBGRA(ByteBuffer src) { @@ -364,6 +361,7 @@ public final class Color implements ReadableColor, Serializable, WritableColor { /** * Read a color from a byte buffer + * * @param src The source buffer */ public void readBGR(ByteBuffer src) { @@ -374,6 +372,7 @@ public final class Color implements ReadableColor, Serializable, WritableColor { /** * Read a color from a byte buffer + * * @param src The source buffer */ public void readABGR(ByteBuffer src) { @@ -385,6 +384,7 @@ public final class Color implements ReadableColor, Serializable, WritableColor { /** * Set this color's color by copying another color + * * @param src The source color */ public void setColor(ReadableColor src) { @@ -396,7 +396,8 @@ public final class Color implements ReadableColor, Serializable, WritableColor { /** * HSB to RGB conversion, pinched from java.awt.Color. - * @param hue (0..1.0f) + * + * @param hue (0..1.0f) * @param saturation (0..1.0f) * @param brightness (0..1.0f) */ @@ -445,9 +446,9 @@ public final class Color implements ReadableColor, Serializable, WritableColor { } /** - * RGB to HSB conversion, pinched from java.awt.Color. - * The HSB value is returned in dest[] if dest[] is supplied. + * RGB to HSB conversion, pinched from java.awt.Color. The HSB value is returned in dest[] if dest[] is supplied. * Values range from 0..1 + * * @param dest Destination floats, or null * @return dest, or a new float array */ diff --git a/src/main/java/org/lwjglx/util/Dimension.java b/src/main/java/org/lwjglx/util/Dimension.java index db98c7d..b5499ee 100644 --- a/src/main/java/org/lwjglx/util/Dimension.java +++ b/src/main/java/org/lwjglx/util/Dimension.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; @@ -35,9 +19,9 @@ import java.io.Serializable; /** * A 2D integer Dimension class, which looks remarkably like an AWT one. + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public final class Dimension implements Serializable, ReadableDimension, WritableDimension { @@ -78,7 +62,8 @@ public final class Dimension implements Serializable, ReadableDimension, Writabl this.height = d.getHeight(); } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableDimension#getSize(com.shavenpuppy.jglib.Dimension) */ public void getSize(WritableDimension dest) { @@ -99,7 +84,7 @@ public final class Dimension implements Serializable, ReadableDimension, Writabl /** * Returns the hash code for this Dimension. * - * @return a hash code for this Dimension + * @return a hash code for this Dimension */ public int hashCode() { int sum = width + height; @@ -107,15 +92,12 @@ public final class Dimension implements Serializable, ReadableDimension, Writabl } /** - * Returns a string representation of the values of this - * Dimension object's height and - * width fields. This method is intended to be used only - * for debugging purposes, and the content and format of the returned - * string may vary between implementations. The returned string may be - * empty but may not be null. + * Returns a string representation of the values of this Dimension object's height and + * width fields. This method is intended to be used only for debugging purposes, and the content and + * format of the returned string may vary between implementations. The returned string may be empty but may not be + * null. * - * @return a string representation of this Dimension - * object + * @return a string representation of this Dimension object */ public String toString() { return getClass().getName() + "[width=" + width + ",height=" + height + "]"; @@ -123,6 +105,7 @@ public final class Dimension implements Serializable, ReadableDimension, Writabl /** * Gets the height. + * * @return Returns a int */ public int getHeight() { @@ -131,6 +114,7 @@ public final class Dimension implements Serializable, ReadableDimension, Writabl /** * Sets the height. + * * @param height The height to set */ public void setHeight(int height) { @@ -139,6 +123,7 @@ public final class Dimension implements Serializable, ReadableDimension, Writabl /** * Gets the width. + * * @return Returns a int */ public int getWidth() { @@ -147,6 +132,7 @@ public final class Dimension implements Serializable, ReadableDimension, Writabl /** * Sets the width. + * * @param width The width to set */ public void setWidth(int width) { diff --git a/src/main/java/org/lwjglx/util/Display.java b/src/main/java/org/lwjglx/util/Display.java index dc9214a..41e5876 100644 --- a/src/main/java/org/lwjglx/util/Display.java +++ b/src/main/java/org/lwjglx/util/Display.java @@ -1,71 +1,54 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; + import org.lwjglx.LWJGLException; import org.lwjglx.LWJGLUtil; import org.lwjglx.opengl.DisplayMode; /** - * Display initialization utility, that can be used to find display modes and pick - * one for you based on your criteria. + * Display initialization utility, that can be used to find display modes and pick one for you based on your criteria. + * * @author $Author: spasi $ - * @version $Revision: 3418 $ - * $Id: Display.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Display.java 3418 2010-09-28 21:11:35Z spasi $ */ public final class Display { private static final boolean DEBUG = false; /** - * Determine the available display modes that match the specified minimum and maximum criteria. - * If any given criterium is specified as -1 then it is ignored. + * Determine the available display modes that match the specified minimum and maximum criteria. If any given + * criterium is specified as -1 then it is ignored. * - * @param minWidth the minimum display resolution in pixels + * @param minWidth the minimum display resolution in pixels * @param minHeight the minimum display resolution in pixels - * @param maxWidth the maximum display resolution in pixels + * @param maxWidth the maximum display resolution in pixels * @param maxHeight the maximum display resolution in pixels - * @param minBPP the minimum bit depth per pixel - * @param maxBPP the maximum bit depth per pixel - * @param minFreq the minimum display frequency in Hz - * @param maxFreq the maximum display frequency in Hz + * @param minBPP the minimum bit depth per pixel + * @param maxBPP the maximum bit depth per pixel + * @param minFreq the minimum display frequency in Hz + * @param maxFreq the maximum display frequency in Hz * @return an array of matching display modes */ - public static DisplayMode[] getAvailableDisplayModes( - int minWidth, int minHeight, int maxWidth, int maxHeight, int minBPP, int maxBPP, int minFreq, int maxFreq) - throws LWJGLException { + public static DisplayMode[] getAvailableDisplayModes(int minWidth, int minHeight, int maxWidth, int maxHeight, + int minBPP, int maxBPP, int minFreq, int maxFreq) throws LWJGLException { // First get the available display modes DisplayMode[] modes = org.lwjglx.opengl.Display.getAvailableDisplayModes(); @@ -87,7 +70,7 @@ public final class Display { if (minBPP != -1 && modes[i].getBitsPerPixel() < minBPP) continue; if (maxBPP != -1 && modes[i].getBitsPerPixel() > maxBPP) continue; // if (modes[i].bpp == 24) - // continue; + // continue; if (modes[i].getFrequency() != 0) { if (minFreq != -1 && modes[i].getFrequency() < minFreq) continue; if (maxFreq != -1 && modes[i].getFrequency() > maxFreq) continue; @@ -108,21 +91,23 @@ public final class Display { } /** - * Create the display by choosing from a list of display modes based on an order of preference. - * You must supply a list of allowable display modes, probably by calling getAvailableDisplayModes(), - * and an array with the order in which you would like them sorted in descending order. - * This method attempts to create the topmost display mode; if that fails, it will try the next one, - * and so on, until there are no modes left. If no mode is set at the end, an exception is thrown. - * @param dm a list of display modes to choose from + * Create the display by choosing from a list of display modes based on an order of preference. You must supply a + * list of allowable display modes, probably by calling getAvailableDisplayModes(), and an array with the order in + * which you would like them sorted in descending order. This method attempts to create the topmost display mode; if + * that fails, it will try the next one, and so on, until there are no modes left. If no mode is set at the end, an + * exception is thrown. + * + * @param dm a list of display modes to choose from * @param param the names of the DisplayMode fields in the order in which you would like them sorted. * @return the chosen display mode * @throws NoSuchFieldException if one of the params is not a field in DisplayMode - * @throws Exception if no display mode could be set + * @throws Exception if no display mode could be set * @see org.lwjgl.opengl.DisplayMode */ public static DisplayMode setDisplayMode(DisplayMode[] dm, final String[] param) throws Exception { class FieldAccessor { + final String fieldName; final int order; final int preferred; diff --git a/src/main/java/org/lwjglx/util/Point.java b/src/main/java/org/lwjglx/util/Point.java index f56b3a8..e5c39e2 100644 --- a/src/main/java/org/lwjglx/util/Point.java +++ b/src/main/java/org/lwjglx/util/Point.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; @@ -35,9 +19,9 @@ import java.io.Serializable; /** * A 2D integer point class, which looks remarkably like an AWT one. + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public final class Point implements ReadablePoint, WritablePoint, Serializable { @@ -87,6 +71,7 @@ public final class Point implements ReadablePoint, WritablePoint, Serializable { /** * Translate a point. + * * @param dx The translation to apply * @param dy The translation to apply */ @@ -97,6 +82,7 @@ public final class Point implements ReadablePoint, WritablePoint, Serializable { /** * Translate a point. + * * @param p The translation to apply */ public void translate(ReadablePoint p) { @@ -106,6 +92,7 @@ public final class Point implements ReadablePoint, WritablePoint, Serializable { /** * Un-translate a point. + * * @param p The translation to apply */ public void untranslate(ReadablePoint p) { @@ -114,15 +101,13 @@ public final class Point implements ReadablePoint, WritablePoint, Serializable { } /** - * Determines whether an instance of Point2D is equal - * to this point. Two instances of Point2D are equal if - * the values of their x and y member - * fields, representing their position in the coordinate space, are - * the same. - * @param obj an object to be compared with this point - * @return true if the object to be compared is - * an instance of Point and has - * the same values; false otherwise + * Determines whether an instance of Point2D is equal to this point. Two instances of + * Point2D are equal if the values of their x and y member fields, + * representing their position in the coordinate space, are the same. + * + * @param obj an object to be compared with this point + * @return true if the object to be compared is an instance of Point and has the same + * values; false otherwise */ public boolean equals(Object obj) { if (obj instanceof Point) { @@ -133,13 +118,11 @@ public final class Point implements ReadablePoint, WritablePoint, Serializable { } /** - * Returns a string representation of this point and its location - * in the (x, y) coordinate space. This method is - * intended to be used only for debugging purposes, and the content - * and format of the returned string may vary between implementations. - * The returned string may be empty but may not be null. + * Returns a string representation of this point and its location in the (x, y) coordinate space. + * This method is intended to be used only for debugging purposes, and the content and format of the returned string + * may vary between implementations. The returned string may be empty but may not be null. * - * @return a string representation of this point + * @return a string representation of this point */ public String toString() { return getClass().getName() + "[x=" + x + ",y=" + y + "]"; @@ -148,7 +131,7 @@ public final class Point implements ReadablePoint, WritablePoint, Serializable { /** * Returns the hash code for this Point. * - * @return a hash code for this Point + * @return a hash code for this Point */ public int hashCode() { int sum = x + y; diff --git a/src/main/java/org/lwjglx/util/ReadableColor.java b/src/main/java/org/lwjglx/util/ReadableColor.java index e4a975a..a5a20a5 100644 --- a/src/main/java/org/lwjglx/util/ReadableColor.java +++ b/src/main/java/org/lwjglx/util/ReadableColor.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; @@ -35,92 +19,106 @@ import java.nio.ByteBuffer; /** * Readonly interface for Colors + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public interface ReadableColor { /** * Return the red component (0..255) + * * @return int */ int getRed(); /** * Return the red component (0..255) + * * @return int */ int getGreen(); /** * Return the red component (0..255) + * * @return int */ int getBlue(); /** * Return the red component (0..255) + * * @return int */ int getAlpha(); /** * Return the red component + * * @return int */ byte getRedByte(); /** * Return the red component + * * @return int */ byte getGreenByte(); /** * Return the red component + * * @return int */ byte getBlueByte(); /** * Return the red component + * * @return int */ byte getAlphaByte(); /** * Write the RGBA color directly out to a ByteBuffer + * * @param dest the buffer to write to */ void writeRGBA(ByteBuffer dest); /** * Write the RGB color directly out to a ByteBuffer + * * @param dest the buffer to write to */ void writeRGB(ByteBuffer dest); /** * Write the ABGR color directly out to a ByteBuffer + * * @param dest the buffer to write to */ void writeABGR(ByteBuffer dest); /** * Write the BGR color directly out to a ByteBuffer + * * @param dest the buffer to write to */ void writeBGR(ByteBuffer dest); /** * Write the BGRA color directly out to a ByteBuffer + * * @param dest the buffer to write to */ void writeBGRA(ByteBuffer dest); /** * Write the ARGB color directly out to a ByteBuffer + * * @param dest the buffer to write to */ void writeARGB(ByteBuffer dest); diff --git a/src/main/java/org/lwjglx/util/ReadableDimension.java b/src/main/java/org/lwjglx/util/ReadableDimension.java index a5b0a5a..eaa5165 100644 --- a/src/main/java/org/lwjglx/util/ReadableDimension.java +++ b/src/main/java/org/lwjglx/util/ReadableDimension.java @@ -1,58 +1,45 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; /** * Readonly interface for Dimensions + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public interface ReadableDimension { /** * Get the width + * * @return int */ int getWidth(); /** * Get the height + * * @return int */ int getHeight(); /** * Copy this ReadableDimension into a destination Dimension + * * @param dest The destination */ void getSize(WritableDimension dest); diff --git a/src/main/java/org/lwjglx/util/ReadablePoint.java b/src/main/java/org/lwjglx/util/ReadablePoint.java index c872413..aedb59e 100644 --- a/src/main/java/org/lwjglx/util/ReadablePoint.java +++ b/src/main/java/org/lwjglx/util/ReadablePoint.java @@ -1,41 +1,25 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; /** * Readonly interface for Points + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public interface ReadablePoint { @@ -51,6 +35,7 @@ public interface ReadablePoint { /** * Copy this ReadablePoint into a destination Point + * * @param dest The destination Point, or null, to create a new Point */ void getLocation(WritablePoint dest); diff --git a/src/main/java/org/lwjglx/util/ReadableRectangle.java b/src/main/java/org/lwjglx/util/ReadableRectangle.java index e290fca..7337b7f 100644 --- a/src/main/java/org/lwjglx/util/ReadableRectangle.java +++ b/src/main/java/org/lwjglx/util/ReadableRectangle.java @@ -1,46 +1,31 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; /** * Readonly interface for Rectangles + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public interface ReadableRectangle extends ReadableDimension, ReadablePoint { /** * Copy this readable rectangle's bounds into a destination Rectangle + * * @param dest The destination Rectangle, or null, to create a new Rectangle */ void getBounds(WritableRectangle dest); diff --git a/src/main/java/org/lwjglx/util/Rectangle.java b/src/main/java/org/lwjglx/util/Rectangle.java index 03d3713..d88f16b 100644 --- a/src/main/java/org/lwjglx/util/Rectangle.java +++ b/src/main/java/org/lwjglx/util/Rectangle.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; @@ -35,9 +19,9 @@ import java.io.Serializable; /** * A 2D integer Rectangle class which looks remarkably like an AWT one. + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public final class Rectangle implements ReadableRectangle, WritableRectangle, Serializable { @@ -52,6 +36,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se public Rectangle() { super(); } + /** * Constructor for Rectangle. */ @@ -61,6 +46,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se this.width = w; this.height = h; } + /** * Constructor for Rectangle. */ @@ -70,6 +56,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se width = d.getWidth(); height = d.getHeight(); } + /** * Constructor for Rectangle. */ @@ -121,21 +108,24 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se height = r.getHeight(); } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableRectangle#getBounds(com.shavenpuppy.jglib.Rectangle) */ public void getBounds(WritableRectangle dest) { dest.setBounds(x, y, width, height); } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadablePoint#getLocation(com.shavenpuppy.jglib.Point) */ public void getLocation(WritablePoint dest) { dest.setLocation(x, y); } - /* (Overrides) + /* + * (Overrides) * @see com.shavenpuppy.jglib.ReadableDimension#getSize(com.shavenpuppy.jglib.Dimension) */ public void getSize(WritableDimension dest) { @@ -144,6 +134,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Translate the rectangle by an amount. + * * @param x The translation amount on the x axis * @param y The translation amount on the y axis */ @@ -154,6 +145,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Translate the rectangle by an amount. + * * @param point The translation amount */ public void translate(ReadablePoint point) { @@ -163,6 +155,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Un-translate the rectangle by an amount. + * * @param point The translation amount */ public void untranslate(ReadablePoint point) { @@ -171,28 +164,24 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se } /** - * Checks whether or not this Rectangle contains the - * specified Point. + * Checks whether or not this Rectangle contains the specified Point. + * * @param p the Point to test - * @return true if the Point - * (x, y) is inside this - * Rectangle; - * false otherwise. + * @return true if the Point (x, y) is inside this + * Rectangle; false otherwise. */ public boolean contains(ReadablePoint p) { return contains(p.getX(), p.getY()); } /** - * Checks whether or not this Rectangle contains the - * point at the specified location + * Checks whether or not this Rectangle contains the point at the specified location * (x, y). + * * @param X the specified x coordinate * @param Y the specified y coordinate - * @return true if the point - * (x, y) is inside this - * Rectangle; - * false otherwise. + * @return true if the point (x, y) is inside this Rectangle; + * false otherwise. */ public boolean contains(int X, int Y) { int w = this.width; @@ -209,35 +198,32 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se } w += x; h += y; - // overflow || intersect + // overflow || intersect return ((w < x || w > X) && (h < y || h > Y)); } /** - * Checks whether or not this Rectangle entirely contains - * the specified Rectangle. - * @param r the specified Rectangle - * @return true if the Rectangle - * is contained entirely inside this Rectangle; - * false otherwise. + * Checks whether or not this Rectangle entirely contains the specified Rectangle. + * + * @param r the specified Rectangle + * @return true if the Rectangle is contained entirely inside this Rectangle; + * false otherwise. */ public boolean contains(ReadableRectangle r) { return contains(r.getX(), r.getY(), r.getWidth(), r.getHeight()); } /** - * Checks whether this Rectangle entirely contains - * the Rectangle - * at the specified location (X, Y) with the - * specified dimensions (W, H). + * Checks whether this Rectangle entirely contains the Rectangle at the specified location + * (X, Y) with the specified dimensions (W, H). + * * @param X the specified x coordinate * @param Y the specified y coordinate - * @param W the width of the Rectangle - * @param H the height of the Rectangle - * @return true if the Rectangle specified by - * (X, Y, W, H) - * is entirely enclosed inside this Rectangle; - * false otherwise. + * @param W the width of the Rectangle + * @param H the height of the Rectangle + * @return true if the Rectangle specified by + * (X, Y, W, H) is entirely enclosed inside this + * Rectangle; false otherwise. */ public boolean contains(int X, int Y, int W, int H) { int w = this.width; @@ -277,14 +263,12 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se } /** - * Determines whether or not this Rectangle and the specified - * Rectangle intersect. Two rectangles intersect if - * their intersection is nonempty. + * Determines whether or not this Rectangle and the specified Rectangle intersect. Two + * rectangles intersect if their intersection is nonempty. * * @param r the specified Rectangle - * @return true if the specified Rectangle - * and this Rectangle intersect; - * false otherwise. + * @return true if the specified Rectangle and this Rectangle intersect; + * false otherwise. */ public boolean intersects(ReadableRectangle r) { int tw = this.width; @@ -302,22 +286,18 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se rh += ry; tw += tx; th += ty; - // overflow || intersect + // overflow || intersect return ((rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry)); } /** - * Computes the intersection of this Rectangle with the - * specified Rectangle. Returns a new Rectangle - * that represents the intersection of the two rectangles. - * If the two rectangles do not intersect, the result will be - * an empty rectangle. + * Computes the intersection of this Rectangle with the specified Rectangle. Returns a new + * Rectangle that represents the intersection of the two rectangles. If the two rectangles do not + * intersect, the result will be an empty rectangle. * - * @param r the specified Rectangle - * @return the largest Rectangle contained in both the - * specified Rectangle and in - * this Rectangle; or if the rectangles - * do not intersect, an empty rectangle. + * @param r the specified Rectangle + * @return the largest Rectangle contained in both the specified Rectangle and in this + * Rectangle; or if the rectangles do not intersect, an empty rectangle. */ public Rectangle intersection(ReadableRectangle r, Rectangle dest) { int tx1 = this.x; @@ -349,14 +329,12 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se } /** - * Computes the union of this Rectangle with the - * specified Rectangle. Returns a new - * Rectangle that - * represents the union of the two rectangles + * Computes the union of this Rectangle with the specified Rectangle. Returns a new + * Rectangle that represents the union of the two rectangles + * * @param r the specified Rectangle - * @return the smallest Rectangle containing both - * the specified Rectangle and this - * Rectangle. + * @return the smallest Rectangle containing both the specified Rectangle and this + * Rectangle. */ public WritableRectangle union(ReadableRectangle r, WritableRectangle dest) { int x1 = Math.min(x, r.getX()); @@ -368,20 +346,15 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se } /** - * Adds a point, specified by the integer arguments newx - * and newy, to this Rectangle. The - * resulting Rectangle is - * the smallest Rectangle that contains both the - * original Rectangle and the specified point. + * Adds a point, specified by the integer arguments newx and newy, to this + * Rectangle. The resulting Rectangle is the smallest Rectangle that contains + * both the original Rectangle and the specified point. *

    - * After adding a point, a call to contains with the - * added point as an argument does not necessarily return - * true. The contains method does not - * return true for points on the right or bottom - * edges of a Rectangle. Therefore, if the added point - * falls on the right or bottom edge of the enlarged - * Rectangle, contains returns - * false for that point. + * After adding a point, a call to contains with the added point as an argument does not necessarily + * return true. The contains method does not return true for points on the + * right or bottom edges of a Rectangle. Therefore, if the added point falls on the right or bottom + * edge of the enlarged Rectangle, contains returns false for that point. + * * @param newx the x coordinates of the new point * @param newy the y coordinates of the new point */ @@ -397,32 +370,27 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se } /** - * Adds the specified Point to this - * Rectangle. The resulting Rectangle - * is the smallest Rectangle that contains both the - * original Rectangle and the specified + * Adds the specified Point to this Rectangle. The resulting Rectangle is the + * smallest Rectangle that contains both the original Rectangle and the specified * Point. *

    - * After adding a Point, a call to contains - * with the added Point as an argument does not - * necessarily return true. The contains - * method does not return true for points on the right - * or bottom edges of a Rectangle. Therefore if the added - * Point falls on the right or bottom edge of the - * enlarged Rectangle, contains returns - * false for that Point. - * @param pt the new Point to add to this - * Rectangle + * After adding a Point, a call to contains with the added Point as an + * argument does not necessarily return true. The contains method does not return + * true for points on the right or bottom edges of a Rectangle. Therefore if the added + * Point falls on the right or bottom edge of the enlarged Rectangle, + * contains returns false for that Point. + * + * @param pt the new Point to add to this Rectangle */ public void add(ReadablePoint pt) { add(pt.getX(), pt.getY()); } /** - * Adds a Rectangle to this Rectangle. - * The resulting Rectangle is the union of the two - * rectangles. - * @param r the specified Rectangle + * Adds a Rectangle to this Rectangle. The resulting Rectangle is the union + * of the two rectangles. + * + * @param r the specified Rectangle */ public void add(ReadableRectangle r) { int x1 = Math.min(x, r.getX()); @@ -438,23 +406,17 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Resizes the Rectangle both horizontally and vertically. *

    - * This method modifies the Rectangle so that it is - * h units larger on both the left and right side, - * and v units larger at both the top and bottom. + * This method modifies the Rectangle so that it is h units larger on both the left and + * right side, and v units larger at both the top and bottom. *

    - * The new Rectangle has (x - h, - * y - v) as its top-left corner, a - * width of - * width + 2h, - * and a height of + * The new Rectangle has (x - h, y - v) as its top-left + * corner, a width of width + 2h, and a height of * height + 2v. *

    - * If negative values are supplied for h and - * v, the size of the Rectangle - * decreases accordingly. - * The grow method does not check whether the resulting - * values of width and height are - * non-negative. + * If negative values are supplied for h and v, the size of the Rectangle + * decreases accordingly. The grow method does not check whether the resulting values of + * width and height are non-negative. + * * @param h the horizontal expansion * @param v the vertical expansion */ @@ -466,25 +428,24 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se } /** - * Determines whether or not this Rectangle is empty. A - * Rectangle is empty if its width or its height is less - * than or equal to zero. - * @return true if this Rectangle is empty; - * false otherwise. + * Determines whether or not this Rectangle is empty. A Rectangle is empty if its width or + * its height is less than or equal to zero. + * + * @return true if this Rectangle is empty; false otherwise. */ public boolean isEmpty() { return (width <= 0) || (height <= 0); } + /** * Checks whether two rectangles are equal. *

    - * The result is true if and only if the argument is not - * null and is a Rectangle object that has the - * same top-left corner, width, and height as this Rectangle. - * @param obj the Object to compare with - * this Rectangle - * @return true if the objects are equal; - * false otherwise. + * The result is true if and only if the argument is not null and is a + * Rectangle object that has the same top-left corner, width, and height as this + * Rectangle. + * + * @param obj the Object to compare with this Rectangle + * @return true if the objects are equal; false otherwise. */ public boolean equals(Object obj) { if (obj instanceof Rectangle) { @@ -496,13 +457,16 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Debugging + * * @return a String */ public String toString() { return getClass().getName() + "[x=" + x + ",y=" + y + ",width=" + width + ",height=" + height + "]"; } + /** * Gets the height. + * * @return Returns a int */ public int getHeight() { @@ -511,6 +475,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Sets the height. + * * @param height The height to set */ public void setHeight(int height) { @@ -519,6 +484,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Gets the width. + * * @return Returns a int */ public int getWidth() { @@ -527,6 +493,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Sets the width. + * * @param width The width to set */ public void setWidth(int width) { @@ -535,6 +502,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Gets the x. + * * @return Returns a int */ public int getX() { @@ -543,6 +511,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Sets the x. + * * @param x The x to set */ public void setX(int x) { @@ -551,6 +520,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Gets the y. + * * @return Returns a int */ public int getY() { @@ -559,6 +529,7 @@ public final class Rectangle implements ReadableRectangle, WritableRectangle, Se /** * Sets the y. + * * @param y The y to set */ public void setY(int y) { diff --git a/src/main/java/org/lwjglx/util/Renderable.java b/src/main/java/org/lwjglx/util/Renderable.java index d31a3f4..20cc8f8 100644 --- a/src/main/java/org/lwjglx/util/Renderable.java +++ b/src/main/java/org/lwjglx/util/Renderable.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; @@ -36,8 +20,7 @@ package org.lwjglx.util; * Simple interface to things that can be Rendered. * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public interface Renderable { diff --git a/src/main/java/org/lwjglx/util/Timer.java b/src/main/java/org/lwjglx/util/Timer.java index 8593388..62f04be 100644 --- a/src/main/java/org/lwjglx/util/Timer.java +++ b/src/main/java/org/lwjglx/util/Timer.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; @@ -35,14 +19,12 @@ import org.lwjglx.Sys; /** * - * A hires timer. This measures time in seconds as floating point values. - * All Timers created are updated simultaneously by calling the static method - * tick(). This ensures that within a single iteration of a game loop that - * all timers are updated consistently with each other. + * A hires timer. This measures time in seconds as floating point values. All Timers created are updated simultaneously + * by calling the static method tick(). This ensures that within a single iteration of a game loop that all timers are + * updated consistently with each other. * * @author cix_foo - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public class Timer { @@ -87,6 +69,7 @@ public class Timer { return (float) ((double) lastTime / (double) resolution); } + /** * @return whether this timer is paused */ @@ -95,8 +78,7 @@ public class Timer { } /** - * Pause the timer. Whilst paused the time will not change for this timer - * when tick() is called. + * Pause the timer. Whilst paused the time will not change for this timer when tick() is called. * * @see #resume() */ @@ -106,6 +88,7 @@ public class Timer { /** * Reset the timer. Equivalent to set(0.0f); + * * @see #set(float) */ public void reset() { @@ -114,6 +97,7 @@ public class Timer { /** * Resume the timer. + * * @see #pause() */ public void resume() { @@ -123,6 +107,7 @@ public class Timer { /** * Set the time of this timer + * * @param newTime the new time, in seconds */ public void set(float newTime) { @@ -132,9 +117,8 @@ public class Timer { } /** - * Get the next time update from the system's hires timer. This method should - * be called once per main loop iteration; all timers are updated simultaneously - * from it. + * Get the next time update from the system's hires timer. This method should be called once per main loop + * iteration; all timers are updated simultaneously from it. */ public static void tick() { currentTime = Sys.getTime(); diff --git a/src/main/java/org/lwjglx/util/WaveData.java b/src/main/java/org/lwjglx/util/WaveData.java index 61be30d..baab30e 100644 --- a/src/main/java/org/lwjglx/util/WaveData.java +++ b/src/main/java/org/lwjglx/util/WaveData.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; @@ -39,9 +23,11 @@ import java.net.URL; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.ShortBuffer; + import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; + import org.lwjgl.openal.AL11; // import com.sun.media.sound.WaveFileReader; @@ -51,10 +37,10 @@ import org.lwjgl.openal.AL11; * Utitlity class for loading wavefiles. * * @author Brian Matzon - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public class WaveData { + /** actual wave data */ public final ByteBuffer data; @@ -67,8 +53,8 @@ public class WaveData { /** * Creates a new WaveData * - * @param data actual wavedata - * @param format format of wave data + * @param data actual wavedata + * @param format format of wave data * @param samplerate sample rate of data */ private WaveData(ByteBuffer data, int format, int samplerate) { @@ -145,9 +131,8 @@ public class WaveData { } /** - * Creates a WaveData container from the specified ByetBuffer. - * If the buffer is backed by an array, it will be used directly, - * else the contents of the buffer will be copied using get(byte[]). + * Creates a WaveData container from the specified ByetBuffer. If the buffer is backed by an array, it will be used + * directly, else the contents of the buffer will be copied using get(byte[]). * * @param buffer ByteBuffer containing sound file * @return WaveData containing data, or null if a failure occured @@ -206,8 +191,7 @@ public class WaveData { try { int available = ais.available(); if (available <= 0) { - available = ais.getFormat().getChannels() - * (int) ais.getFrameLength() + available = ais.getFormat().getChannels() * (int) ais.getFrameLength() * ais.getFormat().getSampleSizeInBits() / 8; } @@ -230,8 +214,7 @@ public class WaveData { // close stream try { ais.close(); - } catch (IOException ioe) { - } + } catch (IOException ioe) {} return wavedata; } diff --git a/src/main/java/org/lwjglx/util/WritableColor.java b/src/main/java/org/lwjglx/util/WritableColor.java index b576f3c..24f2fc1 100644 --- a/src/main/java/org/lwjglx/util/WritableColor.java +++ b/src/main/java/org/lwjglx/util/WritableColor.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; @@ -35,91 +19,117 @@ import java.nio.ByteBuffer; /** * Write interface for Colors + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public interface WritableColor { + /** * Set a color */ void set(int r, int g, int b, int a); + /** * Set a color */ void set(byte r, byte g, byte b, byte a); + /** * Set a color */ void set(int r, int g, int b); + /** * Set a color */ void set(byte r, byte g, byte b); + /** * Set the Red component */ void setRed(int red); + /** * Set the Green component */ void setGreen(int green); + /** * Set the Blue component */ void setBlue(int blue); + /** * Set the Alpha component */ void setAlpha(int alpha); + /** * Set the Red component */ void setRed(byte red); + /** * Set the Green component */ void setGreen(byte green); + /** * Set the Blue component */ void setBlue(byte blue); + /** * Set the Alpha component */ void setAlpha(byte alpha); + /** * Read a color from a byte buffer + * * @param src The source buffer */ void readRGBA(ByteBuffer src); + /** * Read a color from a byte buffer + * * @param src The source buffer */ void readRGB(ByteBuffer src); + /** * Read a color from a byte buffer + * * @param src The source buffer */ void readARGB(ByteBuffer src); + /** * Read a color from a byte buffer + * * @param src The source buffer */ void readBGRA(ByteBuffer src); + /** * Read a color from a byte buffer + * * @param src The source buffer */ void readBGR(ByteBuffer src); + /** * Read a color from a byte buffer + * * @param src The source buffer */ void readABGR(ByteBuffer src); + /** * Set this color's color by copying another color + * * @param src The source color */ void setColor(ReadableColor src); diff --git a/src/main/java/org/lwjglx/util/WritableDimension.java b/src/main/java/org/lwjglx/util/WritableDimension.java index 837d922..133ccfd 100644 --- a/src/main/java/org/lwjglx/util/WritableDimension.java +++ b/src/main/java/org/lwjglx/util/WritableDimension.java @@ -1,54 +1,43 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; /** * Write interface for Dimensions + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ * */ public interface WritableDimension { + void setSize(int w, int h); void setSize(ReadableDimension d); + /** * Sets the height. + * * @param height The height to set */ void setHeight(int height); + /** * Sets the width. + * * @param width The width to set */ void setWidth(int width); diff --git a/src/main/java/org/lwjglx/util/WritablePoint.java b/src/main/java/org/lwjglx/util/WritablePoint.java index 2841867..086d1b0 100644 --- a/src/main/java/org/lwjglx/util/WritablePoint.java +++ b/src/main/java/org/lwjglx/util/WritablePoint.java @@ -1,43 +1,28 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; /** * Write interface for Points + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public interface WritablePoint { + void setLocation(int x, int y); void setLocation(ReadablePoint p); diff --git a/src/main/java/org/lwjglx/util/WritableRectangle.java b/src/main/java/org/lwjglx/util/WritableRectangle.java index 98a0781..a2b2250 100644 --- a/src/main/java/org/lwjglx/util/WritableRectangle.java +++ b/src/main/java/org/lwjglx/util/WritableRectangle.java @@ -1,55 +1,41 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; /** * Write interface for Rectangles + * * @author $Author$ - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public interface WritableRectangle extends WritablePoint, WritableDimension { /** * Sets the bounds of the rectangle - * @param x Position of rectangle on x axis - * @param y Position of rectangle on y axis - * @param width Width of rectangle + * + * @param x Position of rectangle on x axis + * @param y Position of rectangle on y axis + * @param width Width of rectangle * @param height Height of rectangle */ void setBounds(int x, int y, int width, int height); /** * Sets the bounds of the rectangle + * * @param location * @param size */ @@ -57,6 +43,7 @@ public interface WritableRectangle extends WritablePoint, WritableDimension { /** * Sets the bounds of the rectangle + * * @param src */ void setBounds(ReadableRectangle src); diff --git a/src/main/java/org/lwjglx/util/XPMFile.java b/src/main/java/org/lwjglx/util/XPMFile.java index cfddeff..7a2af27 100644 --- a/src/main/java/org/lwjglx/util/XPMFile.java +++ b/src/main/java/org/lwjglx/util/XPMFile.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util; @@ -49,8 +33,7 @@ import java.util.StringTokenizer; * * @author Brian Matzon * @author Jos Hirth - * @version $Revision$ - * $Id$ + * @version $Revision$ $Id$ */ public class XPMFile { @@ -75,11 +58,9 @@ public class XPMFile { /** * Loads the XPM file * - * @param file - * path to file + * @param file path to file * @return XPMFile loaded, or exception - * @throws IOException - * If any IO exceptions occurs while reading file + * @throws IOException If any IO exceptions occurs while reading file */ public static XPMFile load(String file) throws IOException { return load(new FileInputStream(new File(file))); @@ -88,8 +69,7 @@ public class XPMFile { /** * Loads the XPM file * - * @param is - * InputStream to read file from + * @param is InputStream to read file from * @return XPMFile loaded, or exception */ public static XPMFile load(InputStream is) { @@ -149,11 +129,9 @@ public class XPMFile { /** * Finds the next interesting line of text. * - * @param reader - * The LineNumberReader to read from + * @param reader The LineNumberReader to read from * @return The next interesting String (with stripped quotes) - * @throws IOException - * If any IO exceptions occurs while reading file + * @throws IOException If any IO exceptions occurs while reading file */ private static String nextLineOfInterest(LineNumberReader reader) throws IOException { String ret; @@ -167,8 +145,7 @@ public class XPMFile { /** * Parses the format of the xpm file given a format string * - * @param format - * String to parse + * @param format String to parse * @return Array specifying width, height, colors, characters per pixel */ private static int[] parseFormat(String format) { @@ -178,20 +155,17 @@ public class XPMFile { // tokenize it StringTokenizer st = new StringTokenizer(format); - return new int[] { - Integer.parseInt(st.nextToken()), /* width */ - Integer.parseInt(st.nextToken()), /* height */ - Integer.parseInt(st.nextToken()), /* colors */ - Integer.parseInt(st.nextToken()) /* chars per pixel */ + return new int[] { Integer.parseInt(st.nextToken()), /* width */ + Integer.parseInt(st.nextToken()), /* height */ + Integer.parseInt(st.nextToken()), /* colors */ + Integer.parseInt(st.nextToken()) /* chars per pixel */ }; } /** - * Given a line defining a color/pixel, parses this into an array containing - * a key and a color + * Given a line defining a color/pixel, parses this into an array containing a key and a color * - * @param line - * Line to parse + * @param line Line to parse * @return Array containing a key (String) and a color (Integer) */ private static Object[] parseColor(String line) { @@ -208,20 +182,16 @@ public class XPMFile { String color = line.substring(format[CHARACTERS_PER_PIXEL] + 4); // we always assume type is color, and supplied as # - return new Object[] {key, Integer.parseInt(color, 16)}; + return new Object[] { key, Integer.parseInt(color, 16) }; } /** * Parses an Image line into its byte values * - * @param line - * Line of chars to parse - * @param format - * Format to expext it in - * @param colors - * Colors to lookup - * @param index - * current index into lines, we've reached + * @param line Line of chars to parse + * @param format Format to expext it in + * @param colors Colors to lookup + * @param index current index into lines, we've reached */ private void parseImageLine(String line, int[] format, HashMap colors, int index) { // offset for next line @@ -264,33 +234,11 @@ public class XPMFile { } } /* - private static void showResult(byte[] bytes) { - final BufferedImage i = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB); - int c = 0; - for (int y = 0; y < 16; y++) { - for (int x = 0; x < 16; x++) { - i.setRGB(x, y, (bytes[c] << 16) + (bytes[c + 1] << 8) + (bytes[c + 2] << 0) + (bytes[c + 3] << 24));//+(128<<24));// - c += 4; - } - } - - final Frame frame = new Frame("XPM Result"); - frame.add(new Canvas() { - - public void paint(Graphics g) { - g.drawImage(i, 0, 0, frame); - } - }); - - frame.addWindowListener(new WindowAdapter() { - - public void windowClosing(WindowEvent e) { - frame.dispose(); - } - - }); - - frame.setSize(100, 100); - frame.setVisible(true); - }*/ + * private static void showResult(byte[] bytes) { final BufferedImage i = new BufferedImage(16, 16, + * BufferedImage.TYPE_INT_ARGB); int c = 0; for (int y = 0; y < 16; y++) { for (int x = 0; x < 16; x++) { + * i.setRGB(x, y, (bytes[c] << 16) + (bytes[c + 1] << 8) + (bytes[c + 2] << 0) + (bytes[c + 3] << + * 24));//+(128<<24));// c += 4; } } final Frame frame = new Frame("XPM Result"); frame.add(new Canvas() { public + * void paint(Graphics g) { g.drawImage(i, 0, 0, frame); } }); frame.addWindowListener(new WindowAdapter() { public + * void windowClosing(WindowEvent e) { frame.dispose(); } }); frame.setSize(100, 100); frame.setVisible(true); } + */ } diff --git a/src/main/java/org/lwjglx/util/glu/Cylinder.java b/src/main/java/org/lwjglx/util/glu/Cylinder.java index 5f28547..f5b6abb 100644 --- a/src/main/java/org/lwjglx/util/glu/Cylinder.java +++ b/src/main/java/org/lwjglx/util/glu/Cylinder.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -39,6 +23,7 @@ import static org.lwjglx.util.glu.GLU.*; * * * Created 23-dec-2003 + * * @author Erik Duijs */ public class Cylinder extends Quadric { @@ -51,29 +36,23 @@ public class Cylinder extends Quadric { } /** - * draws a cylinder oriented along the z axis. The base of the - * cylinder is placed at z = 0, and the top at z=height. Like a sphere, a - * cylinder is subdivided around the z axis into slices, and along the z axis - * into stacks. + * draws a cylinder oriented along the z axis. The base of the cylinder is placed at z = 0, and the top at z=height. + * Like a sphere, a cylinder is subdivided around the z axis into slices, and along the z axis into stacks. * - * Note that if topRadius is set to zero, then this routine will generate a - * cone. + * Note that if topRadius is set to zero, then this routine will generate a cone. * - * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then - * any generated normals point away from the z axis. Otherwise, they point - * toward the z axis. + * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then any generated normals point away + * from the z axis. Otherwise, they point toward the z axis. * - * If texturing is turned on (with glu.quadricTexture), then texture - * coordinates are generated so that t ranges linearly from 0.0 at z = 0 to - * 1.0 at z = height, and s ranges from 0.0 at the +y axis, to 0.25 at the +x - * axis, to 0.5 at the -y axis, to 0.75 at the -x axis, and back to 1.0 at the - * +y axis. + * If texturing is turned on (with glu.quadricTexture), then texture coordinates are generated so that t ranges + * linearly from 0.0 at z = 0 to 1.0 at z = height, and s ranges from 0.0 at the +y axis, to 0.25 at the +x axis, to + * 0.5 at the -y axis, to 0.75 at the -x axis, and back to 1.0 at the +y axis. * - * @param baseRadius Specifies the radius of the cylinder at z = 0. - * @param topRadius Specifies the radius of the cylinder at z = height. - * @param height Specifies the height of the cylinder. - * @param slices Specifies the number of subdivisions around the z axis. - * @param stacks Specifies the number of subdivisions along the z axis. + * @param baseRadius Specifies the radius of the cylinder at z = 0. + * @param topRadius Specifies the radius of the cylinder at z = height. + * @param height Specifies the height of the cylinder. + * @param slices Specifies the number of subdivisions around the z axis. + * @param stacks Specifies the number of subdivisions along the z axis. */ public void draw(float baseRadius, float topRadius, float height, int slices, int stacks) { diff --git a/src/main/java/org/lwjglx/util/glu/Disk.java b/src/main/java/org/lwjglx/util/glu/Disk.java index 95fefef..3b106bc 100644 --- a/src/main/java/org/lwjglx/util/glu/Disk.java +++ b/src/main/java/org/lwjglx/util/glu/Disk.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -39,6 +23,7 @@ import static org.lwjglx.util.glu.GLU.*; * * * Created 23-dec-2003 + * * @author Erik Duijs */ public class Disk extends Quadric { @@ -51,22 +36,18 @@ public class Disk extends Quadric { } /** - * renders a disk on the z = 0 plane. The disk has a radius of - * outerRadius, and contains a concentric circular hole with a radius of - * innerRadius. If innerRadius is 0, then no hole is generated. The disk is - * subdivided around the z axis into slices (like pizza slices), and also - * about the z axis into rings (as specified by slices and loops, + * renders a disk on the z = 0 plane. The disk has a radius of outerRadius, and contains a concentric circular hole + * with a radius of innerRadius. If innerRadius is 0, then no hole is generated. The disk is subdivided around the z + * axis into slices (like pizza slices), and also about the z axis into rings (as specified by slices and loops, * respectively). * - * With respect to orientation, the +z side of the disk is considered to be - * "outside" (see glu.quadricOrientation). This means that if the orientation - * is set to GLU.OUTSIDE, then any normals generated point along the +z axis. + * With respect to orientation, the +z side of the disk is considered to be "outside" (see glu.quadricOrientation). + * This means that if the orientation is set to GLU.OUTSIDE, then any normals generated point along the +z axis. * Otherwise, they point along the -z axis. * - * If texturing is turned on (with glu.quadricTexture), texture coordinates are - * generated linearly such that where r=outerRadius, the value at (r, 0, 0) is - * (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5), and at - * (0, -r, 0) it is (0.5, 0). + * If texturing is turned on (with glu.quadricTexture), texture coordinates are generated linearly such that where + * r=outerRadius, the value at (r, 0, 0) is (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5), and + * at (0, -r, 0) it is (0.5, 0). */ public void draw(float innerRadius, float outerRadius, int slices, int loops) { float da, dr; @@ -85,9 +66,9 @@ public class Disk extends Quadric { switch (super.drawStyle) { case GLU_FILL -> { - /* texture of a gluDisk is a cut out of the texture unit square - * x, y in [-outerRadius, +outerRadius]; s, t in [0, 1] - * (linear mapping) + /* + * texture of a gluDisk is a cut out of the texture unit square x, y in [-outerRadius, +outerRadius]; s, + * t in [0, 1] (linear mapping) */ float dtc = 2.0f * outerRadius; float sa, ca; diff --git a/src/main/java/org/lwjglx/util/glu/GLU.java b/src/main/java/org/lwjglx/util/glu/GLU.java index fffe920..17a778b 100644 --- a/src/main/java/org/lwjglx/util/glu/GLU.java +++ b/src/main/java/org/lwjglx/util/glu/GLU.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -36,6 +20,7 @@ import static org.lwjgl.opengl.GL11.*; import java.nio.ByteBuffer; import java.nio.FloatBuffer; import java.nio.IntBuffer; + import org.lwjglx.opengl.Util; import org.lwjglx.util.glu.tessellation.GLUtessellatorImpl; @@ -44,9 +29,11 @@ import org.lwjglx.util.glu.tessellation.GLUtessellatorImpl; * * * Created 23-dec-2003 + * * @author Erik Duijs */ public class GLU { + static final float PI = (float) Math.PI; /* Errors: (return value 0 = no error) */ @@ -63,7 +50,7 @@ public class GLU { public static final boolean GLU_TRUE = true; public static final boolean GLU_FALSE = false; - /**** Quadric constants ****/ + /**** Quadric constants ****/ /* QuadricNormal */ public static final int GLU_SMOOTH = 100000; @@ -82,9 +69,9 @@ public class GLU { public static final int GLU_INSIDE = 100021; /* Callback types: */ - /* ERROR = 100103 */ + /* ERROR = 100103 */ - /**** Tesselation constants ****/ + /**** Tesselation constants ****/ public static final double GLU_TESS_MAX_COORD = 1.0e150; public static final double TESS_MAX_COORD = 1.0e150; @@ -102,29 +89,33 @@ public class GLU { public static final int GLU_TESS_WINDING_ABS_GEQ_TWO = 100134; /* TessCallback */ - public static final int GLU_TESS_BEGIN = 100100; /* void (CALLBACK*)(GLenum type) */ - public static final int GLU_TESS_VERTEX = 100101; /* void (CALLBACK*)(void *data) */ - public static final int GLU_TESS_END = 100102; /* void (CALLBACK*)(void) */ - public static final int GLU_TESS_ERROR = 100103; /* void (CALLBACK*)(GLenum errno) */ - public static final int GLU_TESS_EDGE_FLAG = 100104; /* void (CALLBACK*)(GLboolean boundaryEdge) */ - public static final int GLU_TESS_COMBINE = 100105; /* void (CALLBACK*)(GLdouble coords[3], - void *data[4], - GLfloat weight[4], - void **dataOut) */ - public static final int GLU_TESS_BEGIN_DATA = 100106; /* void (CALLBACK*)(GLenum type, - void *polygon_data) */ - public static final int GLU_TESS_VERTEX_DATA = 100107; /* void (CALLBACK*)(void *data, - void *polygon_data) */ - public static final int GLU_TESS_END_DATA = 100108; /* void (CALLBACK*)(void *polygon_data) */ - public static final int GLU_TESS_ERROR_DATA = 100109; /* void (CALLBACK*)(GLenum errno, - void *polygon_data) */ - public static final int GLU_TESS_EDGE_FLAG_DATA = 100110; /* void (CALLBACK*)(GLboolean boundaryEdge, - void *polygon_data) */ - public static final int GLU_TESS_COMBINE_DATA = 100111; /* void (CALLBACK*)(GLdouble coords[3], - void *data[4], - GLfloat weight[4], - void **dataOut, - void *polygon_data) */ + public static final int GLU_TESS_BEGIN = 100100; /* void (CALLBACK*)(GLenum type) */ + public static final int GLU_TESS_VERTEX = 100101; /* void (CALLBACK*)(void *data) */ + public static final int GLU_TESS_END = 100102; /* void (CALLBACK*)(void) */ + public static final int GLU_TESS_ERROR = 100103; /* void (CALLBACK*)(GLenum errno) */ + public static final int GLU_TESS_EDGE_FLAG = 100104; /* void (CALLBACK*)(GLboolean boundaryEdge) */ + public static final int GLU_TESS_COMBINE = 100105; /* + * void (CALLBACK*)(GLdouble coords[3], void *data[4], GLfloat + * weight[4], void **dataOut) + */ + public static final int GLU_TESS_BEGIN_DATA = 100106; /* + * void (CALLBACK*)(GLenum type, void *polygon_data) + */ + public static final int GLU_TESS_VERTEX_DATA = 100107; /* + * void (CALLBACK*)(void *data, void *polygon_data) + */ + public static final int GLU_TESS_END_DATA = 100108; /* void (CALLBACK*)(void *polygon_data) */ + public static final int GLU_TESS_ERROR_DATA = 100109; /* + * void (CALLBACK*)(GLenum errno, void *polygon_data) + */ + public static final int GLU_TESS_EDGE_FLAG_DATA = 100110; /* + * void (CALLBACK*)(GLboolean boundaryEdge, void + * *polygon_data) + */ + public static final int GLU_TESS_COMBINE_DATA = 100111; /* + * void (CALLBACK*)(GLdouble coords[3], void *data[4], + * GLfloat weight[4], void **dataOut, void *polygon_data) + */ /* TessError */ public static final int GLU_TESS_ERROR1 = 100151; @@ -143,7 +134,7 @@ public class GLU { public static final int GLU_TESS_COORD_TOO_LARGE = GLU_TESS_ERROR5; public static final int GLU_TESS_NEED_COMBINE_CALLBACK = GLU_TESS_ERROR6; - /**** NURBS constants ****/ + /**** NURBS constants ****/ /* NurbsProperty */ public static final int GLU_AUTO_LOAD_MATRIX = 100200; @@ -166,12 +157,12 @@ public class GLU { public static final int GLU_MAP1_TRIM_3 = 100211; /* NurbsDisplay */ - /* FILL = 100012 */ + /* FILL = 100012 */ public static final int GLU_OUTLINE_POLYGON = 100240; public static final int GLU_OUTLINE_PATCH = 100241; /* NurbsCallback */ - /* ERROR = 100103 */ + /* ERROR = 100103 */ /* NurbsErrors */ public static final int GLU_NURBS_ERROR1 = 100251; @@ -228,6 +219,7 @@ public class GLU { /** * Method gluLookAt + * * @param eyex * @param eyey * @param eyez @@ -238,22 +230,15 @@ public class GLU { * @param upy * @param upz */ - public static void gluLookAt( - float eyex, - float eyey, - float eyez, - float centerx, - float centery, - float centerz, - float upx, - float upy, - float upz) { + public static void gluLookAt(float eyex, float eyey, float eyez, float centerx, float centery, float centerz, + float upx, float upy, float upz) { Project.gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz); } /** * Method gluOrtho2D + * * @param left * @param right * @param bottom @@ -266,6 +251,7 @@ public class GLU { /** * Method gluPerspective + * * @param fovy * @param aspect * @param zNear @@ -278,6 +264,7 @@ public class GLU { /** * Method gluProject + * * @param objx * @param objy * @param objz @@ -286,19 +273,14 @@ public class GLU { * @param viewport * @param win_pos */ - public static boolean gluProject( - float objx, - float objy, - float objz, - FloatBuffer modelMatrix, - FloatBuffer projMatrix, - IntBuffer viewport, - FloatBuffer win_pos) { + public static boolean gluProject(float objx, float objy, float objz, FloatBuffer modelMatrix, + FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer win_pos) { return Project.gluProject(objx, objy, objz, modelMatrix, projMatrix, viewport, win_pos); } /** * Method gluUnproject + * * @param winx * @param winy * @param winz @@ -307,19 +289,14 @@ public class GLU { * @param viewport * @param obj_pos */ - public static boolean gluUnProject( - float winx, - float winy, - float winz, - FloatBuffer modelMatrix, - FloatBuffer projMatrix, - IntBuffer viewport, - FloatBuffer obj_pos) { + public static boolean gluUnProject(float winx, float winy, float winz, FloatBuffer modelMatrix, + FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer obj_pos) { return Project.gluUnProject(winx, winy, winz, modelMatrix, projMatrix, viewport, obj_pos); } /** * Method gluPickMatrix + * * @param x * @param y * @param width @@ -333,6 +310,7 @@ public class GLU { /** * Method gluGetString. + * * @param name * @return String */ @@ -342,6 +320,7 @@ public class GLU { /** * Method gluCheckExtension. + * * @param extName * @param extString * @return boolean @@ -352,6 +331,7 @@ public class GLU { /** * Method gluBuild2DMipmaps + * * @param target * @param components * @param width @@ -361,14 +341,15 @@ public class GLU { * @param data * @return int */ - public static int gluBuild2DMipmaps( - int target, int components, int width, int height, int format, int type, ByteBuffer data) { + public static int gluBuild2DMipmaps(int target, int components, int width, int height, int format, int type, + ByteBuffer data) { return MipMap.gluBuild2DMipmaps(target, components, width, height, format, type, data); } /** * Method gluScaleImage. + * * @param format * @param widthIn * @param heightIn @@ -380,16 +361,8 @@ public class GLU { * @param dataOut * @return int */ - public static int gluScaleImage( - int format, - int widthIn, - int heightIn, - int typeIn, - ByteBuffer dataIn, - int widthOut, - int heightOut, - int typeOut, - ByteBuffer dataOut) { + public static int gluScaleImage(int format, int widthIn, int heightIn, int typeIn, ByteBuffer dataIn, int widthOut, + int heightOut, int typeOut, ByteBuffer dataOut) { return MipMap.gluScaleImage(format, widthIn, heightIn, typeIn, dataIn, widthOut, heightOut, typeOut, dataOut); } diff --git a/src/main/java/org/lwjglx/util/glu/GLUtessellator.java b/src/main/java/org/lwjglx/util/glu/GLUtessellator.java index 783df76..8be72ec 100644 --- a/src/main/java/org/lwjglx/util/glu/GLUtessellator.java +++ b/src/main/java/org/lwjglx/util/glu/GLUtessellator.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -61,7 +45,7 @@ public interface GLUtessellator { void gluBeginPolygon(); - /*ARGSUSED*/ + /* ARGSUSED */ void gluNextContour(int type); void gluEndPolygon(); diff --git a/src/main/java/org/lwjglx/util/glu/GLUtessellatorCallback.java b/src/main/java/org/lwjglx/util/glu/GLUtessellatorCallback.java index 103845c..b911e7e 100644 --- a/src/main/java/org/lwjglx/util/glu/GLUtessellatorCallback.java +++ b/src/main/java/org/lwjglx/util/glu/GLUtessellatorCallback.java @@ -1,158 +1,105 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu; /** - * GLUtessellatorCallback interface provides methods that the user will - * override to define the callbacks for a tessellation object. + * GLUtessellatorCallback interface provides methods that the user will override to define the callbacks for a + * tessellation object. * * @author Eric Veach, July 1994 * @author Java Port: Pepijn Van Eeckhoudt, July 2003 * @author Java Port: Nathan Parker Burg, August 2003 */ public interface GLUtessellatorCallback { + /** - * The begin callback method is invoked like - * {@link javax.media.opengl.GL#glBegin glBegin} to indicate the start of a - * (triangle) primitive. The method takes a single argument of type int. If - * the GLU_TESS_BOUNDARY_ONLY property is set to GL_FALSE, then - * the argument is set to either GL_TRIANGLE_FAN, - * GL_TRIANGLE_STRIP, or GL_TRIANGLES. If the - * GLU_TESS_BOUNDARY_ONLY property is set to GL_TRUE, then the - * argument will be set to GL_LINE_LOOP. + * The begin callback method is invoked like {@link javax.media.opengl.GL#glBegin glBegin} to indicate the + * start of a (triangle) primitive. The method takes a single argument of type int. If the + * GLU_TESS_BOUNDARY_ONLY property is set to GL_FALSE, then the argument is set to either + * GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, or GL_TRIANGLES. If the GLU_TESS_BOUNDARY_ONLY + * property is set to GL_TRUE, then the argument will be set to GL_LINE_LOOP. * - * @param type - * Specifics the type of begin/end pair being defined. The following - * values are valid: GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, - * GL_TRIANGLES or GL_LINE_LOOP. + * @param type Specifics the type of begin/end pair being defined. The following values are valid: + * GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, GL_TRIANGLES or GL_LINE_LOOP. * - * @see GLU#gluTessCallback gluTessCallback - * @see #end end - * @see #begin begin + * @see GLU#gluTessCallback gluTessCallback + * @see #end end + * @see #begin begin */ void begin(int type); /** - * The same as the {@link #begin begin} callback method except that - * it takes an additional reference argument. This reference is - * identical to the opaque reference provided when {@link - * GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * The same as the {@link #begin begin} callback method except that it takes an additional reference argument. This + * reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon gluTessBeginPolygon} + * was called. * - * @param type - * Specifics the type of begin/end pair being defined. The following - * values are valid: GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, - * GL_TRIANGLES or GL_LINE_LOOP. - * @param polygonData - * Specifics a reference to user-defined data. + * @param type Specifics the type of begin/end pair being defined. The following values are valid: + * GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, GL_TRIANGLES or GL_LINE_LOOP. + * @param polygonData Specifics a reference to user-defined data. * - * @see GLU#gluTessCallback gluTessCallback + * @see GLU#gluTessCallback gluTessCallback * @see #endData endData - * @see #begin begin + * @see #begin begin */ void beginData(int type, Object polygonData); /** - * The edgeFlag callback method is similar to - * {@link javax.media.opengl.GL#glEdgeFlag glEdgeFlag}. The method takes - * a single boolean boundaryEdge that indicates which edges lie on the - * polygon boundary. If the boundaryEdge is GL_TRUE, then each vertex - * that follows begins an edge that lies on the polygon boundary, that is, - * an edge that separates an interior region from an exterior one. If the - * boundaryEdge is GL_FALSE, then each vertex that follows begins an - * edge that lies in the polygon interior. The edge flag callback (if - * defined) is invoked before the first vertex callback.

    + * The edgeFlag callback method is similar to {@link javax.media.opengl.GL#glEdgeFlag glEdgeFlag}. The method + * takes a single boolean boundaryEdge that indicates which edges lie on the polygon boundary. If the boundaryEdge + * is GL_TRUE, then each vertex that follows begins an edge that lies on the polygon boundary, that is, an + * edge that separates an interior region from an exterior one. If the boundaryEdge is GL_FALSE, then each + * vertex that follows begins an edge that lies in the polygon interior. The edge flag callback (if defined) is + * invoked before the first vertex callback. + *

    * - * Since triangle fans and triangle strips do not support edge flags, the - * begin callback is not called with GL_TRIANGLE_FAN or - * GL_TRIANGLE_STRIP if a non-null edge flag callback is provided. - * (If the callback is initialized to null, there is no impact on - * performance). Instead, the fans and strips are converted to independent - * triangles. + * Since triangle fans and triangle strips do not support edge flags, the begin callback is not called with + * GL_TRIANGLE_FAN or GL_TRIANGLE_STRIP if a non-null edge flag callback is provided. (If the callback + * is initialized to null, there is no impact on performance). Instead, the fans and strips are converted to + * independent triangles. * - * @param boundaryEdge - * Specifics which edges lie on the polygon boundary. + * @param boundaryEdge Specifics which edges lie on the polygon boundary. * * @see GLU#gluTessCallback gluTessCallback * @see #edgeFlagData edgeFlagData @@ -160,213 +107,163 @@ public interface GLUtessellatorCallback { void edgeFlag(boolean boundaryEdge); /** - * The same as the {@link #edgeFlag edgeFlage} callback method - * except that it takes an additional reference argument. This - * reference is identical to the opaque reference provided when - * {@link GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * The same as the {@link #edgeFlag edgeFlage} callback method except that it takes an additional reference + * argument. This reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon + * gluTessBeginPolygon} was called. * - * @param boundaryEdge - * Specifics which edges lie on the polygon boundary. - * @param polygonData - * Specifics a reference to user-defined data. + * @param boundaryEdge Specifics which edges lie on the polygon boundary. + * @param polygonData Specifics a reference to user-defined data. * - * @see GLU#gluTessCallback gluTessCallback + * @see GLU#gluTessCallback gluTessCallback * @see #edgeFlag edgeFlag */ void edgeFlagData(boolean boundaryEdge, Object polygonData); /** - * The vertex callback method is invoked between the {@link - * #begin begin} and {@link #end end} callback methods. It is - * similar to {@link javax.media.opengl.GL#glVertex3f glVertex3f}, - * and it defines the vertices of the triangles created by the - * tessellation process. The method takes a reference as its only - * argument. This reference is identical to the opaque reference - * provided by the user when the vertex was described (see {@link - * GLU#gluTessVertex gluTessVertex}). + * The vertex callback method is invoked between the {@link #begin begin} and {@link #end end} callback + * methods. It is similar to {@link javax.media.opengl.GL#glVertex3f glVertex3f}, and it defines the vertices of the + * triangles created by the tessellation process. The method takes a reference as its only argument. This reference + * is identical to the opaque reference provided by the user when the vertex was described (see + * {@link GLU#gluTessVertex gluTessVertex}). * - * @param vertexData - * Specifics a reference to the vertices of the triangles created - * byt the tessellatin process. + * @param vertexData Specifics a reference to the vertices of the triangles created byt the tessellatin process. * - * @see GLU#gluTessCallback gluTessCallback + * @see GLU#gluTessCallback gluTessCallback * @see #vertexData vertexData */ void vertex(Object vertexData); /** - * The same as the {@link #vertex vertex} callback method except - * that it takes an additional reference argument. This reference is - * identical to the opaque reference provided when {@link - * GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * The same as the {@link #vertex vertex} callback method except that it takes an additional reference argument. + * This reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon + * gluTessBeginPolygon} was called. * - * @param vertexData - * Specifics a reference to the vertices of the triangles created - * byt the tessellatin process. - * @param polygonData - * Specifics a reference to user-defined data. + * @param vertexData Specifics a reference to the vertices of the triangles created byt the tessellatin process. + * @param polygonData Specifics a reference to user-defined data. * - * @see GLU#gluTessCallback gluTessCallback + * @see GLU#gluTessCallback gluTessCallback * @see #vertex vertex */ void vertexData(Object vertexData, Object polygonData); /** - * The end callback serves the same purpose as - * {@link javax.media.opengl.GL#glEnd glEnd}. It indicates the end of a + * The end callback serves the same purpose as {@link javax.media.opengl.GL#glEnd glEnd}. It indicates the end of a * primitive and it takes no arguments. * - * @see GLU#gluTessCallback gluTessCallback - * @see #begin begin + * @see GLU#gluTessCallback gluTessCallback + * @see #begin begin * @see #endData endData */ void end(); /** - * The same as the {@link #end end} callback method except that it - * takes an additional reference argument. This reference is - * identical to the opaque reference provided when {@link - * GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * The same as the {@link #end end} callback method except that it takes an additional reference argument. This + * reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon gluTessBeginPolygon} + * was called. * - * @param polygonData - * Specifics a reference to user-defined data. + * @param polygonData Specifics a reference to user-defined data. * - * @see GLU#gluTessCallback gluTessCallback + * @see GLU#gluTessCallback gluTessCallback * @see #beginData beginData - * @see #end end + * @see #end end */ void endData(Object polygonData); /** - * The combine callback method is called to create a new vertex when - * the tessellation detects an intersection, or wishes to merge features. The - * method takes four arguments: an array of three elements each of type - * double, an array of four references, an array of four elements each of - * type float, and a reference to a reference.

    + * The combine callback method is called to create a new vertex when the tessellation detects an + * intersection, or wishes to merge features. The method takes four arguments: an array of three elements each of + * type double, an array of four references, an array of four elements each of type float, and a reference to a + * reference. + *

    * - * The vertex is defined as a linear combination of up to four existing - * vertices, stored in data. The coefficients of the linear combination - * are given by weight; these weights always add up to 1. All vertex - * pointers are valid even when some of the weights are 0. coords gives - * the location of the new vertex.

    + * The vertex is defined as a linear combination of up to four existing vertices, stored in data. The + * coefficients of the linear combination are given by weight; these weights always add up to 1. All vertex + * pointers are valid even when some of the weights are 0. coords gives the location of the new vertex. + *

    * - * The user must allocate another vertex, interpolate parameters using - * data and weight, and return the new vertex pointer in - * outData. This handle is supplied during rendering callbacks. The - * user is responsible for freeing the memory some time after - * {@link GLU#gluTessEndPolygon gluTessEndPolygon} is - * called.

    + * The user must allocate another vertex, interpolate parameters using data and weight, and return the + * new vertex pointer in outData. This handle is supplied during rendering callbacks. The user is responsible + * for freeing the memory some time after {@link GLU#gluTessEndPolygon gluTessEndPolygon} is called. + *

    * - * For example, if the polygon lies in an arbitrary plane in 3-space, and a - * color is associated with each vertex, the GLU_TESS_COMBINE - * callback might look like this: + * For example, if the polygon lies in an arbitrary plane in 3-space, and a color is associated with each vertex, + * the GLU_TESS_COMBINE callback might look like this: * + * *

    -     *         void myCombine(double[] coords, Object[] data,
    -     *                        float[] weight, Object[] outData)
    -     *         {
    -     *            MyVertex newVertex = new MyVertex();
    +     * 
    +     * void myCombine(double[] coords, Object[] data, float[] weight, Object[] outData) {
    +     *     MyVertex newVertex = new MyVertex();
          *
    -     *            newVertex.x = coords[0];
    -     *            newVertex.y = coords[1];
    -     *            newVertex.z = coords[2];
    -     *            newVertex.r = weight[0]*data[0].r +
    -     *                          weight[1]*data[1].r +
    -     *                          weight[2]*data[2].r +
    -     *                          weight[3]*data[3].r;
    -     *            newVertex.g = weight[0]*data[0].g +
    -     *                          weight[1]*data[1].g +
    -     *                          weight[2]*data[2].g +
    -     *                          weight[3]*data[3].g;
    -     *            newVertex.b = weight[0]*data[0].b +
    -     *                          weight[1]*data[1].b +
    -     *                          weight[2]*data[2].b +
    -     *                          weight[3]*data[3].b;
    -     *            newVertex.a = weight[0]*data[0].a +
    -     *                          weight[1]*data[1].a +
    -     *                          weight[2]*data[2].a +
    -     *                          weight[3]*data[3].a;
    -     *            outData = newVertex;
    -     *         }
    + * newVertex.x = coords[0]; + * newVertex.y = coords[1]; + * newVertex.z = coords[2]; + * newVertex.r = weight[0] * data[0].r + weight[1] * data[1].r + weight[2] * data[2].r + weight[3] * data[3].r; + * newVertex.g = weight[0] * data[0].g + weight[1] * data[1].g + weight[2] * data[2].g + weight[3] * data[3].g; + * newVertex.b = weight[0] * data[0].b + weight[1] * data[1].b + weight[2] * data[2].b + weight[3] * data[3].b; + * newVertex.a = weight[0] * data[0].a + weight[1] * data[1].a + weight[2] * data[2].a + weight[3] * data[3].a; + * outData = newVertex; + * } + * * - * @param coords - * Specifics the location of the new vertex. - * @param data - * Specifics the vertices used to create the new vertex. - * @param weight - * Specifics the weights used to create the new vertex. - * @param outData - * Reference user the put the coodinates of the new vertex. + * @param coords Specifics the location of the new vertex. + * @param data Specifics the vertices used to create the new vertex. + * @param weight Specifics the weights used to create the new vertex. + * @param outData Reference user the put the coodinates of the new vertex. * - * @see GLU#gluTessCallback gluTessCallback + * @see GLU#gluTessCallback gluTessCallback * @see #combineData combineData */ void combine(double[] coords, Object[] data, float[] weight, Object[] outData); /** - * The same as the {@link #combine combine} callback method except - * that it takes an additional reference argument. This reference is - * identical to the opaque reference provided when {@link - * GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * The same as the {@link #combine combine} callback method except that it takes an additional reference argument. + * This reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon + * gluTessBeginPolygon} was called. * - * @param coords - * Specifics the location of the new vertex. - * @param data - * Specifics the vertices used to create the new vertex. - * @param weight - * Specifics the weights used to create the new vertex. - * @param outData - * Reference user the put the coodinates of the new vertex. - * @param polygonData - * Specifics a reference to user-defined data. + * @param coords Specifics the location of the new vertex. + * @param data Specifics the vertices used to create the new vertex. + * @param weight Specifics the weights used to create the new vertex. + * @param outData Reference user the put the coodinates of the new vertex. + * @param polygonData Specifics a reference to user-defined data. * - * @see GLU#gluTessCallback gluTessCallback + * @see GLU#gluTessCallback gluTessCallback * @see #combine combine */ void combineData(double[] coords, Object[] data, float[] weight, Object[] outData, Object polygonData); /** - * The error callback method is called when an error is encountered. - * The one argument is of type int; it indicates the specific error that - * occurred and will be set to one of GLU_TESS_MISSING_BEGIN_POLYGON, - * GLU_TESS_MISSING_END_POLYGON, GLU_TESS_MISSING_BEGIN_CONTOUR, - * GLU_TESS_MISSING_END_CONTOUR, GLU_TESS_COORD_TOO_LARGE, - * GLU_TESS_NEED_COMBINE_CALLBACK or GLU_OUT_OF_MEMORY. - * Character strings describing these errors can be retrieved with the - * {@link GLU#gluErrorString gluErrorString} call.

    + * The error callback method is called when an error is encountered. The one argument is of type int; it + * indicates the specific error that occurred and will be set to one of GLU_TESS_MISSING_BEGIN_POLYGON, + * GLU_TESS_MISSING_END_POLYGON, GLU_TESS_MISSING_BEGIN_CONTOUR, GLU_TESS_MISSING_END_CONTOUR, + * GLU_TESS_COORD_TOO_LARGE, GLU_TESS_NEED_COMBINE_CALLBACK or GLU_OUT_OF_MEMORY. Character + * strings describing these errors can be retrieved with the {@link GLU#gluErrorString gluErrorString} call. + *

    * - * The GLU library will recover from the first four errors by inserting the - * missing call(s). GLU_TESS_COORD_TOO_LARGE indicates that some - * vertex coordinate exceeded the predefined constant - * GLU_TESS_MAX_COORD in absolute value, and that the value has been - * clamped. (Coordinate values must be small enough so that two can be - * multiplied together without overflow.) - * GLU_TESS_NEED_COMBINE_CALLBACK indicates that the tessellation - * detected an intersection between two edges in the input data, and the - * GLU_TESS_COMBINE or GLU_TESS_COMBINE_DATA callback was not - * provided. No output is generated. GLU_OUT_OF_MEMORY indicates that - * there is not enough memory so no output is generated. + * The GLU library will recover from the first four errors by inserting the missing call(s). + * GLU_TESS_COORD_TOO_LARGE indicates that some vertex coordinate exceeded the predefined constant + * GLU_TESS_MAX_COORD in absolute value, and that the value has been clamped. (Coordinate values must be + * small enough so that two can be multiplied together without overflow.) GLU_TESS_NEED_COMBINE_CALLBACK + * indicates that the tessellation detected an intersection between two edges in the input data, and the + * GLU_TESS_COMBINE or GLU_TESS_COMBINE_DATA callback was not provided. No output is generated. + * GLU_OUT_OF_MEMORY indicates that there is not enough memory so no output is generated. * - * @param errnum - * Specifics the error number code. + * @param errnum Specifics the error number code. * - * @see GLU#gluTessCallback gluTessCallback + * @see GLU#gluTessCallback gluTessCallback * @see #errorData errorData */ void error(int errnum); /** - * The same as the {@link #error error} callback method except that - * it takes an additional reference argument. This reference is - * identical to the opaque reference provided when {@link - * GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * The same as the {@link #error error} callback method except that it takes an additional reference argument. This + * reference is identical to the opaque reference provided when {@link GLU#gluTessBeginPolygon gluTessBeginPolygon} + * was called. * - * @param errnum - * Specifics the error number code. - * @param polygonData - * Specifics a reference to user-defined data. + * @param errnum Specifics the error number code. + * @param polygonData Specifics a reference to user-defined data. * - * @see GLU#gluTessCallback gluTessCallback + * @see GLU#gluTessCallback gluTessCallback * @see #error error */ void errorData(int errnum, Object polygonData); diff --git a/src/main/java/org/lwjglx/util/glu/GLUtessellatorCallbackAdapter.java b/src/main/java/org/lwjglx/util/glu/GLUtessellatorCallbackAdapter.java index 0895f60..ddc2ca8 100644 --- a/src/main/java/org/lwjglx/util/glu/GLUtessellatorCallbackAdapter.java +++ b/src/main/java/org/lwjglx/util/glu/GLUtessellatorCallbackAdapter.java @@ -1,100 +1,60 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu; /** - * The GLUtessellatorCallbackAdapter provides a default implementation of - * {@link GLUtessellatorCallback GLUtessellatorCallback} - * with empty callback methods. This class can be extended to provide user - * defined callback methods. + * The GLUtessellatorCallbackAdapter provides a default implementation of {@link GLUtessellatorCallback + * GLUtessellatorCallback} with empty callback methods. This class can be extended to provide user defined callback + * methods. * * @author Eric Veach, July 1994 * @author Java Port: Pepijn Van Eechhoudt, July 2003 * @author Java Port: Nathan Parker Burg, August 2003 */ public class GLUtessellatorCallbackAdapter implements GLUtessellatorCallback { + public void begin(int type) {} public void edgeFlag(boolean boundaryEdge) {} @@ -102,7 +62,8 @@ public class GLUtessellatorCallbackAdapter implements GLUtessellatorCallback { public void vertex(Object vertexData) {} public void end() {} - // public void mesh(com.sun.opengl.impl.tessellator.GLUmesh mesh) {} + + // public void mesh(com.sun.opengl.impl.tessellator.GLUmesh mesh) {} public void error(int errnum) {} public void combine(double[] coords, Object[] data, float[] weight, Object[] outData) {} diff --git a/src/main/java/org/lwjglx/util/glu/MipMap.java b/src/main/java/org/lwjglx/util/glu/MipMap.java index 77abaff..c42c1fb 100644 --- a/src/main/java/org/lwjglx/util/glu/MipMap.java +++ b/src/main/java/org/lwjglx/util/glu/MipMap.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -36,6 +20,7 @@ import static org.lwjgl.stb.STBImageResize.*; import static org.lwjglx.util.glu.GLU.*; import java.nio.ByteBuffer; + import org.lwjglx.BufferUtils; /** @@ -43,6 +28,7 @@ import org.lwjglx.BufferUtils; * * * Created 11-jan-2004 + * * @author Erik Duijs */ public class MipMap extends Util { @@ -59,14 +45,8 @@ public class MipMap extends Util { * @param data * @return int */ - public static int gluBuild2DMipmaps( - final int target, - final int components, - final int width, - final int height, - final int format, - final int type, - final ByteBuffer data) { + public static int gluBuild2DMipmaps(final int target, final int components, final int width, final int height, + final int format, final int type, final ByteBuffer data) { if (width < 1 || height < 1) return GLU_INVALID_VALUE; final int bpp = bytesPerPixel(format, type); @@ -134,6 +114,7 @@ public class MipMap extends Util { /** * Method gluScaleImage. + * * @param format * @param widthIn * @param heightIn @@ -145,16 +126,8 @@ public class MipMap extends Util { * @param dataOut * @return int */ - public static int gluScaleImage( - int format, - int widthIn, - int heightIn, - int typein, - ByteBuffer dataIn, - int widthOut, - int heightOut, - int typeOut, - ByteBuffer dataOut) { + public static int gluScaleImage(int format, int widthIn, int heightIn, int typein, ByteBuffer dataIn, int widthOut, + int heightOut, int typeOut, ByteBuffer dataOut) { final int components = compPerPix(format); final int alphaIdx = formatAlphaIndex(format); @@ -171,31 +144,31 @@ public class MipMap extends Util { switch (typein) { case GL_UNSIGNED_BYTE -> { if (!stbir_resize_uint8_srgb( - dataIn, - widthIn, - heightIn, - strideIn, - dataOut, - widthOut, - heightOut, - strideOut, - components, - alphaIdx, - 0)) { + dataIn, + widthIn, + heightIn, + strideIn, + dataOut, + widthOut, + heightOut, + strideOut, + components, + alphaIdx, + 0)) { throw new RuntimeException("Couldn't resize image with stbir"); } } case GL_FLOAT -> { if (!stbir_resize_float( - dataIn.asFloatBuffer(), - widthIn, - heightIn, - strideIn * 4, - dataOut.asFloatBuffer(), - widthOut, - heightOut, - strideOut * 4, - components)) { + dataIn.asFloatBuffer(), + widthIn, + heightIn, + strideIn * 4, + dataOut.asFloatBuffer(), + widthOut, + heightOut, + strideOut * 4, + components)) { throw new RuntimeException("Couldn't resize image with stbir"); } } diff --git a/src/main/java/org/lwjglx/util/glu/PartialDisk.java b/src/main/java/org/lwjglx/util/glu/PartialDisk.java index f6ac559..272b1cf 100644 --- a/src/main/java/org/lwjglx/util/glu/PartialDisk.java +++ b/src/main/java/org/lwjglx/util/glu/PartialDisk.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -54,27 +38,22 @@ public class PartialDisk extends Quadric { } /** - * renders a partial disk on the z=0 plane. A partial disk is similar to a - * full disk, except that only the subset of the disk from startAngle - * through startAngle + sweepAngle is included (where 0 degrees is along - * the +y axis, 90 degrees along the +x axis, 180 along the -y axis, and - * 270 along the -x axis). + * renders a partial disk on the z=0 plane. A partial disk is similar to a full disk, except that only the subset of + * the disk from startAngle through startAngle + sweepAngle is included (where 0 degrees is along the +y axis, 90 + * degrees along the +x axis, 180 along the -y axis, and 270 along the -x axis). * - * The partial disk has a radius of outerRadius, and contains a concentric - * circular hole with a radius of innerRadius. If innerRadius is zero, then - * no hole is generated. The partial disk is subdivided around the z axis - * into slices (like pizza slices), and also about the z axis into rings - * (as specified by slices and loops, respectively). + * The partial disk has a radius of outerRadius, and contains a concentric circular hole with a radius of + * innerRadius. If innerRadius is zero, then no hole is generated. The partial disk is subdivided around the z axis + * into slices (like pizza slices), and also about the z axis into rings (as specified by slices and loops, + * respectively). * - * With respect to orientation, the +z side of the partial disk is - * considered to be outside (see gluQuadricOrientation). This means that if - * the orientation is set to GLU.GLU_OUTSIDE, then any normals generated point - * along the +z axis. Otherwise, they point along the -z axis. + * With respect to orientation, the +z side of the partial disk is considered to be outside (see + * gluQuadricOrientation). This means that if the orientation is set to GLU.GLU_OUTSIDE, then any normals generated + * point along the +z axis. Otherwise, they point along the -z axis. * - * If texturing is turned on (with gluQuadricTexture), texture coordinates - * are generated linearly such that where r=outerRadius, the value at (r, 0, 0) - * is (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5), - * and at (0, -r, 0) it is (0.5, 0). + * If texturing is turned on (with gluQuadricTexture), texture coordinates are generated linearly such that where + * r=outerRadius, the value at (r, 0, 0) is (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5), and + * at (0, -r, 0) it is (0.5, 0). */ public void draw(float innerRadius, float outerRadius, int slices, int loops, float startAngle, float sweepAngle) { @@ -309,8 +288,7 @@ public class PartialDisk extends Quadric { if (innerRadius == outerRadius) break; } } - default -> { - } + default -> {} } } } diff --git a/src/main/java/org/lwjglx/util/glu/PixelStoreState.java b/src/main/java/org/lwjglx/util/glu/PixelStoreState.java index 40576cd..c581818 100644 --- a/src/main/java/org/lwjglx/util/glu/PixelStoreState.java +++ b/src/main/java/org/lwjglx/util/glu/PixelStoreState.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -38,6 +22,7 @@ import static org.lwjgl.opengl.GL11.*; * * * Created 11-jan-2004 + * * @author Erik Duijs */ class PixelStoreState extends Util { diff --git a/src/main/java/org/lwjglx/util/glu/Project.java b/src/main/java/org/lwjglx/util/glu/Project.java index ed97106..62f722d 100644 --- a/src/main/java/org/lwjglx/util/glu/Project.java +++ b/src/main/java/org/lwjglx/util/glu/Project.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -35,6 +19,7 @@ import static org.lwjgl.opengl.GL11.*; import java.nio.FloatBuffer; import java.nio.IntBuffer; + import org.lwjglx.BufferUtils; /** @@ -47,12 +32,8 @@ import org.lwjglx.BufferUtils; */ public class Project extends Util { - private static final float[] IDENTITY_MATRIX = new float[] { - 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f - }; + private static final float[] IDENTITY_MATRIX = new float[] { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }; private static final FloatBuffer matrix = BufferUtils.createFloatBuffer(16); private static final FloatBuffer finalMatrix = BufferUtils.createFloatBuffer(16); @@ -83,8 +64,7 @@ public class Project extends Util { */ private static void __gluMultMatrixVecf(FloatBuffer m, float[] in, float[] out) { for (int i = 0; i < 4; i++) { - out[i] = in[0] * m.get(m.position() + 0 * 4 + i) - + in[1] * m.get(m.position() + 1 * 4 + i) + out[i] = in[0] * m.get(m.position() + 0 * 4 + i) + in[1] * m.get(m.position() + 1 * 4 + i) + in[2] * m.get(m.position() + 2 * 4 + i) + in[3] * m.get(m.position() + 3 * 4 + i); } @@ -139,8 +119,8 @@ public class Project extends Util { if (temp.get(i * 4 + i) == 0) { /* - * * No non-zero pivot. The matrix is singular, which shouldn't * - * happen. This means the user gave us a bad matrix. + * * No non-zero pivot. The matrix is singular, which shouldn't * happen. This means the user gave us a + * bad matrix. */ return false; } @@ -156,9 +136,9 @@ public class Project extends Util { for (k = 0; k < 4; k++) { temp.put(j * 4 + k, temp.get(j * 4 + k) - temp.get(i * 4 + k) * t); inverse.put(j * 4 + k, inverse.get(j * 4 + k) - inverse.get(i * 4 + k) * t); - /*inverse.put( - (j << 2) + k, - inverse.get((j << 2) + k) - inverse.get((i << 2) + k) * t);*/ + /* + * inverse.put( (j << 2) + k, inverse.get((j << 2) + k) - inverse.get((i << 2) + k) * t); + */ } } } @@ -230,16 +210,8 @@ public class Project extends Util { * @param upy * @param upz */ - public static void gluLookAt( - float eyex, - float eyey, - float eyez, - float centerx, - float centery, - float centerz, - float upx, - float upy, - float upz) { + public static void gluLookAt(float eyex, float eyey, float eyez, float centerx, float centery, float centerz, + float upx, float upy, float upz) { float[] forward = Project.forward; float[] side = Project.side; float[] up = Project.up; @@ -289,14 +261,8 @@ public class Project extends Util { * @param viewport * @param win_pos */ - public static boolean gluProject( - float objx, - float objy, - float objz, - FloatBuffer modelMatrix, - FloatBuffer projMatrix, - IntBuffer viewport, - FloatBuffer win_pos) { + public static boolean gluProject(float objx, float objy, float objz, FloatBuffer modelMatrix, + FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer win_pos) { float[] in = Project.in; float[] out = Project.out; @@ -337,14 +303,8 @@ public class Project extends Util { * @param viewport * @param obj_pos */ - public static boolean gluUnProject( - float winx, - float winy, - float winz, - FloatBuffer modelMatrix, - FloatBuffer projMatrix, - IntBuffer viewport, - FloatBuffer obj_pos) { + public static boolean gluUnProject(float winx, float winy, float winz, FloatBuffer modelMatrix, + FloatBuffer projMatrix, IntBuffer viewport, FloatBuffer obj_pos) { float[] in = Project.in; float[] out = Project.out; diff --git a/src/main/java/org/lwjglx/util/glu/Quadric.java b/src/main/java/org/lwjglx/util/glu/Quadric.java index a6a512b..fd82c36 100644 --- a/src/main/java/org/lwjglx/util/glu/Quadric.java +++ b/src/main/java/org/lwjglx/util/glu/Quadric.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -39,6 +23,7 @@ import static org.lwjglx.util.glu.GLU.*; * * * Created 22-dec-2003 + * * @author Erik Duijs */ public class Quadric { @@ -84,16 +69,15 @@ public class Quadric { * * The legal values are as follows: * - * GLU.FILL: Quadrics are rendered with polygon primitives. The polygons - * are drawn in a counterclockwise fashion with respect to - * their normals (as defined with glu.quadricOrientation). + * GLU.FILL: Quadrics are rendered with polygon primitives. The polygons are drawn in a counterclockwise fashion + * with respect to their normals (as defined with glu.quadricOrientation). * - * GLU.LINE: Quadrics are rendered as a set of lines. + * GLU.LINE: Quadrics are rendered as a set of lines. * - * GLU.SILHOUETTE: Quadrics are rendered as a set of lines, except that edges - * separating coplanar faces will not be drawn. + * GLU.SILHOUETTE: Quadrics are rendered as a set of lines, except that edges separating coplanar faces will not be + * drawn. * - * GLU.POINT: Quadrics are rendered as a set of points. + * GLU.POINT: Quadrics are rendered as a set of points. * * @param drawStyle The drawStyle to set */ @@ -102,15 +86,13 @@ public class Quadric { } /** - * specifies what kind of normals are desired for quadrics. - * The legal values are as follows: + * specifies what kind of normals are desired for quadrics. The legal values are as follows: * - * GLU.NONE: No normals are generated. + * GLU.NONE: No normals are generated. * - * GLU.FLAT: One normal is generated for every facet of a quadric. + * GLU.FLAT: One normal is generated for every facet of a quadric. * - * GLU.SMOOTH: One normal is generated for every vertex of a quadric. This - * is the default. + * GLU.SMOOTH: One normal is generated for every vertex of a quadric. This is the default. * * @param normals The normals to set */ @@ -119,15 +101,13 @@ public class Quadric { } /** - * specifies what kind of orientation is desired for. - * The orientation values are as follows: + * specifies what kind of orientation is desired for. The orientation values are as follows: * - * GLU.OUTSIDE: Quadrics are drawn with normals pointing outward. + * GLU.OUTSIDE: Quadrics are drawn with normals pointing outward. * - * GLU.INSIDE: Normals point inward. The default is GLU.OUTSIDE. + * GLU.INSIDE: Normals point inward. The default is GLU.OUTSIDE. * - * Note that the interpretation of outward and inward depends on the quadric - * being drawn. + * Note that the interpretation of outward and inward depends on the quadric being drawn. * * @param orientation The orientation to set */ @@ -136,13 +116,11 @@ public class Quadric { } /** - * specifies if texture coordinates should be generated for - * quadrics rendered with qobj. If the value of textureCoords is true, - * then texture coordinates are generated, and if textureCoords is false, - * they are not.. The default is false. + * specifies if texture coordinates should be generated for quadrics rendered with qobj. If the value of + * textureCoords is true, then texture coordinates are generated, and if textureCoords is false, they are not.. The + * default is false. * - * The manner in which texture coordinates are generated depends upon the - * specific quadric rendered. + * The manner in which texture coordinates are generated depends upon the specific quadric rendered. * * @param textureFlag The textureFlag to set */ @@ -152,6 +130,7 @@ public class Quadric { /** * Returns the drawStyle. + * * @return int */ public int getDrawStyle() { @@ -160,6 +139,7 @@ public class Quadric { /** * Returns the normals. + * * @return int */ public int getNormals() { @@ -168,6 +148,7 @@ public class Quadric { /** * Returns the orientation. + * * @return int */ public int getOrientation() { @@ -176,6 +157,7 @@ public class Quadric { /** * Returns the textureFlag. + * * @return boolean */ public boolean getTextureFlag() { diff --git a/src/main/java/org/lwjglx/util/glu/Registry.java b/src/main/java/org/lwjglx/util/glu/Registry.java index a725d28..fa7f439 100644 --- a/src/main/java/org/lwjglx/util/glu/Registry.java +++ b/src/main/java/org/lwjglx/util/glu/Registry.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -38,6 +22,7 @@ import static org.lwjglx.util.glu.GLU.*; * * * Created 11-jan-2004 + * * @author Erik Duijs */ public class Registry extends Util { @@ -47,6 +32,7 @@ public class Registry extends Util { /** * Method gluGetString + * * @param name * @return String */ @@ -63,11 +49,10 @@ public class Registry extends Util { /** * Method gluCheckExtension * - * @param extName is an extension name. - * @param extString is a string of extensions separated by blank(s). There may or - * may not be leading or trailing blank(s) in extString. - * This works in cases of extensions being prefixes of another like - * GL_EXT_texture and GL_EXT_texture3D. + * @param extName is an extension name. + * @param extString is a string of extensions separated by blank(s). There may or may not be leading or trailing + * blank(s) in extString. This works in cases of extensions being prefixes of another like + * GL_EXT_texture and GL_EXT_texture3D. * @return boolean true if extName is found otherwise it returns false. */ public static boolean gluCheckExtension(String extName, String extString) { diff --git a/src/main/java/org/lwjglx/util/glu/Sphere.java b/src/main/java/org/lwjglx/util/glu/Sphere.java index d0d2aa6..31ab5af 100644 --- a/src/main/java/org/lwjglx/util/glu/Sphere.java +++ b/src/main/java/org/lwjglx/util/glu/Sphere.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -39,6 +23,7 @@ import static org.lwjglx.util.glu.GLU.*; * * * Created 23-dec-2003 + * * @author Erik Duijs */ public class Sphere extends Quadric { @@ -51,19 +36,15 @@ public class Sphere extends Quadric { } /** - * draws a sphere of the given radius centered around the origin. - * The sphere is subdivided around the z axis into slices and along the z axis - * into stacks (similar to lines of longitude and latitude). + * draws a sphere of the given radius centered around the origin. The sphere is subdivided around the z axis into + * slices and along the z axis into stacks (similar to lines of longitude and latitude). * - * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then - * any normals generated point away from the center of the sphere. Otherwise, - * they point toward the center of the sphere. + * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then any normals generated point away + * from the center of the sphere. Otherwise, they point toward the center of the sphere. * - * If texturing is turned on (with glu.quadricTexture), then texture - * coordinates are generated so that t ranges from 0.0 at z=-radius to 1.0 at - * z=radius (t increases linearly along longitudinal lines), and s ranges from - * 0.0 at the +y axis, to 0.25 at the +x axis, to 0.5 at the -y axis, to 0.75 - * at the -x axis, and back to 1.0 at the +y axis. + * If texturing is turned on (with glu.quadricTexture), then texture coordinates are generated so that t ranges from + * 0.0 at z=-radius to 1.0 at z=radius (t increases linearly along longitudinal lines), and s ranges from 0.0 at the + * +y axis, to 0.25 at the +x axis, to 0.5 at the -y axis, to 0.75 at the -x axis, and back to 1.0 at the +y axis. */ public void draw(float radius, int slices, int stacks) { // TODO diff --git a/src/main/java/org/lwjglx/util/glu/Util.java b/src/main/java/org/lwjglx/util/glu/Util.java index 498fc30..3b71c54 100644 --- a/src/main/java/org/lwjglx/util/glu/Util.java +++ b/src/main/java/org/lwjglx/util/glu/Util.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.glu; @@ -35,6 +19,7 @@ import static org.lwjgl.opengl.GL11.*; import static org.lwjgl.opengl.GL12.*; import java.nio.IntBuffer; + import org.lwjglx.BufferUtils; /** @@ -109,8 +94,7 @@ public class Util { protected static int compPerPix(int format) { /* Determine number of components per pixel */ return switch (format) { - case GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE -> - 1; + case GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE -> 1; case GL_LUMINANCE_ALPHA -> 2; case GL_RGB, GL_BGR -> 3; case GL_RGBA, GL_BGRA -> 4; @@ -134,7 +118,7 @@ public class Util { /** * Method nearestPower. *

    - * Compute the nearest power of 2 number. This algorithm is a little strange, but it works quite well. + * Compute the nearest power of 2 number. This algorithm is a little strange, but it works quite well. * * @param value * @@ -148,7 +132,7 @@ public class Util { /* Error! */ if (value == 0) return -1; - for (; ; ) { + for (;;) { if (value == 1) { return i; } else if (value == 3) { @@ -171,8 +155,7 @@ public class Util { int n, m; n = switch (format) { - case GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE -> - 1; + case GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE -> 1; case GL_LUMINANCE_ALPHA -> 2; case GL_RGB, GL_BGR -> 3; case GL_RGBA, GL_BGRA -> 4; diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/ActiveRegion.java b/src/main/java/org/lwjglx/util/glu/tessellation/ActiveRegion.java index f54a63d..691d760 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/ActiveRegion.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/ActiveRegion.java @@ -1,100 +1,64 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class ActiveRegion { + GLUhalfEdge eUp; /* upper edge, directed right to left */ DictNode nodeUp; /* dictionary node corresponding to eUp */ - int windingNumber; /* used to determine which regions are - * inside the polygon */ + int windingNumber; /* + * used to determine which regions are inside the polygon + */ boolean inside; /* is this region inside the polygon? */ boolean sentinel; /* marks fake edges at t = +/-infinity */ - boolean dirty; /* marks regions where the upper or lower - * edge has changed, but we haven't checked - * whether they intersect yet */ - boolean fixUpperEdge; /* marks temporary edges introduced when - * we process a "right vertex" (one without - * any edges leaving to the right) */ + boolean dirty; /* + * marks regions where the upper or lower edge has changed, but we haven't checked whether they + * intersect yet + */ + boolean fixUpperEdge; /* + * marks temporary edges introduced when we process a "right vertex" (one without any edges + * leaving to the right) + */ } diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/CachedVertex.java b/src/main/java/org/lwjglx/util/glu/tessellation/CachedVertex.java index 13ecc95..ded8ad9 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/CachedVertex.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/CachedVertex.java @@ -1,90 +1,51 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class CachedVertex { + public double[] coords = new double[3]; public Object data; } diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/Dict.java b/src/main/java/org/lwjglx/util/glu/tessellation/Dict.java index 748fca5..f975ca1 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/Dict.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/Dict.java @@ -1,90 +1,51 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class Dict { + DictNode head; Object frame; DictLeq leq; @@ -166,6 +127,7 @@ class Dict { } public interface DictLeq { + boolean leq(Object frame, Object key1, Object key2); } } diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/DictNode.java b/src/main/java/org/lwjglx/util/glu/tessellation/DictNode.java index 2c39bd1..045d5d2 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/DictNode.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/DictNode.java @@ -1,90 +1,51 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class DictNode { + Object key; DictNode next; DictNode prev; diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/GLUface.java b/src/main/java/org/lwjglx/util/glu/tessellation/GLUface.java index 5e244e3..25ccf09 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/GLUface.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/GLUface.java @@ -1,90 +1,51 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class GLUface { + public GLUface next; /* next face (never NULL) */ public GLUface prev; /* previous face (never NULL) */ public GLUhalfEdge anEdge; /* a half edge with this left face */ diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/GLUhalfEdge.java b/src/main/java/org/lwjglx/util/glu/tessellation/GLUhalfEdge.java index f78db1e..f111ee9 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/GLUhalfEdge.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/GLUhalfEdge.java @@ -1,90 +1,51 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class GLUhalfEdge { + public GLUhalfEdge next; /* doubly-linked list (prev==Sym->next) */ public GLUhalfEdge Sym; /* same edge, opposite direction */ public GLUhalfEdge Onext; /* next edge CCW around origin */ diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/GLUmesh.java b/src/main/java/org/lwjglx/util/glu/tessellation/GLUmesh.java index 6ce39c1..108513e 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/GLUmesh.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/GLUmesh.java @@ -1,90 +1,51 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class GLUmesh { + GLUvertex vHead = new GLUvertex(); /* dummy header for vertex list */ GLUface fHead = new GLUface(); /* dummy header for face list */ GLUhalfEdge eHead = new GLUhalfEdge(true); /* dummy header for edge list */ diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/GLUtessellatorImpl.java b/src/main/java/org/lwjglx/util/glu/tessellation/GLUtessellatorImpl.java index 01f6ad1..902bee7 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/GLUtessellatorImpl.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/GLUtessellatorImpl.java @@ -1,86 +1,46 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; @@ -91,13 +51,15 @@ import org.lwjglx.util.glu.GLUtessellatorCallback; import org.lwjglx.util.glu.GLUtessellatorCallbackAdapter; public class GLUtessellatorImpl implements GLUtessellator { + public static final int TESS_MAX_CACHE = 100; private int state; /* what begin/end calls have we seen? */ private GLUhalfEdge lastEdge; /* lastEdge->Org is the most recent vertex */ - GLUmesh mesh; /* stores the input contours, and eventually - the tessellation itself */ + GLUmesh mesh; /* + * stores the input contours, and eventually the tessellation itself + */ /*** state needed for projecting onto the sweep plane ***/ double[] normal = new double[3]; /* user-specified normal (if provided) */ @@ -128,14 +90,14 @@ public class GLUtessellatorImpl implements GLUtessellator { int cacheCount; /* number of cached vertices */ CachedVertex[] cache = new CachedVertex[TESS_MAX_CACHE]; /* the vertex data */ - /*** rendering callbacks that also pass polygon data ***/ + /*** rendering callbacks that also pass polygon data ***/ private Object polygonData; /* client data for current polygon */ private GLUtessellatorCallback callBegin; private GLUtessellatorCallback callEdgeFlag; private GLUtessellatorCallback callVertex; private GLUtessellatorCallback callEnd; - // private GLUtessellatorCallback callMesh; + // private GLUtessellatorCallback callMesh; private GLUtessellatorCallback callError; private GLUtessellatorCallback callCombine; @@ -143,16 +105,16 @@ public class GLUtessellatorImpl implements GLUtessellator { private GLUtessellatorCallback callEdgeFlagData; private GLUtessellatorCallback callVertexData; private GLUtessellatorCallback callEndData; - // private GLUtessellatorCallback callMeshData; + // private GLUtessellatorCallback callMeshData; private GLUtessellatorCallback callErrorData; private GLUtessellatorCallback callCombineData; private static final double GLU_TESS_DEFAULT_TOLERANCE = 0.0; - // private static final int GLU_TESS_MESH = 100112; /* void (*)(GLUmesh *mesh) */ + // private static final int GLU_TESS_MESH = 100112; /* void (*)(GLUmesh *mesh) */ private static GLUtessellatorCallback NULL_CB = new GLUtessellatorCallbackAdapter(); - // #define MAX_FAST_ALLOC (MAX(sizeof(EdgePair), \ - // MAX(sizeof(GLUvertex),sizeof(GLUface)))) + // #define MAX_FAST_ALLOC (MAX(sizeof(EdgePair), \ + // MAX(sizeof(GLUvertex),sizeof(GLUface)))) public GLUtessellatorImpl() { state = TessState.T_DORMANT; @@ -172,7 +134,7 @@ public class GLUtessellatorImpl implements GLUtessellator { callEnd = NULL_CB; callError = NULL_CB; callCombine = NULL_CB; - // callMesh = NULL_CB; + // callMesh = NULL_CB; callBeginData = NULL_CB; callEdgeFlagData = NULL_CB; @@ -209,8 +171,8 @@ public class GLUtessellatorImpl implements GLUtessellator { private void gotoState(int newState) { while (state != newState) { - /* We change the current state one level at a time, to get to - * the desired state. + /* + * We change the current state one level at a time, to get to the desired state. */ if (state < newState) { if (state == TessState.T_DORMANT) { @@ -253,8 +215,7 @@ public class GLUtessellatorImpl implements GLUtessellator { this.windingRule = windingRule; return; } - default -> { - } + default -> {} } case GLU_TESS_BOUNDARY_ONLY: @@ -277,11 +238,10 @@ public class GLUtessellatorImpl implements GLUtessellator { value[value_offset] = relTolerance; } case GLU_TESS_WINDING_RULE -> { - assert (windingRule == GLU_TESS_WINDING_ODD - || windingRule == GLU_TESS_WINDING_NONZERO - || windingRule == GLU_TESS_WINDING_POSITIVE - || windingRule == GLU_TESS_WINDING_NEGATIVE - || windingRule == GLU_TESS_WINDING_ABS_GEQ_TWO); + assert (windingRule == GLU_TESS_WINDING_ODD || windingRule == GLU_TESS_WINDING_NONZERO + || windingRule == GLU_TESS_WINDING_POSITIVE + || windingRule == GLU_TESS_WINDING_NEGATIVE + || windingRule == GLU_TESS_WINDING_ABS_GEQ_TWO); value[value_offset] = windingRule; } case GLU_TESS_BOUNDARY_ONLY -> { @@ -313,16 +273,18 @@ public class GLUtessellatorImpl implements GLUtessellator { } case GLU_TESS_EDGE_FLAG -> { callEdgeFlag = aCallback == null ? NULL_CB : aCallback; - /* If the client wants boundary edges to be flagged, - * we render everything as separate triangles (no strips or fans). + /* + * If the client wants boundary edges to be flagged, we render everything as separate triangles (no + * strips or fans). */ flagBoundary = aCallback != null; return; } case GLU_TESS_EDGE_FLAG_DATA -> { callEdgeFlagData = callBegin = aCallback == null ? NULL_CB : aCallback; - /* If the client wants boundary edges to be flagged, - * we render everything as separate triangles (no strips or fans). + /* + * If the client wants boundary edges to be flagged, we render everything as separate triangles (no + * strips or fans). */ flagBoundary = (aCallback != null); return; @@ -359,9 +321,9 @@ public class GLUtessellatorImpl implements GLUtessellator { callCombineData = aCallback == null ? NULL_CB : aCallback; return; } - // case GLU_TESS_MESH: - // callMesh = aCallback == null ? NULL_CB : aCallback; - // return; + // case GLU_TESS_MESH: + // callMesh = aCallback == null ? NULL_CB : aCallback; + // return; default -> { callErrorOrErrorData(GLU_INVALID_ENUM); return; @@ -380,8 +342,8 @@ public class GLUtessellatorImpl implements GLUtessellator { if (e == null) return false; if (!Mesh.__gl_meshSplice(e, e.Sym)) return false; } else { - /* Create a new vertex and edge which immediately follow e - * in the ordering around the left face. + /* + * Create a new vertex and edge which immediately follow e in the ordering around the left face. */ if (Mesh.__gl_meshSplitEdge(e) == null) return false; e = e.Lnext; @@ -393,10 +355,10 @@ public class GLUtessellatorImpl implements GLUtessellator { e.Org.coords[1] = coords[1]; e.Org.coords[2] = coords[2]; - /* The winding of an edge says how the winding number changes as we - * cross from the edge''s right face to its left face. We add the - * vertices in such an order that a CCW contour will add +1 to - * the winding number of the region inside the contour. + /* + * The winding of an edge says how the winding number changes as we cross from the edge''s right face to its + * left face. We add the vertices in such an order that a CCW contour will add +1 to the winding number of the + * region inside the contour. */ e.winding = 1; e.Sym.winding = -1; @@ -500,9 +462,9 @@ public class GLUtessellatorImpl implements GLUtessellator { state = TessState.T_IN_CONTOUR; lastEdge = null; if (cacheCount > 0) { - /* Just set a flag so we don't get confused by empty contours - * -- these can be generated accidentally with the obsolete - * NextContour() interface. + /* + * Just set a flag so we don't get confused by empty contours -- these can be generated accidentally with + * the obsolete NextContour() interface. */ flushCacheOnNextVertex = true; } @@ -521,31 +483,30 @@ public class GLUtessellatorImpl implements GLUtessellator { state = TessState.T_DORMANT; if (this.mesh == null) { - if (!flagBoundary /*&& callMesh == NULL_CB*/) { + if (!flagBoundary /* && callMesh == NULL_CB */) { - /* Try some special code to make the easy cases go quickly - * (eg. convex polygons). This code does NOT handle multiple contours, - * intersections, edge flags, and of course it does not generate - * an explicit mesh either. + /* + * Try some special code to make the easy cases go quickly (eg. convex polygons). This code does NOT + * handle multiple contours, intersections, edge flags, and of course it does not generate an + * explicit mesh either. */ if (Render.__gl_renderCache(this)) { polygonData = null; return; } } - if (!flushCache()) throw new RuntimeException(); /* could've used a label*/ + if (!flushCache()) throw new RuntimeException(); /* could've used a label */ } - /* Determine the polygon normal and project vertices onto the plane - * of the polygon. + /* + * Determine the polygon normal and project vertices onto the plane of the polygon. */ Normal.__gl_projectPolygon(this); - /* __gl_computeInterior( tess ) computes the planar arrangement specified - * by the given contours, and further subdivides this arrangement - * into regions. Each region is marked "inside" if it belongs - * to the polygon, according to the rule given by windingRule. - * Each interior region is guaranteed be monotone. + /* + * __gl_computeInterior( tess ) computes the planar arrangement specified by the given contours, and further + * subdivides this arrangement into regions. Each region is marked "inside" if it belongs to the polygon, + * according to the rule given by windingRule. Each interior region is guaranteed be monotone. */ if (!Sweep.__gl_computeInterior(this)) { throw new RuntimeException(); /* could've used a label */ @@ -555,9 +516,9 @@ public class GLUtessellatorImpl implements GLUtessellator { if (!fatalError) { boolean rc = true; - /* If the user wants only the boundary contours, we throw away all edges - * except those which separate the interior from the exterior. - * Otherwise we tessellate all the regions marked "inside". + /* + * If the user wants only the boundary contours, we throw away all edges except those which separate the + * interior from the exterior. Otherwise we tessellate all the regions marked "inside". */ if (boundaryOnly) { rc = TessMono.__gl_meshSetWindingNumber(mesh, 1, true); @@ -568,8 +529,7 @@ public class GLUtessellatorImpl implements GLUtessellator { Mesh.__gl_meshCheckMesh(mesh); - if (callBegin != NULL_CB - || callEnd != NULL_CB + if (callBegin != NULL_CB || callEnd != NULL_CB || callVertex != NULL_CB || callEdgeFlag != NULL_CB || callBeginData != NULL_CB @@ -582,20 +542,20 @@ public class GLUtessellatorImpl implements GLUtessellator { Render.__gl_renderMesh(this, mesh); /* output strips and fans */ } } - // if (callMesh != NULL_CB) { + // if (callMesh != NULL_CB) { // /// * Throw away the exterior faces, so that all faces are interior. - // * This way the user doesn't have to check the "inside" flag, - // * and we don't need to even reveal its existence. It also leaves - // * the freedom for an implementation to not generate the exterior - // * faces in the first place. - // */ - // TessMono.__gl_meshDiscardExterior(mesh); - // callMesh.mesh(mesh); /* user wants the mesh itself */ - // mesh = null; - // polygonData = null; - // return; - // } + // * This way the user doesn't have to check the "inside" flag, + // * and we don't need to even reveal its existence. It also leaves + // * the freedom for an implementation to not generate the exterior + // * faces in the first place. + // */ + // TessMono.__gl_meshDiscardExterior(mesh); + // callMesh.mesh(mesh); /* user wants the mesh itself */ + // mesh = null; + // polygonData = null; + // return; + // } } Mesh.__gl_meshDeleteMesh(mesh); polygonData = null; @@ -615,7 +575,7 @@ public class GLUtessellatorImpl implements GLUtessellator { gluTessBeginContour(); } - /*ARGSUSED*/ + /* ARGSUSED */ public void gluNextContour(int type) { gluTessEndContour(); gluTessBeginContour(); diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/GLUvertex.java b/src/main/java/org/lwjglx/util/glu/tessellation/GLUvertex.java index 1516c46..15df9d6 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/GLUvertex.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/GLUvertex.java @@ -1,90 +1,51 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class GLUvertex { + public GLUvertex next; /* next vertex (never NULL) */ public GLUvertex prev; /* previous vertex (never NULL) */ public GLUhalfEdge anEdge; /* a half-edge with this origin */ diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/Geom.java b/src/main/java/org/lwjglx/util/glu/tessellation/Geom.java index 7335fb0..4ed7e0d 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/Geom.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/Geom.java @@ -1,101 +1,59 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class Geom { + private Geom() {} - /* Given three vertices u,v,w such that VertLeq(u,v) && VertLeq(v,w), - * evaluates the t-coord of the edge uw at the s-coord of the vertex v. - * Returns v->t - (uw)(v->s), ie. the signed distance from uw to v. - * If uw is vertical (and thus passes thru v), the result is zero. - * - * The calculation is extremely accurate and stable, even when v - * is very close to u or w. In particular if we set v->t = 0 and - * let r be the negated result (this evaluates (uw)(v->s)), then - * r is guaranteed to satisfy MIN(u->t,w->t) <= r <= MAX(u->t,w->t). + /* + * Given three vertices u,v,w such that VertLeq(u,v) && VertLeq(v,w), evaluates the t-coord of the edge uw at the + * s-coord of the vertex v. Returns v->t - (uw)(v->s), ie. the signed distance from uw to v. If uw is vertical (and + * thus passes thru v), the result is zero. The calculation is extremely accurate and stable, even when v is very + * close to u or w. In particular if we set v->t = 0 and let r be the negated result (this evaluates (uw)(v->s)), + * then r is guaranteed to satisfy MIN(u->t,w->t) <= r <= MAX(u->t,w->t). */ static double EdgeEval(GLUvertex u, GLUvertex v, GLUvertex w) { double gapL, gapR; @@ -135,15 +93,12 @@ class Geom { * Define versions of EdgeSign, EdgeEval with s and t transposed. */ static double TransEval(GLUvertex u, GLUvertex v, GLUvertex w) { - /* Given three vertices u,v,w such that TransLeq(u,v) && TransLeq(v,w), - * evaluates the t-coord of the edge uw at the s-coord of the vertex v. - * Returns v->s - (uw)(v->t), ie. the signed distance from uw to v. - * If uw is vertical (and thus passes thru v), the result is zero. - * - * The calculation is extremely accurate and stable, even when v - * is very close to u or w. In particular if we set v->s = 0 and - * let r be the negated result (this evaluates (uw)(v->t)), then - * r is guaranteed to satisfy MIN(u->s,w->s) <= r <= MAX(u->s,w->s). + /* + * Given three vertices u,v,w such that TransLeq(u,v) && TransLeq(v,w), evaluates the t-coord of the edge uw at + * the s-coord of the vertex v. Returns v->s - (uw)(v->t), ie. the signed distance from uw to v. If uw is + * vertical (and thus passes thru v), the result is zero. The calculation is extremely accurate and stable, even + * when v is very close to u or w. In particular if we set v->s = 0 and let r be the negated result (this + * evaluates (uw)(v->t)), then r is guaranteed to satisfy MIN(u->s,w->s) <= r <= MAX(u->s,w->s). */ double gapL, gapR; @@ -164,9 +119,9 @@ class Geom { } static double TransSign(GLUvertex u, GLUvertex v, GLUvertex w) { - /* Returns a number whose sign matches TransEval(u,v,w) but which - * is cheaper to evaluate. Returns > 0, == 0 , or < 0 - * as v is above, on, or below the edge uw. + /* + * Returns a number whose sign matches TransEval(u,v,w) but which is cheaper to evaluate. Returns > 0, == 0 , or + * < 0 as v is above, on, or below the edge uw. */ double gapL, gapR; @@ -183,22 +138,19 @@ class Geom { } static boolean VertCCW(GLUvertex u, GLUvertex v, GLUvertex w) { - /* For almost-degenerate situations, the results are not reliable. - * Unless the floating-point arithmetic can be performed without - * rounding errors, *any* implementation will give incorrect results - * on some degenerate inputs, so the client must have some way to - * handle this situation. + /* + * For almost-degenerate situations, the results are not reliable. Unless the floating-point arithmetic can be + * performed without rounding errors, *any* implementation will give incorrect results on some degenerate + * inputs, so the client must have some way to handle this situation. */ return (u.s * (v.t - w.t) + v.s * (w.t - u.t) + w.s * (u.t - v.t)) >= 0; } - /* Given parameters a,x,b,y returns the value (b*x+a*y)/(a+b), - * or (x+y)/2 if a==b==0. It requires that a,b >= 0, and enforces - * this in the rare case that one argument is slightly negative. - * The implementation is extremely stable numerically. - * In particular it guarantees that the result r satisfies - * MIN(x,y) <= r <= MAX(x,y), and the results are very accurate - * even when a and b differ greatly in magnitude. + /* + * Given parameters a,x,b,y returns the value (b*x+a*y)/(a+b), or (x+y)/2 if a==b==0. It requires that a,b >= 0, and + * enforces this in the rare case that one argument is slightly negative. The implementation is extremely stable + * numerically. In particular it guarantees that the result r satisfies MIN(x,y) <= r <= MAX(x,y), and the results + * are very accurate even when a and b differ greatly in magnitude. */ static double Interpolate(double a, double x, double b, double y) { a = (a < 0) ? 0 : a; @@ -215,18 +167,16 @@ class Geom { } static void EdgeIntersect(GLUvertex o1, GLUvertex d1, GLUvertex o2, GLUvertex d2, GLUvertex v) - /* Given edges (o1,d1) and (o2,d2), compute their point of intersection. - * The computed point is guaranteed to lie in the intersection of the - * bounding rectangles defined by each edge. - */ { + /* + * Given edges (o1,d1) and (o2,d2), compute their point of intersection. The computed point is guaranteed to lie in + * the intersection of the bounding rectangles defined by each edge. + */ { double z1, z2; - /* This is certainly not the most efficient way to find the intersection - * of two line segments, but it is very numerically stable. - * - * Strategy: find the two middle vertices in the VertLeq ordering, - * and interpolate the intersection s-value from these. Then repeat - * using the TransLeq ordering to find the intersection t-value. + /* + * This is certainly not the most efficient way to find the intersection of two line segments, but it is very + * numerically stable. Strategy: find the two middle vertices in the VertLeq ordering, and interpolate the + * intersection s-value from these. Then repeat using the TransLeq ordering to find the intersection t-value. */ if (!VertLeq(o1, d1)) { diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/Mesh.java b/src/main/java/org/lwjglx/util/glu/tessellation/Mesh.java index 1952ef5..8b2643a 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/Mesh.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/Mesh.java @@ -1,109 +1,70 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class Mesh { + private Mesh() {} /************************ Utility Routines ************************/ - /* MakeEdge creates a new pair of half-edges which form their own loop. - * No vertex or face structures are allocated, but these must be assigned - * before the current edge operation is completed. + /* + * MakeEdge creates a new pair of half-edges which form their own loop. No vertex or face structures are allocated, + * but these must be assigned before the current edge operation is completed. */ static GLUhalfEdge MakeEdge(GLUhalfEdge eNext) { GLUhalfEdge e; GLUhalfEdge eSym; GLUhalfEdge ePrev; - // EdgePair * pair = (EdgePair *) - // memAlloc(sizeof(EdgePair)); - // if (pair == NULL) return NULL; + // EdgePair * pair = (EdgePair *) + // memAlloc(sizeof(EdgePair)); + // if (pair == NULL) return NULL; // - // e = &pair - > e; + // e = &pair - > e; e = new GLUhalfEdge(true); - // eSym = &pair - > eSym; + // eSym = &pair - > eSym; eSym = new GLUhalfEdge(false); /* Make sure eNext points to the first edge of the edge pair */ @@ -111,8 +72,8 @@ class Mesh { eNext = eNext.Sym; } - /* Insert in circular doubly-linked list before eNext. - * Note that the prev pointer is stored in Sym->next. + /* + * Insert in circular doubly-linked list before eNext. Note that the prev pointer is stored in Sym->next. */ ePrev = eNext.Sym.next; eSym.next = ePrev; @@ -139,11 +100,10 @@ class Mesh { return e; } - /* Splice( a, b ) is best described by the Guibas/Stolfi paper or the - * CS348a notes (see mesh.h). Basically it modifies the mesh so that - * a->Onext and b->Onext are exchanged. This can have various effects - * depending on whether a and b belong to different face or vertex rings. - * For more explanation see __gl_meshSplice() below. + /* + * Splice( a, b ) is best described by the Guibas/Stolfi paper or the CS348a notes (see mesh.h). Basically it + * modifies the mesh so that a->Onext and b->Onext are exchanged. This can have various effects depending on whether + * a and b belong to different face or vertex rings. For more explanation see __gl_meshSplice() below. */ static void Splice(GLUhalfEdge a, GLUhalfEdge b) { GLUhalfEdge aOnext = a.Onext; @@ -155,11 +115,11 @@ class Mesh { b.Onext = aOnext; } - /* MakeVertex( newVertex, eOrig, vNext ) attaches a new vertex and makes it the - * origin of all edges in the vertex loop to which eOrig belongs. "vNext" gives - * a place to insert the new vertex in the global vertex list. We insert - * the new vertex *before* vNext so that algorithms which walk the vertex - * list will not see the newly created vertices. + /* + * MakeVertex( newVertex, eOrig, vNext ) attaches a new vertex and makes it the origin of all edges in the vertex + * loop to which eOrig belongs. "vNext" gives a place to insert the new vertex in the global vertex list. We insert + * the new vertex *before* vNext so that algorithms which walk the vertex list will not see the newly created + * vertices. */ static void MakeVertex(GLUvertex newVertex, GLUhalfEdge eOrig, GLUvertex vNext) { GLUhalfEdge e; @@ -187,11 +147,10 @@ class Mesh { } while (e != eOrig); } - /* MakeFace( newFace, eOrig, fNext ) attaches a new face and makes it the left - * face of all edges in the face loop to which eOrig belongs. "fNext" gives - * a place to insert the new face in the global face list. We insert - * the new face *before* fNext so that algorithms which walk the face - * list will not see the newly created faces. + /* + * MakeFace( newFace, eOrig, fNext ) attaches a new face and makes it the left face of all edges in the face loop to + * which eOrig belongs. "fNext" gives a place to insert the new face in the global face list. We insert the new face + * *before* fNext so that algorithms which walk the face list will not see the newly created faces. */ static void MakeFace(GLUface newFace, GLUhalfEdge eOrig, GLUface fNext) { GLUhalfEdge e; @@ -212,8 +171,9 @@ class Mesh { fNew.trail = null; fNew.marked = false; - /* The new face is marked "inside" if the old one was. This is a - * convenience for the common case where a face has been split in two. + /* + * The new face is marked "inside" if the old one was. This is a convenience for the common case where a face + * has been split in two. */ fNew.inside = fNext.inside; @@ -225,8 +185,8 @@ class Mesh { } while (e != eOrig); } - /* KillEdge( eDel ) destroys an edge (the half-edges eDel and eDel->Sym), - * and removes from the global edge list. + /* + * KillEdge( eDel ) destroys an edge (the half-edges eDel and eDel->Sym), and removes from the global edge list. */ static void KillEdge(GLUhalfEdge eDel) { GLUhalfEdge ePrev, eNext; @@ -243,8 +203,9 @@ class Mesh { ePrev.Sym.next = eNext; } - /* KillVertex( vDel ) destroys a vertex and removes it from the global - * vertex list. It updates the vertex loop to point to a given new vertex. + /* + * KillVertex( vDel ) destroys a vertex and removes it from the global vertex list. It updates the vertex loop to + * point to a given new vertex. */ static void KillVertex(GLUvertex vDel, GLUvertex newOrg) { GLUhalfEdge e, eStart = vDel.anEdge; @@ -264,8 +225,9 @@ class Mesh { vPrev.next = vNext; } - /* KillFace( fDel ) destroys a face and removes it from the global face - * list. It updates the face loop to point to a given new face. + /* + * KillFace( fDel ) destroys a face and removes it from the global face list. It updates the face loop to point to a + * given new face. */ static void KillFace(GLUface fDel, GLUface newLface) { GLUhalfEdge e, eStart = fDel.anEdge; @@ -287,8 +249,8 @@ class Mesh { /****************** Basic Edge Operations **********************/ - /* __gl_meshMakeEdge creates one edge, two vertices, and a loop (face). - * The loop consists of the two new half-edges. + /* + * __gl_meshMakeEdge creates one edge, two vertices, and a loop (face). The loop consists of the two new half-edges. */ public static GLUhalfEdge __gl_meshMakeEdge(GLUmesh mesh) { GLUvertex newVertex1 = new GLUvertex(); @@ -305,28 +267,17 @@ class Mesh { return e; } - /* __gl_meshSplice( eOrg, eDst ) is the basic operation for changing the - * mesh connectivity and topology. It changes the mesh so that - * eOrg->Onext <- OLD( eDst->Onext ) - * eDst->Onext <- OLD( eOrg->Onext ) - * where OLD(...) means the value before the meshSplice operation. - * - * This can have two effects on the vertex structure: - * - if eOrg->Org != eDst->Org, the two vertices are merged together - * - if eOrg->Org == eDst->Org, the origin is split into two vertices - * In both cases, eDst->Org is changed and eOrg->Org is untouched. - * - * Similarly (and independently) for the face structure, - * - if eOrg->Lface == eDst->Lface, one loop is split into two - * - if eOrg->Lface != eDst->Lface, two distinct loops are joined into one - * In both cases, eDst->Lface is changed and eOrg->Lface is unaffected. - * - * Some special cases: - * If eDst == eOrg, the operation has no effect. - * If eDst == eOrg->Lnext, the new face will have a single edge. - * If eDst == eOrg->Lprev, the old face will have a single edge. - * If eDst == eOrg->Onext, the new vertex will have a single edge. - * If eDst == eOrg->Oprev, the old vertex will have a single edge. + /* + * __gl_meshSplice( eOrg, eDst ) is the basic operation for changing the mesh connectivity and topology. It changes + * the mesh so that eOrg->Onext <- OLD( eDst->Onext ) eDst->Onext <- OLD( eOrg->Onext ) where OLD(...) means the + * value before the meshSplice operation. This can have two effects on the vertex structure: - if eOrg->Org != + * eDst->Org, the two vertices are merged together - if eOrg->Org == eDst->Org, the origin is split into two + * vertices In both cases, eDst->Org is changed and eOrg->Org is untouched. Similarly (and independently) for the + * face structure, - if eOrg->Lface == eDst->Lface, one loop is split into two - if eOrg->Lface != eDst->Lface, two + * distinct loops are joined into one In both cases, eDst->Lface is changed and eOrg->Lface is unaffected. Some + * special cases: If eDst == eOrg, the operation has no effect. If eDst == eOrg->Lnext, the new face will have a + * single edge. If eDst == eOrg->Lprev, the old face will have a single edge. If eDst == eOrg->Onext, the new vertex + * will have a single edge. If eDst == eOrg->Oprev, the old vertex will have a single edge. */ public static boolean __gl_meshSplice(GLUhalfEdge eOrg, GLUhalfEdge eDst) { boolean joiningLoops = false; @@ -351,8 +302,9 @@ class Mesh { if (!joiningVertices) { GLUvertex newVertex = new GLUvertex(); - /* We split one vertex into two -- the new vertex is eDst.Org. - * Make sure the old vertex points to a valid half-edge. + /* + * We split one vertex into two -- the new vertex is eDst.Org. Make sure the old vertex points to a valid + * half-edge. */ MakeVertex(newVertex, eDst, eOrg.Org); eOrg.Org.anEdge = eOrg; @@ -360,8 +312,9 @@ class Mesh { if (!joiningLoops) { GLUface newFace = new GLUface(); - /* We split one loop into two -- the new loop is eDst.Lface. - * Make sure the old face points to a valid half-edge. + /* + * We split one loop into two -- the new loop is eDst.Lface. Make sure the old face points to a valid + * half-edge. */ MakeFace(newFace, eDst, eOrg.Lface); eOrg.Lface.anEdge = eOrg; @@ -370,22 +323,20 @@ class Mesh { return true; } - /* __gl_meshDelete( eDel ) removes the edge eDel. There are several cases: - * if (eDel.Lface != eDel.Rface), we join two loops into one; the loop - * eDel.Lface is deleted. Otherwise, we are splitting one loop into two; - * the newly created loop will contain eDel.Dst. If the deletion of eDel - * would create isolated vertices, those are deleted as well. - * - * This function could be implemented as two calls to __gl_meshSplice - * plus a few calls to memFree, but this would allocate and delete - * unnecessary vertices and faces. + /* + * __gl_meshDelete( eDel ) removes the edge eDel. There are several cases: if (eDel.Lface != eDel.Rface), we join + * two loops into one; the loop eDel.Lface is deleted. Otherwise, we are splitting one loop into two; the newly + * created loop will contain eDel.Dst. If the deletion of eDel would create isolated vertices, those are deleted as + * well. This function could be implemented as two calls to __gl_meshSplice plus a few calls to memFree, but this + * would allocate and delete unnecessary vertices and faces. */ static boolean __gl_meshDelete(GLUhalfEdge eDel) { GLUhalfEdge eDelSym = eDel.Sym; boolean joiningLoops = false; - /* First step: disconnect the origin vertex eDel.Org. We make all - * changes to get a consistent mesh in this "intermediate" state. + /* + * First step: disconnect the origin vertex eDel.Org. We make all changes to get a consistent mesh in this + * "intermediate" state. */ if (eDel.Lface != eDel.Sym.Lface) { /* We are joining two loops into one -- remove the left face */ @@ -409,8 +360,9 @@ class Mesh { } } - /* Claim: the mesh is now in a consistent state, except that eDel.Org - * may have been deleted. Now we disconnect eDel.Dst. + /* + * Claim: the mesh is now in a consistent state, except that eDel.Org may have been deleted. Now we disconnect + * eDel.Dst. */ if (eDelSym.Onext == eDelSym) { KillVertex(eDelSym.Org, null); @@ -430,13 +382,14 @@ class Mesh { /******************** Other Edge Operations **********************/ - /* All these routines can be implemented with the basic edge - * operations above. They are provided for convenience and efficiency. + /* + * All these routines can be implemented with the basic edge operations above. They are provided for convenience and + * efficiency. */ - /* __gl_meshAddEdgeVertex( eOrg ) creates a new edge eNew such that - * eNew == eOrg.Lnext, and eNew.Dst is a newly created vertex. - * eOrg and eNew will have the same left face. + /* + * __gl_meshAddEdgeVertex( eOrg ) creates a new edge eNew such that eNew == eOrg.Lnext, and eNew.Dst is a newly + * created vertex. eOrg and eNew will have the same left face. */ static GLUhalfEdge __gl_meshAddEdgeVertex(GLUhalfEdge eOrg) { GLUhalfEdge eNewSym; @@ -459,9 +412,9 @@ class Mesh { return eNew; } - /* __gl_meshSplitEdge( eOrg ) splits eOrg into two edges eOrg and eNew, - * such that eNew == eOrg.Lnext. The new vertex is eOrg.Sym.Org == eNew.Org. - * eOrg and eNew will have the same left face. + /* + * __gl_meshSplitEdge( eOrg ) splits eOrg into two edges eOrg and eNew, such that eNew == eOrg.Lnext. The new vertex + * is eOrg.Sym.Org == eNew.Org. eOrg and eNew will have the same left face. */ public static GLUhalfEdge __gl_meshSplitEdge(GLUhalfEdge eOrg) { GLUhalfEdge eNew; @@ -483,14 +436,11 @@ class Mesh { return eNew; } - /* __gl_meshConnect( eOrg, eDst ) creates a new edge from eOrg.Sym.Org - * to eDst.Org, and returns the corresponding half-edge eNew. - * If eOrg.Lface == eDst.Lface, this splits one loop into two, - * and the newly created loop is eNew.Lface. Otherwise, two disjoint - * loops are merged into one, and the loop eDst.Lface is destroyed. - * - * If (eOrg == eDst), the new face will have only two edges. - * If (eOrg.Lnext == eDst), the old face is reduced to a single edge. + /* + * __gl_meshConnect( eOrg, eDst ) creates a new edge from eOrg.Sym.Org to eDst.Org, and returns the corresponding + * half-edge eNew. If eOrg.Lface == eDst.Lface, this splits one loop into two, and the newly created loop is + * eNew.Lface. Otherwise, two disjoint loops are merged into one, and the loop eDst.Lface is destroyed. If (eOrg == + * eDst), the new face will have only two edges. If (eOrg.Lnext == eDst), the old face is reduced to a single edge. * If (eOrg.Lnext.Lnext == eDst), the old face is reduced to two edges. */ static GLUhalfEdge __gl_meshConnect(GLUhalfEdge eOrg, GLUhalfEdge eDst) { @@ -529,12 +479,11 @@ class Mesh { /******************** Other Operations **********************/ - /* __gl_meshZapFace( fZap ) destroys a face and removes it from the - * global face list. All edges of fZap will have a null pointer as their - * left face. Any edges which also have a null pointer as their right face - * are deleted entirely (along with any isolated vertices this produces). - * An entire mesh can be deleted by zapping its faces, one at a time, - * in any order. Zapped faces cannot be used in further mesh operations! + /* + * __gl_meshZapFace( fZap ) destroys a face and removes it from the global face list. All edges of fZap will have a + * null pointer as their left face. Any edges which also have a null pointer as their right face are deleted + * entirely (along with any isolated vertices this produces). An entire mesh can be deleted by zapping its faces, + * one at a time, in any order. Zapped faces cannot be used in further mesh operations! */ static void __gl_meshZapFace(GLUface fZap) { GLUhalfEdge eStart = fZap.anEdge; @@ -577,8 +526,8 @@ class Mesh { fPrev.next = fNext; } - /* __gl_meshNewMesh() creates a new mesh with no edges, no vertices, - * and no loops (what we usually call a "face"). + /* + * __gl_meshNewMesh() creates a new mesh with no edges, no vertices, and no loops (what we usually call a "face"). */ public static GLUmesh __gl_meshNewMesh() { GLUvertex v; @@ -624,8 +573,9 @@ class Mesh { return mesh; } - /* __gl_meshUnion( mesh1, mesh2 ) forms the union of all structures in - * both meshes, and returns the new mesh (the old meshes are destroyed). + /* + * __gl_meshUnion( mesh1, mesh2 ) forms the union of all structures in both meshes, and returns the new mesh (the + * old meshes are destroyed). */ static GLUmesh __gl_meshUnion(GLUmesh mesh1, GLUmesh mesh2) { GLUface f1 = mesh1.fHead; @@ -660,7 +610,8 @@ class Mesh { return mesh1; } - /* __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. + /* + * __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. */ static void __gl_meshDeleteMeshZap(GLUmesh mesh) { GLUface fHead = mesh.fHead; @@ -671,7 +622,8 @@ class Mesh { assert (mesh.vHead.next == mesh.vHead); } - /* __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. + /* + * __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. */ public static void __gl_meshDeleteMesh(GLUmesh mesh) { GLUface f, fNext; @@ -692,7 +644,8 @@ class Mesh { } } - /* __gl_meshCheckMesh( mesh ) checks a mesh for self-consistency. + /* + * __gl_meshCheckMesh( mesh ) checks a mesh for self-consistency. */ public static void __gl_meshCheckMesh(GLUmesh mesh) { GLUface fHead = mesh.fHead; @@ -742,8 +695,7 @@ class Mesh { assert (e.Lnext.Onext.Sym == e); assert (e.Onext.Sym.Lnext == e); } - assert (e.Sym.next == ePrev.Sym - && e.Sym == mesh.eHeadSym + assert (e.Sym.next == ePrev.Sym && e.Sym == mesh.eHeadSym && e.Sym.Sym == e && e.Org == null && e.Sym.Org == null diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/Normal.java b/src/main/java/org/lwjglx/util/glu/tessellation/Normal.java index d6dd492..083b788 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/Normal.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/Normal.java @@ -1,92 +1,53 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; import org.lwjglx.util.glu.GLU; class Normal { + private Normal() {} static boolean SLANTED_SWEEP; @@ -96,14 +57,12 @@ class Normal { static { if (SLANTED_SWEEP) { - /* The "feature merging" is not intended to be complete. There are - * special cases where edges are nearly parallel to the sweep line - * which are not implemented. The algorithm should still behave - * robustly (ie. produce a reasonable tesselation) in the presence - * of such edges, however it may miss features which could have been - * merged. We could minimize this effect by choosing the sweep line - * direction to be something unusual (ie. not parallel to one of the - * coordinate axes). + /* + * The "feature merging" is not intended to be complete. There are special cases where edges are nearly + * parallel to the sweep line which are not implemented. The algorithm should still behave robustly (ie. + * produce a reasonable tesselation) in the presence of such edges, however it may miss features which could + * have been merged. We could minimize this effect by choosing the sweep line direction to be something + * unusual (ie. not parallel to one of the coordinate axes). */ S_UNIT_X = 0.50941539564955385; /* Pre-normalized */ S_UNIT_Y = 0.86052074622010633; @@ -172,8 +131,8 @@ class Normal { } } - /* Find two vertices separated by at least 1/sqrt(3) of the maximum - * distance between any two vertices + /* + * Find two vertices separated by at least 1/sqrt(3) of the maximum distance between any two vertices */ i = 0; if (maxVal[1] - minVal[1] > maxVal[0] - minVal[0]) { @@ -190,8 +149,9 @@ class Normal { return; } - /* Look for a third vertex which forms the triangle with maximum area - * (Length of normal == twice the triangle area) + /* + * Look for a third vertex which forms the triangle with maximum area (Length of normal == twice the triangle + * area) */ maxLen2 = 0; v1 = minVert[i]; @@ -228,8 +188,9 @@ class Normal { GLUvertex v, vHead = tess.mesh.vHead; GLUhalfEdge e; - /* When we compute the normal automatically, we choose the orientation - * so that the the sum of the signed areas of all contours is non-negative. + /* + * When we compute the normal automatically, we choose the orientation so that the the sum of the signed areas + * of all contours is non-negative. */ area = 0; for (f = fHead.next; f != fHead; f = f.next) { @@ -251,8 +212,8 @@ class Normal { } } - /* Determine the polygon normal and project vertices onto the plane - * of the polygon. + /* + * Determine the polygon normal and project vertices onto the plane of the polygon. */ public static void __gl_projectPolygon(GLUtessellatorImpl tess) { GLUvertex v, vHead = tess.mesh.vHead; @@ -274,8 +235,8 @@ class Normal { i = LongAxis(norm); if (TRUE_PROJECT) { - /* Choose the initial sUnit vector to be approximately perpendicular - * to the normal. + /* + * Choose the initial sUnit vector to be approximately perpendicular to the normal. */ Normalize(norm); diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQ.java b/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQ.java index 2186a52..68f534a 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQ.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQ.java @@ -1,112 +1,76 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; abstract class PriorityQ { + public static final int INIT_SIZE = 32; public static class PQnode { + int handle; } public static class PQhandleElem { + Object key; int node; } public interface Leq { + boolean leq(Object key1, Object key2); } - // #ifdef FOR_TRITE_TEST_PROGRAM - // private static boolean LEQ(PriorityQCommon.Leq leq, Object x,Object y) { - // return pq.leq.leq(x,y); - // } - // #else + // #ifdef FOR_TRITE_TEST_PROGRAM + // private static boolean LEQ(PriorityQCommon.Leq leq, Object x,Object y) { + // return pq.leq.leq(x,y); + // } + // #else /* Violates modularity, but a little faster */ - // #include "geom.h" + // #include "geom.h" public static boolean LEQ(Leq leq, Object x, Object y) { return Geom.VertLeq((GLUvertex) x, (GLUvertex) y); } @@ -128,5 +92,5 @@ abstract class PriorityQ { abstract Object pqMinimum(); abstract boolean pqIsEmpty(); - // #endif + // #endif } diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQHeap.java b/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQHeap.java index 6be4d17..18488c3 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQHeap.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQHeap.java @@ -1,90 +1,51 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class PriorityQHeap extends PriorityQ { + PriorityQ.PQnode[] nodes; PriorityQ.PQhandleElem[] handles; int size, max; @@ -125,7 +86,7 @@ class PriorityQHeap extends PriorityQ { int child; hCurr = n[curr].handle; - for (; ; ) { + for (;;) { child = curr << 1; if (child < size && LEQ(leq, h[n[child + 1].handle].key, h[n[child].handle].key)) { ++child; @@ -152,7 +113,7 @@ class PriorityQHeap extends PriorityQ { int parent; hCurr = n[curr].handle; - for (; ; ) { + for (;;) { parent = curr >> 1; hParent = n[parent].handle; if (parent == 0 || LEQ(leq, h[hParent].key, h[hCurr].key)) { @@ -193,7 +154,7 @@ class PriorityQHeap extends PriorityQ { /* If the heap overflows, double its size. */ max <<= 1; - // pq->nodes = (PQnode *)memRealloc( pq->nodes, (size_t) ((pq->max + 1) * sizeof( pq->nodes[0] + // pq->nodes = (PQnode *)memRealloc( pq->nodes, (size_t) ((pq->max + 1) * sizeof( pq->nodes[0] // ))); PriorityQ.PQnode[] pqNodes = new PriorityQ.PQnode[max + 1]; System.arraycopy(nodes, 0, pqNodes, 0, nodes.length); @@ -206,7 +167,7 @@ class PriorityQHeap extends PriorityQ { return Integer.MAX_VALUE; } - // pq->handles = (PQhandleElem *)memRealloc( pq->handles,(size_t)((pq->max + 1) * sizeof( + // pq->handles = (PQhandleElem *)memRealloc( pq->handles,(size_t)((pq->max + 1) * sizeof( // pq->handles[0] ))); PriorityQ.PQhandleElem[] pqHandles = new PriorityQ.PQhandleElem[max + 1]; System.arraycopy(handles, 0, pqHandles, 0, handles.length); diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQSort.java b/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQSort.java index 69e0db3..cfd3fa1 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQSort.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/PriorityQSort.java @@ -1,85 +1,47 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class PriorityQSort extends PriorityQ { + PriorityQHeap heap; Object[] keys; @@ -126,6 +88,7 @@ class PriorityQSort extends PriorityQ { } private static class Stack { + int p, r; } @@ -141,14 +104,14 @@ class PriorityQSort extends PriorityQ { int seed = 2016473283; - /* Create an array of indirect pointers to the keys, so that we - * the handles we have returned are still valid. + /* + * Create an array of indirect pointers to the keys, so that we the handles we have returned are still valid. */ order = new int[size + 1]; /* the previous line is a patch to compensate for the fact that IBM */ - /* machines return a null on a malloc of zero bytes (unlike SGI), */ - /* so we have to put in this defense to guard against a memory */ - /* fault four lines down. from fossum@austin.ibm.com. */ + /* machines return a null on a malloc of zero bytes (unlike SGI), */ + /* so we have to put in this defense to guard against a memory */ + /* fault four lines down. from fossum@austin.ibm.com. */ p = 0; r = size - 1; for (piv = 0, i = p; i <= r; ++piv, ++i) { @@ -156,8 +119,8 @@ class PriorityQSort extends PriorityQ { order[i] = piv; } - /* Sort the indirect pointers in descending order, - * using randomized Quicksort + /* + * Sort the indirect pointers in descending order, using randomized Quicksort */ stack[top].p = p; stack[top].r = r; @@ -208,13 +171,10 @@ class PriorityQSort extends PriorityQ { initialized = true; heap.pqInit(); /* always succeeds */ - /* #ifndef NDEBUG - p = order; - r = p + size - 1; - for (i = p; i < r; ++i) { - Assertion.doAssert(LEQ( * * (i + 1), **i )); - } - #endif*/ + /* + * #ifndef NDEBUG p = order; r = p + size - 1; for (i = p; i < r; ++i) { Assertion.doAssert(LEQ( * * (i + 1), + * **i )); } #endif + */ return true; } @@ -233,7 +193,7 @@ class PriorityQSort extends PriorityQ { /* If the heap overflows, double its size. */ max <<= 1; - // pq->keys = (PQHeapKey *)memRealloc( pq->keys,(size_t)(pq->max * sizeof( pq->keys[0] ))); + // pq->keys = (PQHeapKey *)memRealloc( pq->keys,(size_t)(pq->max * sizeof( pq->keys[0] ))); Object[] pqKeys = new Object[max]; System.arraycopy(keys, 0, pqKeys, 0, keys.length); keys = pqKeys; diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/Render.java b/src/main/java/org/lwjglx/util/glu/tessellation/Render.java index f689cdf..367b342 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/Render.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/Render.java @@ -1,86 +1,46 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; @@ -88,6 +48,7 @@ import static org.lwjgl.opengl.GL11.*; import static org.lwjglx.util.glu.GLU.*; class Render { + private static final boolean USE_OPTIMIZED_CODE_PATH = false; private Render() {} @@ -96,11 +57,12 @@ class Render { private static final RenderStrip renderStrip = new RenderStrip(); private static final RenderTriangle renderTriangle = new RenderTriangle(); - /* This structure remembers the information we need about a primitive - * to be able to render it later, once we have determined which - * primitive is able to use the most triangles. + /* + * This structure remembers the information we need about a primitive to be able to render it later, once we have + * determined which primitive is able to use the most triangles. */ private static class FaceCount { + private FaceCount() {} private FaceCount(long size, GLUhalfEdge eStart, renderCallBack render) { @@ -112,21 +74,19 @@ class Render { long size; /* number of triangles used */ GLUhalfEdge eStart; /* edge where this primitive starts */ renderCallBack render; - } - ; + }; private interface renderCallBack { + void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size); } /************************ Strips and Fans decomposition ******************/ - /* __gl_renderMesh( tess, mesh ) takes a mesh and breaks it into triangle - * fans, strips, and separate triangles. A substantial effort is made - * to use as few rendering primitives as possible (ie. to make the fans - * and strips as large as possible). - * - * The rendering output is provided as callbacks (see the api). + /* + * __gl_renderMesh( tess, mesh ) takes a mesh and breaks it into triangle fans, strips, and separate triangles. A + * substantial effort is made to use as few rendering primitives as possible (ie. to make the fans and strips as + * large as possible). The rendering output is provided as callbacks (see the api). */ public static void __gl_renderMesh(GLUtessellatorImpl tess, GLUmesh mesh) { GLUface f; @@ -139,9 +99,9 @@ class Render { } for (f = mesh.fHead.next; f != mesh.fHead; f = f.next) { - /* We examine all faces in an arbitrary order. Whenever we find - * an unprocessed face F, we output a group of faces including F - * whose size is maximum. + /* + * We examine all faces in an arbitrary order. Whenever we find an unprocessed face F, we output a group of + * faces including F whose size is maximum. */ if (f.inside && !f.marked) { RenderMaximumFaceGroup(tess, f); @@ -155,12 +115,11 @@ class Render { } static void RenderMaximumFaceGroup(GLUtessellatorImpl tess, GLUface fOrig) { - /* We want to find the largest triangle fan or strip of unmarked faces - * which includes the given face fOrig. There are 3 possible fans - * passing through fOrig (one centered at each vertex), and 3 possible - * strips (one for each CCW permutation of the vertices). Our strategy - * is to try all of these, and take the primitive which uses the most - * triangles (a greedy approach). + /* + * We want to find the largest triangle fan or strip of unmarked faces which includes the given face fOrig. + * There are 3 possible fans passing through fOrig (one centered at each vertex), and 3 possible strips (one for + * each CCW permutation of the vertices). Our strategy is to try all of these, and take the primitive which uses + * the most triangles (a greedy approach). */ GLUhalfEdge e = fOrig.anEdge; FaceCount max = new FaceCount(); @@ -200,12 +159,11 @@ class Render { max.render.render(tess, max.eStart, max.size); } - /* Macros which keep track of faces we have marked temporarily, and allow - * us to backtrack when necessary. With triangle fans, this is not - * really necessary, since the only awkward case is a loop of triangles - * around a single origin vertex. However with strips the situation is - * more complicated, and we need a general tracking method like the - * one here. + /* + * Macros which keep track of faces we have marked temporarily, and allow us to backtrack when necessary. With + * triangle fans, this is not really necessary, since the only awkward case is a loop of triangles around a single + * origin vertex. However with strips the situation is more complicated, and we need a general tracking method like + * the one here. */ private static boolean Marked(GLUface f) { return !f.inside || f.marked; @@ -229,9 +187,9 @@ class Render { } static FaceCount MaximumFan(GLUhalfEdge eOrig) { - /* eOrig.Lface is the face we want to render. We want to find the size - * of a maximal fan around eOrig.Org. To do this we just walk around - * the origin vertex as far as possible in both directions. + /* + * eOrig.Lface is the face we want to render. We want to find the size of a maximal fan around eOrig.Org. To do + * this we just walk around the origin vertex as far as possible in both directions. */ FaceCount newFace = new FaceCount(0, null, renderFan); GLUface trail = null; @@ -246,7 +204,7 @@ class Render { ++newFace.size; } newFace.eStart = e; - /*LINTED*/ + /* LINTED */ FreeTrail(trail); return newFace; } @@ -256,15 +214,12 @@ class Render { } static FaceCount MaximumStrip(GLUhalfEdge eOrig) { - /* Here we are looking for a maximal strip that contains the vertices - * eOrig.Org, eOrig.Dst, eOrig.Lnext.Dst (in that order or the - * reverse, such that all triangles are oriented CCW). - * - * Again we walk forward and backward as far as possible. However for - * strips there is a twist: to get CCW orientations, there must be - * an *even* number of triangles in the strip on one side of eOrig. - * We walk the strip starting on a side with an even number of triangles; - * if both side have an odd number, we are forced to shorten one side. + /* + * Here we are looking for a maximal strip that contains the vertices eOrig.Org, eOrig.Dst, eOrig.Lnext.Dst (in + * that order or the reverse, such that all triangles are oriented CCW). Again we walk forward and backward as + * far as possible. However for strips there is a twist: to get CCW orientations, there must be an *even* number + * of triangles in the strip on one side of eOrig. We walk the strip starting on a side with an even number of + * triangles; if both side have an odd number, we are forced to shorten one side. */ FaceCount newFace = new FaceCount(0, null, renderStrip); long headSize = 0, tailSize = 0; @@ -295,21 +250,23 @@ class Render { } else if (IsEven(headSize)) { newFace.eStart = eHead; } else { - /* Both sides have odd length, we must shorten one of them. In fact, - * we must start from eHead to guarantee inclusion of eOrig.Lface. + /* + * Both sides have odd length, we must shorten one of them. In fact, we must start from eHead to guarantee + * inclusion of eOrig.Lface. */ --newFace.size; newFace.eStart = eHead.Onext; } - /*LINTED*/ + /* LINTED */ FreeTrail(trail); return newFace; } private static class RenderTriangle implements renderCallBack { + public void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size) { - /* Just add the triangle to a triangle list, so we can render all - * the separate triangles at once. + /* + * Just add the triangle to a triangle list, so we can render all the separate triangles at once. */ assert (size == 1); tess.lonelyTriList = AddToTrail(e.Lface, tess.lonelyTriList); @@ -317,8 +274,8 @@ class Render { } static void RenderLonelyTriangles(GLUtessellatorImpl tess, GLUface f) { - /* Now we render all the separate triangles which could not be - * grouped into a triangle fan or strip. + /* + * Now we render all the separate triangles which could not be grouped into a triangle fan or strip. */ GLUhalfEdge e; int newState; @@ -332,8 +289,9 @@ class Render { e = f.anEdge; do { if (tess.flagBoundary) { - /* Set the "edge state" to true just before we output the - * first vertex of each edge on the polygon boundary. + /* + * Set the "edge state" to true just before we output the first vertex of each edge on the polygon + * boundary. */ newState = (!e.Sym.Lface.inside) ? 1 : 0; if (edgeState != newState) { @@ -350,10 +308,11 @@ class Render { } private static class RenderFan implements renderCallBack { + public void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size) { - /* Render as many CCW triangles as possible in a fan starting from - * edge "e". The fan *should* contain exactly "size" triangles - * (otherwise we've goofed up somewhere). + /* + * Render as many CCW triangles as possible in a fan starting from edge "e". The fan *should* contain + * exactly "size" triangles (otherwise we've goofed up somewhere). */ tess.callBeginOrBeginData(GL_TRIANGLE_FAN); tess.callVertexOrVertexData(e.Org.data); @@ -372,10 +331,11 @@ class Render { } private static class RenderStrip implements renderCallBack { + public void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size) { - /* Render as many CCW triangles as possible in a strip starting from - * edge "e". The strip *should* contain exactly "size" triangles - * (otherwise we've goofed up somewhere). + /* + * Render as many CCW triangles as possible in a strip starting from edge "e". The strip *should* contain + * exactly "size" triangles (otherwise we've goofed up somewhere). */ tess.callBeginOrBeginData(GL_TRIANGLE_STRIP); tess.callVertexOrVertexData(e.Org.data); @@ -401,9 +361,9 @@ class Render { /************************ Boundary contour decomposition ******************/ - /* __gl_renderBoundary( tess, mesh ) takes a mesh, and outputs one - * contour for each face marked "inside". The rendering output is - * provided as callbacks (see the api). + /* + * __gl_renderBoundary( tess, mesh ) takes a mesh, and outputs one contour for each face marked "inside". The + * rendering output is provided as callbacks (see the api). */ public static void __gl_renderBoundary(GLUtessellatorImpl tess, GLUmesh mesh) { GLUface f; @@ -425,35 +385,31 @@ class Render { /************************ Quick-and-dirty decomposition ******************/ private static final int SIGN_INCONSISTENT = 2; - static int ComputeNormal(GLUtessellatorImpl tess, double[] norm, boolean check) /* - * If check==false, we compute the polygon normal and place it in norm[]. - * If check==true, we check that each triangle in the fan from v0 has a - * consistent orientation with respect to norm[]. If triangles are - * consistently oriented CCW, return 1; if CW, return -1; if all triangles - * are degenerate return 0; otherwise (no consistent orientation) return - * SIGN_INCONSISTENT. - */ { + static int ComputeNormal(GLUtessellatorImpl tess, double[] norm, + boolean check) /* + * If check==false, we compute the polygon normal and place it in norm[]. If check==true, we + * check that each triangle in the fan from v0 has a consistent orientation with respect to + * norm[]. If triangles are consistently oriented CCW, return 1; if CW, return -1; if all + * triangles are degenerate return 0; otherwise (no consistent orientation) return + * SIGN_INCONSISTENT. + */ { CachedVertex[] v = tess.cache; - // CachedVertex vn = v0 + tess.cacheCount; + // CachedVertex vn = v0 + tess.cacheCount; int vn = tess.cacheCount; - // CachedVertex vc; + // CachedVertex vc; int vc; double dot, xc, yc, zc, xp, yp, zp; double[] n = new double[3]; int sign = 0; - /* Find the polygon normal. It is important to get a reasonable - * normal even when the polygon is self-intersecting (eg. a bowtie). - * Otherwise, the computed normal could be very tiny, but perpendicular - * to the true plane of the polygon due to numerical noise. Then all - * the triangles would appear to be degenerate and we would incorrectly - * decompose the polygon as a fan (or simply not render it at all). - * - * We use a sum-of-triangles normal algorithm rather than the more - * efficient sum-of-trapezoids method (used in CheckOrientation() - * in normal.c). This lets us explicitly reverse the signed area - * of some triangles to get a reasonable normal in the self-intersecting - * case. + /* + * Find the polygon normal. It is important to get a reasonable normal even when the polygon is + * self-intersecting (eg. a bowtie). Otherwise, the computed normal could be very tiny, but perpendicular to the + * true plane of the polygon due to numerical noise. Then all the triangles would appear to be degenerate and we + * would incorrectly decompose the polygon as a fan (or simply not render it at all). We use a sum-of-triangles + * normal algorithm rather than the more efficient sum-of-trapezoids method (used in CheckOrientation() in + * normal.c). This lets us explicitly reverse the signed area of some triangles to get a reasonable normal in + * the self-intersecting case. */ if (!check) { norm[0] = norm[1] = norm[2] = 0.0; @@ -478,8 +434,9 @@ class Render { dot = n[0] * norm[0] + n[1] * norm[1] + n[2] * norm[2]; if (!check) { - /* Reverse the contribution of back-facing triangles to get - * a reasonable normal for self-intersecting polygons (see above) + /* + * Reverse the contribution of back-facing triangles to get a reasonable normal for self-intersecting + * polygons (see above) */ if (dot >= 0) { norm[0] += n[0]; @@ -504,18 +461,16 @@ class Render { return sign; } - /* __gl_renderCache( tess ) takes a single contour and tries to render it - * as a triangle fan. This handles convex polygons, as well as some - * non-convex polygons if we get lucky. - * - * Returns true if the polygon was successfully rendered. The rendering - * output is provided as callbacks (see the api). + /* + * __gl_renderCache( tess ) takes a single contour and tries to render it as a triangle fan. This handles convex + * polygons, as well as some non-convex polygons if we get lucky. Returns true if the polygon was successfully + * rendered. The rendering output is provided as callbacks (see the api). */ public static boolean __gl_renderCache(GLUtessellatorImpl tess) { CachedVertex[] v = tess.cache; - // CachedVertex vn = v0 + tess.cacheCount; + // CachedVertex vn = v0 + tess.cacheCount; int vn = tess.cacheCount; - // CachedVertex vc; + // CachedVertex vc; int vc; double[] norm = new double[3]; int sign; diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/Sweep.java b/src/main/java/org/lwjglx/util/glu/tessellation/Sweep.java index b0b5feb..210b395 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/Sweep.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/Sweep.java @@ -1,133 +1,79 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; import static org.lwjglx.util.glu.GLU.*; class Sweep { + private Sweep() {} - // #ifdef FOR_TRITE_TEST_PROGRAM - // extern void DebugEvent( GLUtessellator *tess ); - // #else + // #ifdef FOR_TRITE_TEST_PROGRAM + // extern void DebugEvent( GLUtessellator *tess ); + // #else private static void DebugEvent(GLUtessellatorImpl tess) {} - // #endif + // #endif /* - * Invariants for the Edge Dictionary. - * - each pair of adjacent edges e2=Succ(e1) satisfies EdgeLeq(e1,e2) - * at any valid location of the sweep event - * - if EdgeLeq(e2,e1) as well (at any valid sweep event), then e1 and e2 - * share a common endpoint - * - for each e, e.Dst has been processed, but not e.Org - * - each edge e satisfies VertLeq(e.Dst,event) && VertLeq(event,e.Org) - * where "event" is the current sweep line event. - * - no edge e has zero length - * - * Invariants for the Mesh (the processed portion). - * - the portion of the mesh left of the sweep line is a planar graph, - * ie. there is *some* way to embed it in the plane - * - no processed edge has zero length - * - no two processed vertices have identical coordinates - * - each "inside" region is monotone, ie. can be broken into two chains - * of monotonically increasing vertices according to VertLeq(v1,v2) - * - a non-invariant: these chains may intersect (very slightly) - * - * Invariants for the Sweep. - * - if none of the edges incident to the event vertex have an activeRegion - * (ie. none of these edges are in the edge dictionary), then the vertex - * has only right-going edges. - * - if an edge is marked "fixUpperEdge" (it is a temporary edge introduced - * by ConnectRightVertex), then it is the only right-going edge from - * its associated vertex. (This says that these edges exist only - * when it is necessary.) + * Invariants for the Edge Dictionary. - each pair of adjacent edges e2=Succ(e1) satisfies EdgeLeq(e1,e2) at any + * valid location of the sweep event - if EdgeLeq(e2,e1) as well (at any valid sweep event), then e1 and e2 share a + * common endpoint - for each e, e.Dst has been processed, but not e.Org - each edge e satisfies + * VertLeq(e.Dst,event) && VertLeq(event,e.Org) where "event" is the current sweep line event. - no edge e has zero + * length Invariants for the Mesh (the processed portion). - the portion of the mesh left of the sweep line is a + * planar graph, ie. there is *some* way to embed it in the plane - no processed edge has zero length - no two + * processed vertices have identical coordinates - each "inside" region is monotone, ie. can be broken into two + * chains of monotonically increasing vertices according to VertLeq(v1,v2) - a non-invariant: these chains may + * intersect (very slightly) Invariants for the Sweep. - if none of the edges incident to the event vertex have an + * activeRegion (ie. none of these edges are in the edge dictionary), then the vertex has only right-going edges. - + * if an edge is marked "fixUpperEdge" (it is a temporary edge introduced by ConnectRightVertex), then it is the + * only right-going edge from its associated vertex. (This says that these edges exist only when it is necessary.) */ - /* When we merge two edges into one, we need to compute the combined - * winding of the new edge. + /* + * When we merge two edges into one, we need to compute the combined winding of the new edge. */ private static void AddWinding(GLUhalfEdge eDst, GLUhalfEdge eSrc) { eDst.winding += eSrc.winding; @@ -142,17 +88,15 @@ class Sweep { return ((ActiveRegion) Dict.dictKey(Dict.dictSucc(r.nodeUp))); } - static boolean EdgeLeq(GLUtessellatorImpl tess, ActiveRegion reg1, ActiveRegion reg2) /* - * Both edges must be directed from right to left (this is the canonical - * direction for the upper edge of each region). - * - * The strategy is to evaluate a "t" value for each edge at the - * current sweep line position, given by tess.event. The calculations - * are designed to be very stable, but of course they are not perfect. - * - * Special case: if both edge destinations are at the sweep event, - * we sort the edges by slope (they would otherwise compare equally). - */ { + static boolean EdgeLeq(GLUtessellatorImpl tess, ActiveRegion reg1, + ActiveRegion reg2) /* + * Both edges must be directed from right to left (this is the canonical direction for + * the upper edge of each region). The strategy is to evaluate a "t" value for each edge + * at the current sweep line position, given by tess.event. The calculations are designed + * to be very stable, but of course they are not perfect. Special case: if both edge + * destinations are at the sweep event, we sort the edges by slope (they would otherwise + * compare equally). + */ { GLUvertex event = tess.event; GLUhalfEdge e1, e2; double t1, t2; @@ -162,8 +106,8 @@ class Sweep { if (e1.Sym.Org == event) { if (e2.Sym.Org == event) { - /* Two edges right of the sweep line which meet at the sweep event. - * Sort them by slope. + /* + * Two edges right of the sweep line which meet at the sweep event. Sort them by slope. */ if (Geom.VertLeq(e1.Org, e2.Org)) { return Geom.EdgeSign(e2.Sym.Org, e1.Org, e2.Org) <= 0; @@ -184,9 +128,9 @@ class Sweep { static void DeleteRegion(GLUtessellatorImpl tess, ActiveRegion reg) { if (reg.fixUpperEdge) { - /* It was created with zero winding number, so it better be - * deleted with zero winding number (ie. it better not get merged - * with a real edge). + /* + * It was created with zero winding number, so it better be deleted with zero winding number (ie. it better + * not get merged with a real edge). */ assert (reg.eUp.winding == 0); } @@ -194,9 +138,10 @@ class Sweep { Dict.dictDelete(tess.dict, reg.nodeUp); /* __gl_dictListDelete */ } - static boolean FixUpperEdge(ActiveRegion reg, GLUhalfEdge newEdge) /* - * Replace an upper edge which needs fixing (see ConnectRightVertex). - */ { + static boolean FixUpperEdge(ActiveRegion reg, + GLUhalfEdge newEdge) /* + * Replace an upper edge which needs fixing (see ConnectRightVertex). + */ { assert (reg.fixUpperEdge); if (!Mesh.__gl_meshDelete(reg.eUp)) return false; reg.fixUpperEdge = false; @@ -215,8 +160,8 @@ class Sweep { reg = RegionAbove(reg); } while (reg.eUp.Org == org); - /* If the edge above was a temporary edge introduced by ConnectRightVertex, - * now is the time to fix it. + /* + * If the edge above was a temporary edge introduced by ConnectRightVertex, now is the time to fix it. */ if (reg.fixUpperEdge) { e = Mesh.__gl_meshConnect(RegionBelow(reg).eUp.Sym, reg.eUp.Lnext); @@ -237,12 +182,12 @@ class Sweep { return reg; } - static ActiveRegion AddRegionBelow(GLUtessellatorImpl tess, ActiveRegion regAbove, GLUhalfEdge eNewUp) /* - * Add a new active region to the sweep line, *somewhere* below "regAbove" - * (according to where the new edge belongs in the sweep-line dictionary). - * The upper edge of the new region will be "eNewUp". - * Winding number and "inside" flag are not updated. - */ { + static ActiveRegion AddRegionBelow(GLUtessellatorImpl tess, ActiveRegion regAbove, + GLUhalfEdge eNewUp) /* + * Add a new active region to the sweep line, *somewhere* below "regAbove" (according to + * where the new edge belongs in the sweep-line dictionary). The upper edge of the new + * region will be "eNewUp". Winding number and "inside" flag are not updated. + */ { ActiveRegion regNew = new ActiveRegion(); // if (regNew == null) throw new RuntimeException(); @@ -276,10 +221,10 @@ class Sweep { return (n >= 2) || (n <= -2); } } - /*LINTED*/ - // assert (false); + /* LINTED */ + // assert (false); throw new InternalError(); - /*NOTREACHED*/ + /* NOTREACHED */ } static void ComputeWinding(GLUtessellatorImpl tess, ActiveRegion reg) { @@ -287,13 +232,13 @@ class Sweep { reg.inside = IsWindingInside(tess, reg.windingNumber); } - static void FinishRegion(GLUtessellatorImpl tess, ActiveRegion reg) /* - * Delete a region from the sweep line. This happens when the upper - * and lower chains of a region meet (at a vertex on the sweep line). - * The "inside" flag is copied to the appropriate mesh face (we could - * not do this before -- since the structure of the mesh is always - * changing, this face may not have even existed until now). - */ { + static void FinishRegion(GLUtessellatorImpl tess, + ActiveRegion reg) /* + * Delete a region from the sweep line. This happens when the upper and lower chains of a + * region meet (at a vertex on the sweep line). The "inside" flag is copied to the + * appropriate mesh face (we could not do this before -- since the structure of the mesh + * is always changing, this face may not have even existed until now). + */ { GLUhalfEdge e = reg.eUp; GLUface f = e.Lface; @@ -302,18 +247,17 @@ class Sweep { DeleteRegion(tess, reg); } - static GLUhalfEdge FinishLeftRegions(GLUtessellatorImpl tess, ActiveRegion regFirst, ActiveRegion regLast) /* - * We are given a vertex with one or more left-going edges. All affected - * edges should be in the edge dictionary. Starting at regFirst.eUp, - * we walk down deleting all regions where both edges have the same - * origin vOrg. At the same time we copy the "inside" flag from the - * active region to the face, since at this point each face will belong - * to at most one region (this was not necessarily true until this point - * in the sweep). The walk stops at the region above regLast; if regLast - * is null we walk as far as possible. At the same time we relink the - * mesh if necessary, so that the ordering of edges around vOrg is the - * same as in the dictionary. - */ { + static GLUhalfEdge FinishLeftRegions(GLUtessellatorImpl tess, ActiveRegion regFirst, + ActiveRegion regLast) /* + * We are given a vertex with one or more left-going edges. All affected edges should + * be in the edge dictionary. Starting at regFirst.eUp, we walk down deleting all + * regions where both edges have the same origin vOrg. At the same time we copy the + * "inside" flag from the active region to the face, since at this point each face + * will belong to at most one region (this was not necessarily true until this point + * in the sweep). The walk stops at the region above regLast; if regLast is null we + * walk as far as possible. At the same time we relink the mesh if necessary, so that + * the ordering of edges around vOrg is the same as in the dictionary. + */ { ActiveRegion reg, regPrev; GLUhalfEdge e, ePrev; @@ -325,17 +269,17 @@ class Sweep { e = reg.eUp; if (e.Org != ePrev.Org) { if (!reg.fixUpperEdge) { - /* Remove the last left-going edge. Even though there are no further - * edges in the dictionary with this origin, there may be further - * such edges in the mesh (if we are adding left edges to a vertex - * that has already been processed). Thus it is important to call - * FinishRegion rather than just DeleteRegion. + /* + * Remove the last left-going edge. Even though there are no further edges in the dictionary with + * this origin, there may be further such edges in the mesh (if we are adding left edges to a vertex + * that has already been processed). Thus it is important to call FinishRegion rather than just + * DeleteRegion. */ FinishRegion(tess, regPrev); break; } - /* If the edge below was a temporary edge introduced by - * ConnectRightVertex, now is the time to fix it. + /* + * If the edge below was a temporary edge introduced by ConnectRightVertex, now is the time to fix it. */ e = Mesh.__gl_meshConnect(ePrev.Onext.Sym, e.Sym); if (e == null) throw new RuntimeException(); @@ -354,23 +298,15 @@ class Sweep { return ePrev; } - static void AddRightEdges( - GLUtessellatorImpl tess, - ActiveRegion regUp, - GLUhalfEdge eFirst, - GLUhalfEdge eLast, - GLUhalfEdge eTopLeft, - boolean cleanUp) - /* - * Purpose: insert right-going edges into the edge dictionary, and update - * winding numbers and mesh connectivity appropriately. All right-going - * edges share a common origin vOrg. Edges are inserted CCW starting at - * eFirst; the last edge inserted is eLast.Sym.Lnext. If vOrg has any - * left-going edges already processed, then eTopLeft must be the edge - * such that an imaginary upward vertical segment from vOrg would be - * contained between eTopLeft.Sym.Lnext and eTopLeft; otherwise eTopLeft - * should be null. - */ { + static void AddRightEdges(GLUtessellatorImpl tess, ActiveRegion regUp, GLUhalfEdge eFirst, GLUhalfEdge eLast, + GLUhalfEdge eTopLeft, boolean cleanUp) + /* + * Purpose: insert right-going edges into the edge dictionary, and update winding numbers and mesh connectivity + * appropriately. All right-going edges share a common origin vOrg. Edges are inserted CCW starting at eFirst; the + * last edge inserted is eLast.Sym.Lnext. If vOrg has any left-going edges already processed, then eTopLeft must be + * the edge such that an imaginary upward vertical segment from vOrg would be contained between eTopLeft.Sym.Lnext + * and eTopLeft; otherwise eTopLeft should be null. + */ { ActiveRegion reg, regPrev; GLUhalfEdge e, ePrev; boolean firstTime = true; @@ -383,16 +319,16 @@ class Sweep { e = e.Onext; } while (e != eLast); - /* Walk *all* right-going edges from e.Org, in the dictionary order, - * updating the winding numbers of each region, and re-linking the mesh - * edges to match the dictionary ordering (if necessary). + /* + * Walk *all* right-going edges from e.Org, in the dictionary order, updating the winding numbers of each + * region, and re-linking the mesh edges to match the dictionary ordering (if necessary). */ if (eTopLeft == null) { eTopLeft = RegionBelow(regUp).eUp.Sym.Onext; } regPrev = regUp; ePrev = eTopLeft; - for (; ; ) { + for (;;) { reg = RegionBelow(regPrev); e = reg.eUp.Sym; if (e.Org != ePrev.Org) break; @@ -406,8 +342,9 @@ class Sweep { reg.windingNumber = regPrev.windingNumber - e.winding; reg.inside = IsWindingInside(tess, reg.windingNumber); - /* Check for two outgoing edges with same slope -- process these - * before any intersection tests (see example in __gl_computeInterior). + /* + * Check for two outgoing edges with same slope -- process these before any intersection tests (see example + * in __gl_computeInterior). */ regPrev.dirty = true; if (!firstTime && CheckForRightSplice(tess, regPrev)) { @@ -443,9 +380,9 @@ class Sweep { if (!needed) { isect.data = data[0]; } else if (!tess.fatalError) { - /* The only way fatal error is when two edges are found to intersect, - * but the user has not provided the callback necessary to handle - * generated intersection points. + /* + * The only way fatal error is when two edges are found to intersect, but the user has not provided the + * callback necessary to handle generated intersection points. */ tess.callErrorOrErrorData(GLU_TESS_NEED_COMBINE_CALLBACK); tess.fatalError = true; @@ -453,12 +390,13 @@ class Sweep { } } - static void SpliceMergeVertices(GLUtessellatorImpl tess, GLUhalfEdge e1, GLUhalfEdge e2) /* - * Two vertices with idential coordinates are combined into one. - * e1.Org is kept, while e2.Org is discarded. - */ { + static void SpliceMergeVertices(GLUtessellatorImpl tess, GLUhalfEdge e1, + GLUhalfEdge e2) /* + * Two vertices with idential coordinates are combined into one. e1.Org is kept, while + * e2.Org is discarded. + */ { Object[] data = new Object[4]; - float[] weights = new float[] {0.5f, 0.5f, 0.0f, 0.0f}; + float[] weights = new float[] { 0.5f, 0.5f, 0.0f, 0.0f }; data[0] = e1.Org.data; data[1] = e2.Org.data; @@ -466,13 +404,13 @@ class Sweep { if (!Mesh.__gl_meshSplice(e1, e2)) throw new RuntimeException(); } - static void VertexWeights(GLUvertex isect, GLUvertex org, GLUvertex dst, float[] weights) /* - * Find some weights which describe how the intersection vertex is - * a linear combination of "org" and "dest". Each of the two edges - * which generated "isect" is allocated 50% of the weight; each edge - * splits the weight between its org and dst according to the - * relative distance to "isect". - */ { + static void VertexWeights(GLUvertex isect, GLUvertex org, GLUvertex dst, + float[] weights) /* + * Find some weights which describe how the intersection vertex is a linear combination of + * "org" and "dest". Each of the two edges which generated "isect" is allocated 50% of the + * weight; each edge splits the weight between its org and dst according to the relative + * distance to "isect". + */ { double t1 = Geom.VertL1dist(org, isect); double t2 = Geom.VertL1dist(dst, isect); @@ -483,18 +421,12 @@ class Sweep { isect.coords[2] += weights[0] * org.coords[2] + weights[1] * dst.coords[2]; } - static void GetIntersectData( - GLUtessellatorImpl tess, - GLUvertex isect, - GLUvertex orgUp, - GLUvertex dstUp, - GLUvertex orgLo, - GLUvertex dstLo) - /* - * We've computed a new intersection point, now we need a "data" pointer - * from the user so that we can refer to this new vertex in the - * rendering callbacks. - */ { + static void GetIntersectData(GLUtessellatorImpl tess, GLUvertex isect, GLUvertex orgUp, GLUvertex dstUp, + GLUvertex orgLo, GLUvertex dstLo) + /* + * We've computed a new intersection point, now we need a "data" pointer from the user so that we can refer to this + * new vertex in the rendering callbacks. + */ { Object[] data = new Object[4]; float[] weights = new float[4]; float[] weights1 = new float[2]; @@ -514,31 +446,25 @@ class Sweep { CallCombine(tess, isect, data, weights, true); } - static boolean CheckForRightSplice(GLUtessellatorImpl tess, ActiveRegion regUp) /* - * Check the upper and lower edge of "regUp", to make sure that the - * eUp.Org is above eLo, or eLo.Org is below eUp (depending on which - * origin is leftmost). - * - * The main purpose is to splice right-going edges with the same - * dest vertex and nearly identical slopes (ie. we can't distinguish - * the slopes numerically). However the splicing can also help us - * to recover from numerical errors. For example, suppose at one - * point we checked eUp and eLo, and decided that eUp.Org is barely - * above eLo. Then later, we split eLo into two edges (eg. from - * a splice operation like this one). This can change the result of - * our test so that now eUp.Org is incident to eLo, or barely below it. - * We must correct this condition to maintain the dictionary invariants. - * - * One possibility is to check these edges for intersection again - * (ie. CheckForIntersect). This is what we do if possible. However - * CheckForIntersect requires that tess.event lies between eUp and eLo, - * so that it has something to fall back on when the intersection - * calculation gives us an unusable answer. So, for those cases where - * we can't check for intersection, this routine fixes the problem - * by just splicing the offending vertex into the other edge. - * This is a guaranteed solution, no matter how degenerate things get. - * Basically this is a combinatorial solution to a numerical problem. - */ { + static boolean CheckForRightSplice(GLUtessellatorImpl tess, + ActiveRegion regUp) /* + * Check the upper and lower edge of "regUp", to make sure that the eUp.Org is above + * eLo, or eLo.Org is below eUp (depending on which origin is leftmost). The main + * purpose is to splice right-going edges with the same dest vertex and nearly identical + * slopes (ie. we can't distinguish the slopes numerically). However the splicing can + * also help us to recover from numerical errors. For example, suppose at one point we + * checked eUp and eLo, and decided that eUp.Org is barely above eLo. Then later, we + * split eLo into two edges (eg. from a splice operation like this one). This can change + * the result of our test so that now eUp.Org is incident to eLo, or barely below it. We + * must correct this condition to maintain the dictionary invariants. One possibility is + * to check these edges for intersection again (ie. CheckForIntersect). This is what we + * do if possible. However CheckForIntersect requires that tess.event lies between eUp + * and eLo, so that it has something to fall back on when the intersection calculation + * gives us an unusable answer. So, for those cases where we can't check for + * intersection, this routine fixes the problem by just splicing the offending vertex + * into the other edge. This is a guaranteed solution, no matter how degenerate things + * get. Basically this is a combinatorial solution to a numerical problem. + */ { ActiveRegion regLo = RegionBelow(regUp); GLUhalfEdge eUp = regUp.eUp; GLUhalfEdge eLo = regLo.eUp; @@ -569,24 +495,20 @@ class Sweep { return true; } - static boolean CheckForLeftSplice(GLUtessellatorImpl tess, ActiveRegion regUp) /* - * Check the upper and lower edge of "regUp", to make sure that the - * eUp.Sym.Org is above eLo, or eLo.Sym.Org is below eUp (depending on which - * destination is rightmost). - * - * Theoretically, this should always be true. However, splitting an edge - * into two pieces can change the results of previous tests. For example, - * suppose at one point we checked eUp and eLo, and decided that eUp.Sym.Org - * is barely above eLo. Then later, we split eLo into two edges (eg. from - * a splice operation like this one). This can change the result of - * the test so that now eUp.Sym.Org is incident to eLo, or barely below it. - * We must correct this condition to maintain the dictionary invariants - * (otherwise new edges might get inserted in the wrong place in the - * dictionary, and bad stuff will happen). - * - * We fix the problem by just splicing the offending vertex into the - * other edge. - */ { + static boolean CheckForLeftSplice(GLUtessellatorImpl tess, + ActiveRegion regUp) /* + * Check the upper and lower edge of "regUp", to make sure that the eUp.Sym.Org is above + * eLo, or eLo.Sym.Org is below eUp (depending on which destination is rightmost). + * Theoretically, this should always be true. However, splitting an edge into two pieces + * can change the results of previous tests. For example, suppose at one point we + * checked eUp and eLo, and decided that eUp.Sym.Org is barely above eLo. Then later, we + * split eLo into two edges (eg. from a splice operation like this one). This can change + * the result of the test so that now eUp.Sym.Org is incident to eLo, or barely below + * it. We must correct this condition to maintain the dictionary invariants (otherwise + * new edges might get inserted in the wrong place in the dictionary, and bad stuff will + * happen). We fix the problem by just splicing the offending vertex into the other + * edge. + */ { ActiveRegion regLo = RegionBelow(regUp); GLUhalfEdge eUp = regUp.eUp; GLUhalfEdge eLo = regLo.eUp; @@ -616,15 +538,14 @@ class Sweep { return true; } - static boolean CheckForIntersect(GLUtessellatorImpl tess, ActiveRegion regUp) /* - * Check the upper and lower edges of the given region to see if - * they intersect. If so, create the intersection and add it - * to the data structures. - * - * Returns true if adding the new intersection resulted in a recursive - * call to AddRightEdges(); in this case all "dirty" regions have been - * checked for intersections, and possibly regUp has been deleted. - */ { + static boolean CheckForIntersect(GLUtessellatorImpl tess, + ActiveRegion regUp) /* + * Check the upper and lower edges of the given region to see if they intersect. If so, + * create the intersection and add it to the data structures. Returns true if adding the + * new intersection resulted in a recursive call to AddRightEdges(); in this case all + * "dirty" regions have been checked for intersections, and possibly regUp has been + * deleted. + */ { ActiveRegion regLo = RegionBelow(regUp); GLUhalfEdge eUp = regUp.eUp; GLUhalfEdge eLo = regLo.eUp; @@ -666,20 +587,18 @@ class Sweep { assert (isect.s <= Math.max(orgLo.s, orgUp.s)); if (Geom.VertLeq(isect, tess.event)) { - /* The intersection point lies slightly to the left of the sweep line, - * so move it until it''s slightly to the right of the sweep line. - * (If we had perfect numerical precision, this would never happen - * in the first place). The easiest and safest thing to do is - * replace the intersection by tess.event. + /* + * The intersection point lies slightly to the left of the sweep line, so move it until it''s slightly to + * the right of the sweep line. (If we had perfect numerical precision, this would never happen in the first + * place). The easiest and safest thing to do is replace the intersection by tess.event. */ isect.s = tess.event.s; isect.t = tess.event.t; } - /* Similarly, if the computed intersection lies to the right of the - * rightmost origin (which should rarely happen), it can cause - * unbelievable inefficiency on sufficiently degenerate inputs. - * (If you have the test program, try running test54.d with the - * "X zoom" option turned on). + /* + * Similarly, if the computed intersection lies to the right of the rightmost origin (which should rarely + * happen), it can cause unbelievable inefficiency on sufficiently degenerate inputs. (If you have the test + * program, try running test54.d with the "X zoom" option turned on). */ orgMin = Geom.VertLeq(orgUp, orgLo) ? orgUp : orgLo; if (Geom.VertLeq(orgMin, isect)) { @@ -695,9 +614,9 @@ class Sweep { if ((!Geom.VertEq(dstUp, tess.event) && Geom.EdgeSign(dstUp, tess.event, isect) >= 0) || (!Geom.VertEq(dstLo, tess.event) && Geom.EdgeSign(dstLo, tess.event, isect) <= 0)) { - /* Very unusual -- the new upper or lower edge would pass on the - * wrong side of the sweep event, or through it. This can happen - * due to very small numerical errors in the intersection calculation. + /* + * Very unusual -- the new upper or lower edge would pass on the wrong side of the sweep event, or through + * it. This can happen due to very small numerical errors in the intersection calculation. */ if (dstLo == tess.event) { /* Splice dstLo into eUp, and process the new region(s) */ @@ -722,9 +641,9 @@ class Sweep { AddRightEdges(tess, regUp, eLo.Onext, eUp.Sym.Onext, e, true); return true; } - /* Special case: called from ConnectRightVertex. If either - * edge passes on the wrong side of tess.event, split it - * (and wait for ConnectRightVertex to splice it appropriately). + /* + * Special case: called from ConnectRightVertex. If either edge passes on the wrong side of tess.event, + * split it (and wait for ConnectRightVertex to splice it appropriately). */ if (Geom.EdgeSign(dstUp, tess.event, isect) >= 0) { RegionAbove(regUp).dirty = regUp.dirty = true; @@ -742,13 +661,12 @@ class Sweep { return false; } - /* General case -- split both edges, splice into new vertex. - * When we do the splice operation, the order of the arguments is - * arbitrary as far as correctness goes. However, when the operation - * creates a new face, the work done is proportional to the size of - * the new face. We expect the faces in the processed part of - * the mesh (ie. eUp.Lface) to be smaller than the faces in the - * unprocessed original contours (which will be eLo.Sym.Lnext.Lface). + /* + * General case -- split both edges, splice into new vertex. When we do the splice operation, the order of the + * arguments is arbitrary as far as correctness goes. However, when the operation creates a new face, the work + * done is proportional to the size of the new face. We expect the faces in the processed part of the mesh (ie. + * eUp.Lface) to be smaller than the faces in the unprocessed original contours (which will be + * eLo.Sym.Lnext.Lface). */ if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); @@ -766,18 +684,17 @@ class Sweep { return false; } - static void WalkDirtyRegions(GLUtessellatorImpl tess, ActiveRegion regUp) /* - * When the upper or lower edge of any region changes, the region is - * marked "dirty". This routine walks through all the dirty regions - * and makes sure that the dictionary invariants are satisfied - * (see the comments at the beginning of this file). Of course - * new dirty regions can be created as we make changes to restore - * the invariants. - */ { + static void WalkDirtyRegions(GLUtessellatorImpl tess, + ActiveRegion regUp) /* + * When the upper or lower edge of any region changes, the region is marked "dirty". + * This routine walks through all the dirty regions and makes sure that the dictionary + * invariants are satisfied (see the comments at the beginning of this file). Of course + * new dirty regions can be created as we make changes to restore the invariants. + */ { ActiveRegion regLo = RegionBelow(regUp); GLUhalfEdge eUp, eLo; - for (; ; ) { + for (;;) { /* Find the lowest dirty region (we walk from the bottom up). */ while (regLo.dirty) { regUp = regLo; @@ -799,9 +716,9 @@ class Sweep { /* Check that the edge ordering is obeyed at the Dst vertices. */ if (CheckForLeftSplice(tess, regUp)) { - /* If the upper or lower edge was marked fixUpperEdge, then - * we no longer need it (since these edges are needed only for - * vertices which otherwise have no right-going edges). + /* + * If the upper or lower edge was marked fixUpperEdge, then we no longer need it (since these edges + * are needed only for vertices which otherwise have no right-going edges). */ if (regLo.fixUpperEdge) { DeleteRegion(tess, regLo); @@ -817,25 +734,24 @@ class Sweep { } } if (eUp.Org != eLo.Org) { - if (eUp.Sym.Org != eLo.Sym.Org - && !regUp.fixUpperEdge + if (eUp.Sym.Org != eLo.Sym.Org && !regUp.fixUpperEdge && !regLo.fixUpperEdge && (eUp.Sym.Org == tess.event || eLo.Sym.Org == tess.event)) { - /* When all else fails in CheckForIntersect(), it uses tess.event - * as the intersection location. To make this possible, it requires - * that tess.event lie between the upper and lower edges, and also - * that neither of these is marked fixUpperEdge (since in the worst - * case it might splice one of these edges into tess.event, and - * violate the invariant that fixable edges are the only right-going - * edge from their associated vertex). + /* + * When all else fails in CheckForIntersect(), it uses tess.event as the intersection location. To + * make this possible, it requires that tess.event lie between the upper and lower edges, and also + * that neither of these is marked fixUpperEdge (since in the worst case it might splice one of + * these edges into tess.event, and violate the invariant that fixable edges are the only + * right-going edge from their associated vertex). */ if (CheckForIntersect(tess, regUp)) { /* WalkDirtyRegions() was called recursively; we're done */ return; } } else { - /* Even though we can't use CheckForIntersect(), the Org vertices - * may violate the dictionary edge ordering. Check and correct this. + /* + * Even though we can't use CheckForIntersect(), the Org vertices may violate the dictionary edge + * ordering. Check and correct this. */ CheckForRightSplice(tess, regUp); } @@ -850,37 +766,32 @@ class Sweep { } } - static void ConnectRightVertex(GLUtessellatorImpl tess, ActiveRegion regUp, GLUhalfEdge eBottomLeft) /* - * Purpose: connect a "right" vertex vEvent (one where all edges go left) - * to the unprocessed portion of the mesh. Since there are no right-going - * edges, two regions (one above vEvent and one below) are being merged - * into one. "regUp" is the upper of these two regions. - * - * There are two reasons for doing this (adding a right-going edge): - * - if the two regions being merged are "inside", we must add an edge - * to keep them separated (the combined region would not be monotone). - * - in any case, we must leave some record of vEvent in the dictionary, - * so that we can merge vEvent with features that we have not seen yet. - * For example, maybe there is a vertical edge which passes just to - * the right of vEvent; we would like to splice vEvent into this edge. - * - * However, we don't want to connect vEvent to just any vertex. We don''t - * want the new edge to cross any other edges; otherwise we will create - * intersection vertices even when the input data had no self-intersections. - * (This is a bad thing; if the user's input data has no intersections, - * we don't want to generate any false intersections ourselves.) - * - * Our eventual goal is to connect vEvent to the leftmost unprocessed - * vertex of the combined region (the union of regUp and regLo). - * But because of unseen vertices with all right-going edges, and also - * new vertices which may be created by edge intersections, we don''t - * know where that leftmost unprocessed vertex is. In the meantime, we - * connect vEvent to the closest vertex of either chain, and mark the region - * as "fixUpperEdge". This flag says to delete and reconnect this edge - * to the next processed vertex on the boundary of the combined region. - * Quite possibly the vertex we connected to will turn out to be the - * closest one, in which case we won''t need to make any changes. - */ { + static void ConnectRightVertex(GLUtessellatorImpl tess, ActiveRegion regUp, + GLUhalfEdge eBottomLeft) /* + * Purpose: connect a "right" vertex vEvent (one where all edges go left) to the + * unprocessed portion of the mesh. Since there are no right-going edges, two + * regions (one above vEvent and one below) are being merged into one. "regUp" is + * the upper of these two regions. There are two reasons for doing this (adding a + * right-going edge): - if the two regions being merged are "inside", we must add + * an edge to keep them separated (the combined region would not be monotone). - in + * any case, we must leave some record of vEvent in the dictionary, so that we can + * merge vEvent with features that we have not seen yet. For example, maybe there + * is a vertical edge which passes just to the right of vEvent; we would like to + * splice vEvent into this edge. However, we don't want to connect vEvent to just + * any vertex. We don''t want the new edge to cross any other edges; otherwise we + * will create intersection vertices even when the input data had no + * self-intersections. (This is a bad thing; if the user's input data has no + * intersections, we don't want to generate any false intersections ourselves.) Our + * eventual goal is to connect vEvent to the leftmost unprocessed vertex of the + * combined region (the union of regUp and regLo). But because of unseen vertices + * with all right-going edges, and also new vertices which may be created by edge + * intersections, we don''t know where that leftmost unprocessed vertex is. In the + * meantime, we connect vEvent to the closest vertex of either chain, and mark the + * region as "fixUpperEdge". This flag says to delete and reconnect this edge to + * the next processed vertex on the boundary of the combined region. Quite possibly + * the vertex we connected to will turn out to be the closest one, in which case we + * won''t need to make any changes. + */ { GLUhalfEdge eNew; GLUhalfEdge eTopLeft = eBottomLeft.Onext; ActiveRegion regLo = RegionBelow(regUp); @@ -892,8 +803,9 @@ class Sweep { CheckForIntersect(tess, regUp); } - /* Possible new degeneracies: upper or lower edge of regUp may pass - * through vEvent, or may coincide with new intersection vertex + /* + * Possible new degeneracies: upper or lower edge of regUp may pass through vEvent, or may coincide with new + * intersection vertex */ if (Geom.VertEq(eUp.Org, tess.event)) { if (!Mesh.__gl_meshSplice(eTopLeft.Sym.Lnext, eUp)) throw new RuntimeException(); @@ -913,8 +825,8 @@ class Sweep { return; } - /* Non-degenerate situation -- need to add a temporary, fixable edge. - * Connect to the closer of eLo.Org, eUp.Org. + /* + * Non-degenerate situation -- need to add a temporary, fixable edge. Connect to the closer of eLo.Org, eUp.Org. */ if (Geom.VertLeq(eLo.Org, eUp.Org)) { eNew = eLo.Sym.Lnext; @@ -924,35 +836,35 @@ class Sweep { eNew = Mesh.__gl_meshConnect(eBottomLeft.Onext.Sym, eNew); if (eNew == null) throw new RuntimeException(); - /* Prevent cleanup, otherwise eNew might disappear before we've even - * had a chance to mark it as a temporary edge. + /* + * Prevent cleanup, otherwise eNew might disappear before we've even had a chance to mark it as a temporary + * edge. */ AddRightEdges(tess, regUp, eNew, eNew.Onext, eNew.Onext, false); eNew.Sym.activeRegion.fixUpperEdge = true; WalkDirtyRegions(tess, regUp); } - /* Because vertices at exactly the same location are merged together - * before we process the sweep event, some degenerate cases can't occur. - * However if someone eventually makes the modifications required to - * merge features which are close together, the cases below marked - * TOLERANCE_NONZERO will be useful. They were debugged before the + /* + * Because vertices at exactly the same location are merged together before we process the sweep event, some + * degenerate cases can't occur. However if someone eventually makes the modifications required to merge features + * which are close together, the cases below marked TOLERANCE_NONZERO will be useful. They were debugged before the * code to merge identical vertices in the main loop was added. */ private static final boolean TOLERANCE_NONZERO = false; - static void ConnectLeftDegenerate(GLUtessellatorImpl tess, ActiveRegion regUp, GLUvertex vEvent) /* - * The event vertex lies exacty on an already-processed edge or vertex. - * Adding the new vertex involves splicing it into the already-processed - * part of the mesh. - */ { + static void ConnectLeftDegenerate(GLUtessellatorImpl tess, ActiveRegion regUp, + GLUvertex vEvent) /* + * The event vertex lies exacty on an already-processed edge or vertex. Adding the new + * vertex involves splicing it into the already-processed part of the mesh. + */ { GLUhalfEdge e, eTopLeft, eTopRight, eLast; ActiveRegion reg; e = regUp.eUp; if (Geom.VertEq(e.Org, vEvent)) { - /* e.Org is an unprocessed vertex - just combine them, and wait - * for e.Org to be pulled from the queue + /* + * e.Org is an unprocessed vertex - just combine them, and wait for e.Org to be pulled from the queue */ assert (TOLERANCE_NONZERO); SpliceMergeVertices(tess, e, vEvent.anEdge); @@ -972,8 +884,9 @@ class Sweep { return; } - /* vEvent coincides with e.Sym.Org, which has already been processed. - * Splice in the additional right-going edges. + /* + * vEvent coincides with e.Sym.Org, which has already been processed. Splice in the additional right-going + * edges. */ assert (TOLERANCE_NONZERO); regUp = TopRightRegion(regUp); @@ -981,8 +894,9 @@ class Sweep { eTopRight = reg.eUp.Sym; eTopLeft = eLast = eTopRight.Onext; if (reg.fixUpperEdge) { - /* Here e.Sym.Org has only a single fixable edge going right. - * We can delete it since now we have some real right-going edges. + /* + * Here e.Sym.Org has only a single fixable edge going right. We can delete it since now we have some real + * right-going edges. */ assert (eTopLeft != eTopRight); /* there are some left edges too */ DeleteRegion(tess, reg); @@ -997,21 +911,17 @@ class Sweep { AddRightEdges(tess, regUp, eTopRight.Onext, eLast, eTopLeft, true); } - static void ConnectLeftVertex(GLUtessellatorImpl tess, GLUvertex vEvent) /* - * Purpose: connect a "left" vertex (one where both edges go right) - * to the processed portion of the mesh. Let R be the active region - * containing vEvent, and let U and L be the upper and lower edge - * chains of R. There are two possibilities: - * - * - the normal case: split R into two regions, by connecting vEvent to - * the rightmost vertex of U or L lying to the left of the sweep line - * - * - the degenerate case: if vEvent is close enough to U or L, we - * merge vEvent into that edge chain. The subcases are: - * - merging with the rightmost vertex of U or L - * - merging with the active edge of U or L - * - merging with an already-processed portion of U or L - */ { + static void ConnectLeftVertex(GLUtessellatorImpl tess, + GLUvertex vEvent) /* + * Purpose: connect a "left" vertex (one where both edges go right) to the processed + * portion of the mesh. Let R be the active region containing vEvent, and let U and L be + * the upper and lower edge chains of R. There are two possibilities: - the normal case: + * split R into two regions, by connecting vEvent to the rightmost vertex of U or L lying + * to the left of the sweep line - the degenerate case: if vEvent is close enough to U or + * L, we merge vEvent into that edge chain. The subcases are: - merging with the rightmost + * vertex of U or L - merging with the active edge of U or L - merging with an + * already-processed portion of U or L + */ { ActiveRegion regUp, regLo, reg; GLUhalfEdge eUp, eLo, eNew; ActiveRegion tmp = new ActiveRegion(); @@ -1033,8 +943,9 @@ class Sweep { return; } - /* Connect vEvent to rightmost processed vertex of either chain. - * e.Sym.Org is the vertex that we will connect to vEvent. + /* + * Connect vEvent to rightmost processed vertex of either chain. e.Sym.Org is the vertex that we will connect to + * vEvent. */ reg = Geom.VertLeq(eLo.Sym.Org, eUp.Sym.Org) ? regUp : regLo; @@ -1055,26 +966,28 @@ class Sweep { } SweepEvent(tess, vEvent); } else { - /* The new vertex is in a region which does not belong to the polygon. - * We don''t need to connect this vertex to the rest of the mesh. + /* + * The new vertex is in a region which does not belong to the polygon. We don''t need to connect this vertex + * to the rest of the mesh. */ AddRightEdges(tess, regUp, vEvent.anEdge, vEvent.anEdge, null, true); } } - static void SweepEvent(GLUtessellatorImpl tess, GLUvertex vEvent) /* - * Does everything necessary when the sweep line crosses a vertex. - * Updates the mesh and the edge dictionary. - */ { + static void SweepEvent(GLUtessellatorImpl tess, + GLUvertex vEvent) /* + * Does everything necessary when the sweep line crosses a vertex. Updates the mesh and + * the edge dictionary. + */ { ActiveRegion regUp, reg; GLUhalfEdge e, eTopLeft, eBottomLeft; tess.event = vEvent; /* for access in EdgeLeq() */ DebugEvent(tess); - /* Check if this vertex is the right endpoint of an edge that is - * already in the dictionary. In this case we don't need to waste - * time searching for the location to insert new edges. + /* + * Check if this vertex is the right endpoint of an edge that is already in the dictionary. In this case we + * don't need to waste time searching for the location to insert new edges. */ e = vEvent.anEdge; while (e.activeRegion == null) { @@ -1086,12 +999,11 @@ class Sweep { } } - /* Processing consists of two phases: first we "finish" all the - * active regions where both the upper and lower edges terminate - * at vEvent (ie. vEvent is closing off these regions). - * We mark these faces "inside" or "outside" the polygon according - * to their winding number, and delete the edges from the dictionary. - * This takes care of all the left-going edges from vEvent. + /* + * Processing consists of two phases: first we "finish" all the active regions where both the upper and lower + * edges terminate at vEvent (ie. vEvent is closing off these regions). We mark these faces "inside" or + * "outside" the polygon according to their winding number, and delete the edges from the dictionary. This takes + * care of all the left-going edges from vEvent. */ regUp = TopLeftRegion(e.activeRegion); if (regUp == null) throw new RuntimeException(); @@ -1099,10 +1011,10 @@ class Sweep { eTopLeft = reg.eUp; eBottomLeft = FinishLeftRegions(tess, reg, null); - /* Next we process all the right-going edges from vEvent. This - * involves adding the edges to the dictionary, and creating the - * associated "active regions" which record information about the - * regions between adjacent dictionary edges. + /* + * Next we process all the right-going edges from vEvent. This involves adding the edges to the dictionary, and + * creating the associated "active regions" which record information about the regions between adjacent + * dictionary edges. */ if (eBottomLeft.Onext == eTopLeft) { /* No right-going edges -- add a temporary "fixable" edge */ @@ -1112,17 +1024,17 @@ class Sweep { } } - /* Make the sentinel coordinates big enough that they will never be - * merged with real input features. (Even with the largest possible - * input contour and the maximum tolerance of 1.0, no merging will be - * done with coordinates larger than 3 * GLU_TESS_MAX_COORD). + /* + * Make the sentinel coordinates big enough that they will never be merged with real input features. (Even with the + * largest possible input contour and the maximum tolerance of 1.0, no merging will be done with coordinates larger + * than 3 * GLU_TESS_MAX_COORD). */ private static final double SENTINEL_COORD = (4.0 * GLU_TESS_MAX_COORD); static void AddSentinel(GLUtessellatorImpl tess, double t) /* - * We add two sentinel edges above and below all other edges, - * to avoid special cases at the top and bottom. - */ { + * We add two sentinel edges above and below all other + * edges, to avoid special cases at the top and bottom. + */ { GLUhalfEdge e; ActiveRegion reg = new ActiveRegion(); // if (reg == null) throw new RuntimeException(); @@ -1146,13 +1058,14 @@ class Sweep { if (reg.nodeUp == null) throw new RuntimeException(); } - static void InitEdgeDict(final GLUtessellatorImpl tess) /* - * We maintain an ordering of edge intersections with the sweep line. - * This order is maintained in a dynamic dictionary. - */ { + static void InitEdgeDict( + final GLUtessellatorImpl tess) /* + * We maintain an ordering of edge intersections with the sweep line. This + * order is maintained in a dynamic dictionary. + */ { /* __gl_dictListNewDict */ - tess.dict = - Dict.dictNewDict(tess, (frame, key1, key2) -> EdgeLeq(tess, (ActiveRegion) key1, (ActiveRegion) key2)); + tess.dict = Dict + .dictNewDict(tess, (frame, key1, key2) -> EdgeLeq(tess, (ActiveRegion) key1, (ActiveRegion) key2)); if (tess.dict == null) throw new RuntimeException(); AddSentinel(tess, -SENTINEL_COORD); @@ -1167,9 +1080,8 @@ class Sweep { /* __GL_DICTLISTMIN */ while ((reg = (ActiveRegion) Dict.dictKey(Dict.dictMin(tess.dict))) != null) { /* - * At the end of all processing, the dictionary should contain - * only the two sentinel edges, plus at most one "fixable" edge - * created by ConnectRightVertex(). + * At the end of all processing, the dictionary should contain only the two sentinel edges, plus at most one + * "fixable" edge created by ConnectRightVertex(). */ if (!reg.sentinel) { assert (reg.fixUpperEdge); @@ -1177,18 +1089,19 @@ class Sweep { } assert (reg.windingNumber == 0); DeleteRegion(tess, reg); - /* __gl_meshDelete( reg.eUp );*/ + /* __gl_meshDelete( reg.eUp ); */ } Dict.dictDeleteDict(tess.dict); /* __gl_dictListDeleteDict */ } - static void RemoveDegenerateEdges(GLUtessellatorImpl tess) /* - * Remove zero-length edges, and contours with fewer than 3 vertices. - */ { + static void RemoveDegenerateEdges( + GLUtessellatorImpl tess) /* + * Remove zero-length edges, and contours with fewer than 3 vertices. + */ { GLUhalfEdge e, eNext, eLnext; GLUhalfEdge eHead = tess.mesh.eHead; - /*LINTED*/ + /* LINTED */ for (e = eHead.next; e != eHead; e = eNext) { eNext = e.next; eLnext = e.Lnext; @@ -1218,10 +1131,11 @@ class Sweep { } } - static boolean InitPriorityQ(GLUtessellatorImpl tess) /* - * Insert all vertices into the priority queue which determines the - * order in which vertices cross the sweep line. - */ { + static boolean InitPriorityQ( + GLUtessellatorImpl tess) /* + * Insert all vertices into the priority queue which determines the order in which + * vertices cross the sweep line. + */ { PriorityQ pq; GLUvertex v, vHead; @@ -1248,24 +1162,21 @@ class Sweep { tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ } - static boolean RemoveDegenerateFaces(GLUmesh mesh) /* - * Delete any degenerate faces with only two edges. WalkDirtyRegions() - * will catch almost all of these, but it won't catch degenerate faces - * produced by splice operations on already-processed edges. - * The two places this can happen are in FinishLeftRegions(), when - * we splice in a "temporary" edge produced by ConnectRightVertex(), - * and in CheckForLeftSplice(), where we splice already-processed - * edges to ensure that our dictionary invariants are not violated - * by numerical errors. - * - * In both these cases it is *very* dangerous to delete the offending - * edge at the time, since one of the routines further up the stack - * will sometimes be keeping a pointer to that edge. - */ { + static boolean RemoveDegenerateFaces( + GLUmesh mesh) /* + * Delete any degenerate faces with only two edges. WalkDirtyRegions() will catch almost all + * of these, but it won't catch degenerate faces produced by splice operations on + * already-processed edges. The two places this can happen are in FinishLeftRegions(), when we + * splice in a "temporary" edge produced by ConnectRightVertex(), and in CheckForLeftSplice(), + * where we splice already-processed edges to ensure that our dictionary invariants are not + * violated by numerical errors. In both these cases it is *very* dangerous to delete the + * offending edge at the time, since one of the routines further up the stack will sometimes + * be keeping a pointer to that edge. + */ { GLUface f, fNext; GLUhalfEdge e; - /*LINTED*/ + /* LINTED */ for (f = mesh.fHead.next; f != mesh.fHead; f = fNext) { fNext = f.next; e = f.anEdge; @@ -1280,22 +1191,20 @@ class Sweep { return true; } - public static boolean __gl_computeInterior(GLUtessellatorImpl tess) /* - * __gl_computeInterior( tess ) computes the planar arrangement specified - * by the given contours, and further subdivides this arrangement - * into regions. Each region is marked "inside" if it belongs - * to the polygon, according to the rule given by tess.windingRule. - * Each interior region is guaranteed be monotone. - */ { + public static boolean __gl_computeInterior( + GLUtessellatorImpl tess) /* + * __gl_computeInterior( tess ) computes the planar arrangement specified by the + * given contours, and further subdivides this arrangement into regions. Each + * region is marked "inside" if it belongs to the polygon, according to the rule + * given by tess.windingRule. Each interior region is guaranteed be monotone. + */ { GLUvertex v, vNext; tess.fatalError = false; - /* Each vertex defines an event for our sweep line. Start by inserting - * all the vertices in a priority queue. Events are processed in - * lexicographic order, ie. - * - * e1 < e2 iff e1.x < e2.x || (e1.x == e2.x && e1.y < e2.y) + /* + * Each vertex defines an event for our sweep line. Start by inserting all the vertices in a priority queue. + * Events are processed in lexicographic order, ie. e1 < e2 iff e1.x < e2.x || (e1.x == e2.x && e1.y < e2.y) */ RemoveDegenerateEdges(tess); if (!InitPriorityQ(tess)) return false; /* if error */ @@ -1303,25 +1212,21 @@ class Sweep { /* __gl_pqSortExtractMin */ while ((v = (GLUvertex) tess.pq.pqExtractMin()) != null) { - for (; ; ) { + for (;;) { vNext = (GLUvertex) tess.pq.pqMinimum(); /* __gl_pqSortMinimum */ if (vNext == null || !Geom.VertEq(vNext, v)) break; - /* Merge together all vertices at exactly the same location. - * This is more efficient than processing them one at a time, - * simplifies the code (see ConnectLeftDegenerate), and is also - * important for correct handling of certain degenerate cases. - * For example, suppose there are two identical edges A and B - * that belong to different contours (so without this code they would - * be processed by separate sweep events). Suppose another edge C - * crosses A and B from above. When A is processed, we split it - * at its intersection point with C. However this also splits C, - * so when we insert B we may compute a slightly different - * intersection point. This might leave two edges with a small - * gap between them. This kind of error is especially obvious - * when using boundary extraction (GLU_TESS_BOUNDARY_ONLY). + /* + * Merge together all vertices at exactly the same location. This is more efficient than processing them + * one at a time, simplifies the code (see ConnectLeftDegenerate), and is also important for correct + * handling of certain degenerate cases. For example, suppose there are two identical edges A and B that + * belong to different contours (so without this code they would be processed by separate sweep events). + * Suppose another edge C crosses A and B from above. When A is processed, we split it at its + * intersection point with C. However this also splits C, so when we insert B we may compute a slightly + * different intersection point. This might leave two edges with a small gap between them. This kind of + * error is especially obvious when using boundary extraction (GLU_TESS_BOUNDARY_ONLY). */ - vNext = (GLUvertex) tess.pq.pqExtractMin(); /* __gl_pqSortExtractMin*/ + vNext = (GLUvertex) tess.pq.pqExtractMin(); /* __gl_pqSortExtractMin */ SpliceMergeVertices(tess, v.anEdge, vNext.anEdge); } SweepEvent(tess, v); diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/TessMono.java b/src/main/java/org/lwjglx/util/glu/tessellation/TessMono.java index 70f8493..d76c0fc 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/TessMono.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/TessMono.java @@ -1,139 +1,85 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class TessMono { - /* __gl_meshTessellateMonoRegion( face ) tessellates a monotone region - * (what else would it do??) The region must consist of a single - * loop of half-edges (see mesh.h) oriented CCW. "Monotone" in this - * case means that any vertical line intersects the interior of the - * region in a single interval. - * - * Tessellation consists of adding interior edges (actually pairs of - * half-edges), to split the region into non-overlapping triangles. - * - * The basic idea is explained in Preparata and Shamos (which I don''t - * have handy right now), although their implementation is more - * complicated than this one. The are two edge chains, an upper chain - * and a lower chain. We process all vertices from both chains in order, - * from right to left. - * - * The algorithm ensures that the following invariant holds after each - * vertex is processed: the untessellated region consists of two - * chains, where one chain (say the upper) is a single edge, and - * the other chain is concave. The left vertex of the single edge - * is always to the left of all vertices in the concave chain. - * - * Each step consists of adding the rightmost unprocessed vertex to one - * of the two chains, and forming a fan of triangles from the rightmost - * of two chain endpoints. Determining whether we can add each triangle - * to the fan is a simple orientation test. By making the fan as large - * as possible, we restore the invariant (check it yourself). + + /* + * __gl_meshTessellateMonoRegion( face ) tessellates a monotone region (what else would it do??) The region must + * consist of a single loop of half-edges (see mesh.h) oriented CCW. "Monotone" in this case means that any vertical + * line intersects the interior of the region in a single interval. Tessellation consists of adding interior edges + * (actually pairs of half-edges), to split the region into non-overlapping triangles. The basic idea is explained + * in Preparata and Shamos (which I don''t have handy right now), although their implementation is more complicated + * than this one. The are two edge chains, an upper chain and a lower chain. We process all vertices from both + * chains in order, from right to left. The algorithm ensures that the following invariant holds after each vertex + * is processed: the untessellated region consists of two chains, where one chain (say the upper) is a single edge, + * and the other chain is concave. The left vertex of the single edge is always to the left of all vertices in the + * concave chain. Each step consists of adding the rightmost unprocessed vertex to one of the two chains, and + * forming a fan of triangles from the rightmost of two chain endpoints. Determining whether we can add each + * triangle to the fan is a simple orientation test. By making the fan as large as possible, we restore the + * invariant (check it yourself). */ static boolean __gl_meshTessellateMonoRegion(GLUface face) { GLUhalfEdge up, lo; - /* All edges are oriented CCW around the boundary of the region. - * First, find the half-edge whose origin vertex is rightmost. - * Since the sweep goes from left to right, face->anEdge should - * be close to the edge we want. + /* + * All edges are oriented CCW around the boundary of the region. First, find the half-edge whose origin vertex + * is rightmost. Since the sweep goes from left to right, face->anEdge should be close to the edge we want. */ up = face.anEdge; assert (up.Lnext != up && up.Lnext.Lnext != up); - for (; Geom.VertLeq(up.Sym.Org, up.Org); up = up.Onext.Sym) - ; - for (; Geom.VertLeq(up.Org, up.Sym.Org); up = up.Lnext) - ; + for (; Geom.VertLeq(up.Sym.Org, up.Org); up = up.Onext.Sym); + for (; Geom.VertLeq(up.Org, up.Sym.Org); up = up.Lnext); lo = up.Onext.Sym; while (up.Lnext != lo) { if (Geom.VertLeq(up.Sym.Org, lo.Org)) { - /* up.Sym.Org is on the left. It is safe to form triangles from lo.Org. - * The EdgeGoesLeft test guarantees progress even when some triangles - * are CW, given that the upper and lower chains are truly monotone. + /* + * up.Sym.Org is on the left. It is safe to form triangles from lo.Org. The EdgeGoesLeft test guarantees + * progress even when some triangles are CW, given that the upper and lower chains are truly monotone. */ while (lo.Lnext != up && (Geom.EdgeGoesLeft(lo.Lnext) || Geom.EdgeSign(lo.Org, lo.Sym.Org, lo.Lnext.Sym.Org) <= 0)) { @@ -143,10 +89,9 @@ class TessMono { } lo = lo.Onext.Sym; } else { - /* lo.Org is on the left. We can make CCW triangles from up.Sym.Org. */ - while (lo.Lnext != up - && (Geom.EdgeGoesRight(up.Onext.Sym) - || Geom.EdgeSign(up.Sym.Org, up.Org, up.Onext.Sym.Org) >= 0)) { + /* lo.Org is on the left. We can make CCW triangles from up.Sym.Org. */ + while (lo.Lnext != up && (Geom.EdgeGoesRight(up.Onext.Sym) + || Geom.EdgeSign(up.Sym.Org, up.Org, up.Onext.Sym.Org) >= 0)) { GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(up, up.Onext.Sym); if (tempHalfEdge == null) return false; up = tempHalfEdge.Sym; @@ -155,8 +100,9 @@ class TessMono { } } - /* Now lo.Org == up.Sym.Org == the leftmost vertex. The remaining region - * can be tessellated in a fan from this leftmost vertex. + /* + * Now lo.Org == up.Sym.Org == the leftmost vertex. The remaining region can be tessellated in a fan from this + * leftmost vertex. */ assert (lo.Lnext != up); while (lo.Lnext.Lnext != up) { @@ -168,14 +114,14 @@ class TessMono { return true; } - /* __gl_meshTessellateInterior( mesh ) tessellates each region of - * the mesh which is marked "inside" the polygon. Each such region - * must be monotone. + /* + * __gl_meshTessellateInterior( mesh ) tessellates each region of the mesh which is marked "inside" the polygon. + * Each such region must be monotone. */ public static boolean __gl_meshTessellateInterior(GLUmesh mesh) { GLUface f, next; - /*LINTED*/ + /* LINTED */ for (f = mesh.fHead.next; f != mesh.fHead; f = next) { /* Make sure we don''t try to tessellate the new triangles. */ next = f.next; @@ -187,15 +133,15 @@ class TessMono { return true; } - /* __gl_meshDiscardExterior( mesh ) zaps (ie. sets to NULL) all faces - * which are not marked "inside" the polygon. Since further mesh operations - * on NULL faces are not allowed, the main purpose is to clean up the - * mesh so that exterior loops are not represented in the data structure. + /* + * __gl_meshDiscardExterior( mesh ) zaps (ie. sets to NULL) all faces which are not marked "inside" the polygon. + * Since further mesh operations on NULL faces are not allowed, the main purpose is to clean up the mesh so that + * exterior loops are not represented in the data structure. */ public static void __gl_meshDiscardExterior(GLUmesh mesh) { GLUface f, next; - /*LINTED*/ + /* LINTED */ for (f = mesh.fHead.next; f != mesh.fHead; f = next) { /* Since f will be destroyed, save its next pointer. */ next = f.next; @@ -205,15 +151,13 @@ class TessMono { } } - // private static final int MARKED_FOR_DELETION = 0x7fffffff; + // private static final int MARKED_FOR_DELETION = 0x7fffffff; - /* __gl_meshSetWindingNumber( mesh, value, keepOnlyBoundary ) resets the - * winding numbers on all edges so that regions marked "inside" the - * polygon have a winding number of "value", and regions outside - * have a winding number of 0. - * - * If keepOnlyBoundary is TRUE, it also deletes all edges which do not - * separate an interior region from an exterior one. + /* + * __gl_meshSetWindingNumber( mesh, value, keepOnlyBoundary ) resets the winding numbers on all edges so that + * regions marked "inside" the polygon have a winding number of "value", and regions outside have a winding number + * of 0. If keepOnlyBoundary is TRUE, it also deletes all edges which do not separate an interior region from an + * exterior one. */ public static boolean __gl_meshSetWindingNumber(GLUmesh mesh, int value, boolean keepOnlyBoundary) { GLUhalfEdge e, eNext; diff --git a/src/main/java/org/lwjglx/util/glu/tessellation/TessState.java b/src/main/java/org/lwjglx/util/glu/tessellation/TessState.java index acabfb6..c35da60 100644 --- a/src/main/java/org/lwjglx/util/glu/tessellation/TessState.java +++ b/src/main/java/org/lwjglx/util/glu/tessellation/TessState.java @@ -1,90 +1,51 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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. */ /* - * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. - * All rights reserved. + * Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. All rights reserved. */ /* - ** License Applicability. Except to the extent portions of this file are - ** made subject to an alternative license as permitted in the SGI Free - ** Software License B, Version 1.1 (the "License"), the contents of this - ** file are subject only to the provisions of the License. You may not use - ** this file except in compliance with the License. You may obtain a copy - ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 - ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: - ** - ** http://oss.sgi.com/projects/FreeB - ** - ** Note that, as provided in the License, the Software is distributed on an - ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS - ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND - ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A - ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. - ** - ** NOTE: The Original Code (as defined below) has been licensed to Sun - ** Microsystems, Inc. ("Sun") under the SGI Free Software License B - ** (Version 1.1), shown above ("SGI License"). Pursuant to Section - ** 3.2(3) of the SGI License, Sun is distributing the Covered Code to - ** you under an alternative license ("Alternative License"). This - ** Alternative License includes all of the provisions of the SGI License - ** except that Section 2.2 and 11 are omitted. Any differences between - ** the Alternative License and the SGI License are offered solely by Sun - ** and not by SGI. - ** - ** Original Code. The Original Code is: OpenGL Sample Implementation, - ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, - ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. - ** Copyright in any portions created by third parties is as indicated - ** elsewhere herein. All Rights Reserved. - ** - ** Additional Notice Provisions: The application programming interfaces - ** established by SGI in conjunction with the Original Code are The - ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released - ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version - ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X - ** Window System(R) (Version 1.3), released October 19, 1998. This software - ** was created using the OpenGL(R) version 1.2.1 Sample Implementation - ** published by SGI, but has not been independently verified as being - ** compliant with the OpenGL(R) version 1.2.1 Specification. - ** - ** Author: Eric Veach, July 1994 - ** Java Port: Pepijn Van Eeckhoudt, July 2003 - ** Java Port: Nathan Parker Burg, August 2003 + ** License Applicability. Except to the extent portions of this file are made subject to an alternative license as + * permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only + * to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a + * copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA + * 94043-1351, or at: http://oss.sgi.com/projects/FreeB Note that, as provided in the License, the Software is + * distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, + * WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOTE: The Original Code (as defined below) has been licensed to Sun + ** Microsystems, Inc. ("Sun") under the SGI Free Software License B (Version 1.1), shown above ("SGI License"). Pursuant + * to Section 3.2(3) of the SGI License, Sun is distributing the Covered Code to you under an alternative license + * ("Alternative License"). This Alternative License includes all of the provisions of the SGI License except that + * Section 2.2 and 11 are omitted. Any differences between the Alternative License and the SGI License are offered + * solely by Sun and not by SGI. Original Code. The Original Code is: OpenGL Sample Implementation, Version 1.2.1, + * released January 26, 2000, developed by Silicon Graphics, Inc. The Original Code is Copyright (c) 1991-2000 Silicon + * Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights + * Reserved. Additional Notice Provisions: The application programming interfaces established by SGI in conjunction with + * the Original Code are The OpenGL(R) Graphics System: A Specification (Version 1.2.1), released April 1, 1999; The + * OpenGL(R) Graphics System Utility Library (Version 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + ** Window System(R) (Version 1.3), released October 19, 1998. This software was created using the OpenGL(R) version + * 1.2.1 Sample Implementation published by SGI, but has not been independently verified as being compliant with the + * OpenGL(R) version 1.2.1 Specification. Author: Eric Veach, July 1994 Java Port: Pepijn Van Eeckhoudt, July 2003 Java + * Port: Nathan Parker Burg, August 2003 */ package org.lwjglx.util.glu.tessellation; class TessState { + public static final int T_DORMANT = 0; public static final int T_IN_POLYGON = 1; public static final int T_IN_CONTOUR = 2; diff --git a/src/main/java/org/lwjglx/util/vector/Matrix.java b/src/main/java/org/lwjglx/util/vector/Matrix.java index 058ac79..8e7d0a2 100644 --- a/src/main/java/org/lwjglx/util/vector/Matrix.java +++ b/src/main/java/org/lwjglx/util/vector/Matrix.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -36,12 +20,10 @@ import java.nio.FloatBuffer; /** * - * Base class for matrices. When a matrix is constructed it will be the identity - * matrix unless otherwise stated. + * Base class for matrices. When a matrix is constructed it will be the identity matrix unless otherwise stated. * * @author cix_foo - * @version $Revision: 3418 $ - * $Id: Matrix.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Matrix.java 3418 2010-09-28 21:11:35Z spasi $ */ public abstract class Matrix implements Serializable { @@ -54,19 +36,20 @@ public abstract class Matrix implements Serializable { /** * Set this matrix to be the identity matrix. + * * @return this */ public abstract Matrix setIdentity(); /** * Invert this matrix + * * @return this */ public abstract Matrix invert(); /** - * Load from a float buffer. The buffer stores the matrix in column major - * (OpenGL) order. + * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. * * @param buf A float buffer to read from * @return this @@ -74,8 +57,7 @@ public abstract class Matrix implements Serializable { public abstract Matrix load(FloatBuffer buf); /** - * Load from a float buffer. The buffer stores the matrix in row major - * (mathematical) order. + * Load from a float buffer. The buffer stores the matrix in row major (mathematical) order. * * @param buf A float buffer to read from * @return this @@ -84,21 +66,22 @@ public abstract class Matrix implements Serializable { /** * Negate this matrix + * * @return this */ public abstract Matrix negate(); /** - * Store this matrix in a float buffer. The matrix is stored in column - * major (openGL) order. + * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. + * * @param buf The buffer to store this matrix in * @return this */ public abstract Matrix store(FloatBuffer buf); /** - * Store this matrix in a float buffer. The matrix is stored in row - * major (maths) order. + * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. + * * @param buf The buffer to store this matrix in * @return this */ @@ -106,12 +89,14 @@ public abstract class Matrix implements Serializable { /** * Transpose this matrix + * * @return this */ public abstract Matrix transpose(); /** * Set this matrix to 0. + * * @return this */ public abstract Matrix setZero(); diff --git a/src/main/java/org/lwjglx/util/vector/Matrix2f.java b/src/main/java/org/lwjglx/util/vector/Matrix2f.java index f3a84f7..ca2d403 100644 --- a/src/main/java/org/lwjglx/util/vector/Matrix2f.java +++ b/src/main/java/org/lwjglx/util/vector/Matrix2f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Holds a 2x2 matrix * * @author cix_foo - * @version $Revision: 3799 $ - * $Id: Matrix2f.java 3799 2012-09-12 11:29:40Z kappa1 $ + * @version $Revision: 3799 $ $Id: Matrix2f.java 3799 2012-09-12 11:29:40Z kappa1 $ */ public class Matrix2f extends Matrix implements Serializable { @@ -64,6 +47,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Load from another matrix + * * @param src The source matrix * @return this */ @@ -73,7 +57,8 @@ public class Matrix2f extends Matrix implements Serializable { /** * Copy the source matrix to the destination matrix. - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null if a new one should be created. * @return The copied matrix */ @@ -89,8 +74,7 @@ public class Matrix2f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in column major - * (OpenGL) order. + * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. * * @param buf A float buffer to read from * @return this @@ -106,8 +90,7 @@ public class Matrix2f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in row major - * (mathematical) order. + * Load from a float buffer. The buffer stores the matrix in row major (mathematical) order. * * @param buf A float buffer to read from * @return this @@ -123,8 +106,8 @@ public class Matrix2f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in column - * major (openGL) order. + * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. + * * @param buf The buffer to store this matrix in */ public Matrix store(FloatBuffer buf) { @@ -136,8 +119,8 @@ public class Matrix2f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in row - * major (maths) order. + * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. + * * @param buf The buffer to store this matrix in */ public Matrix storeTranspose(FloatBuffer buf) { @@ -150,9 +133,10 @@ public class Matrix2f extends Matrix implements Serializable { /** * Add two matrices together and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix2f add(Matrix2f left, Matrix2f right, Matrix2f dest) { @@ -168,9 +152,10 @@ public class Matrix2f extends Matrix implements Serializable { /** * Subtract the right matrix from the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix2f sub(Matrix2f left, Matrix2f right, Matrix2f dest) { @@ -186,9 +171,10 @@ public class Matrix2f extends Matrix implements Serializable { /** * Multiply the right matrix by the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix2f mul(Matrix2f left, Matrix2f right, Matrix2f dest) { @@ -208,11 +194,11 @@ public class Matrix2f extends Matrix implements Serializable { } /** - * Transform a Vector by a matrix and return the result in a destination - * vector. - * @param left The left matrix + * Transform a Vector by a matrix and return the result in a destination vector. + * + * @param left The left matrix * @param right The right vector - * @param dest The destination vector, or null if a new one is to be created + * @param dest The destination vector, or null if a new one is to be created * @return the destination vector */ public static Vector2f transform(Matrix2f left, Vector2f right, Vector2f dest) { @@ -229,6 +215,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Transpose this matrix + * * @return this */ public Matrix transpose() { @@ -237,6 +224,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Transpose this matrix and place the result in another matrix. + * * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -246,7 +234,8 @@ public class Matrix2f extends Matrix implements Serializable { /** * Transpose the source matrix and place the result in the destination matrix. - * @param src The source matrix or null if a new matrix is to be created + * + * @param src The source matrix or null if a new matrix is to be created * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -264,6 +253,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Invert this matrix + * * @return this if successful, null otherwise */ public Matrix invert() { @@ -272,13 +262,14 @@ public class Matrix2f extends Matrix implements Serializable { /** * Invert the source matrix and place the result in the destination matrix. - * @param src The source matrix to be inverted + * + * @param src The source matrix to be inverted * @param dest The destination matrix or null if a new matrix is to be created * @return The inverted matrix, or null if source can't be reverted. */ public static Matrix2f invert(Matrix2f src, Matrix2f dest) { /* - *inv(A) = 1/det(A) * adj(A); + * inv(A) = 1/det(A) * adj(A); */ float determinant = src.determinant(); @@ -310,6 +301,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Negate this matrix + * * @return this */ public Matrix negate() { @@ -318,6 +310,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Negate this matrix and stash the result in another matrix. + * * @param dest The destination matrix, or null if a new matrix is to be created * @return the negated matrix */ @@ -327,7 +320,8 @@ public class Matrix2f extends Matrix implements Serializable { /** * Negate the source matrix and stash the result in the destination matrix. - * @param src The source matrix to be negated + * + * @param src The source matrix to be negated * @param dest The destination matrix, or null if a new matrix is to be created * @return the negated matrix */ @@ -344,6 +338,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Set this matrix to be the identity matrix. + * * @return this */ public Matrix setIdentity() { @@ -352,6 +347,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Set the source matrix to be the identity matrix. + * * @param src The matrix to set to the identity. * @return The source matrix */ @@ -365,6 +361,7 @@ public class Matrix2f extends Matrix implements Serializable { /** * Set this matrix to 0. + * * @return this */ public Matrix setZero() { @@ -379,7 +376,8 @@ public class Matrix2f extends Matrix implements Serializable { return src; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Matrix#determinant() */ public float determinant() { diff --git a/src/main/java/org/lwjglx/util/vector/Matrix3f.java b/src/main/java/org/lwjglx/util/vector/Matrix3f.java index e27a9c0..12355a0 100644 --- a/src/main/java/org/lwjglx/util/vector/Matrix3f.java +++ b/src/main/java/org/lwjglx/util/vector/Matrix3f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Holds a 3x3 matrix. * * @author cix_foo - * @version $Revision: 3799 $ - * $Id: Matrix3f.java 3799 2012-09-12 11:29:40Z kappa1 $ + * @version $Revision: 3799 $ $Id: Matrix3f.java 3799 2012-09-12 11:29:40Z kappa1 $ */ public class Matrix3f extends Matrix implements Serializable { @@ -58,6 +41,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Load from another matrix + * * @param src The source matrix * @return this */ @@ -67,7 +51,8 @@ public class Matrix3f extends Matrix implements Serializable { /** * Copy source matrix to destination matrix - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null of a new matrix is to be created * @return The copied matrix */ @@ -88,8 +73,7 @@ public class Matrix3f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in column major - * (OpenGL) order. + * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. * * @param buf A float buffer to read from * @return this @@ -110,8 +94,7 @@ public class Matrix3f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in row major - * (maths) order. + * Load from a float buffer. The buffer stores the matrix in row major (maths) order. * * @param buf A float buffer to read from * @return this @@ -132,8 +115,8 @@ public class Matrix3f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in column - * major (openGL) order. + * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. + * * @param buf The buffer to store this matrix in */ public Matrix store(FloatBuffer buf) { @@ -150,8 +133,8 @@ public class Matrix3f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in row - * major (maths) order. + * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. + * * @param buf The buffer to store this matrix in */ public Matrix storeTranspose(FloatBuffer buf) { @@ -169,9 +152,10 @@ public class Matrix3f extends Matrix implements Serializable { /** * Add two matrices together and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix3f add(Matrix3f left, Matrix3f right, Matrix3f dest) { @@ -192,9 +176,10 @@ public class Matrix3f extends Matrix implements Serializable { /** * Subtract the right matrix from the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix3f sub(Matrix3f left, Matrix3f right, Matrix3f dest) { @@ -215,9 +200,10 @@ public class Matrix3f extends Matrix implements Serializable { /** * Multiply the right matrix by the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix3f mul(Matrix3f left, Matrix3f right, Matrix3f dest) { @@ -247,11 +233,11 @@ public class Matrix3f extends Matrix implements Serializable { } /** - * Transform a Vector by a matrix and return the result in a destination - * vector. - * @param left The left matrix + * Transform a Vector by a matrix and return the result in a destination vector. + * + * @param left The left matrix * @param right The right vector - * @param dest The destination vector, or null if a new one is to be created + * @param dest The destination vector, or null if a new one is to be created * @return the destination vector */ public static Vector3f transform(Matrix3f left, Vector3f right, Vector3f dest) { @@ -270,6 +256,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Transpose this matrix + * * @return this */ public Matrix transpose() { @@ -278,6 +265,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Transpose this matrix and place the result in another matrix + * * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -287,7 +275,8 @@ public class Matrix3f extends Matrix implements Serializable { /** * Transpose the source matrix and place the result into the destination matrix - * @param src The source matrix to be transposed + * + * @param src The source matrix to be transposed * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -328,32 +317,15 @@ public class Matrix3f extends Matrix implements Serializable { */ public String toString() { StringBuilder buf = new StringBuilder(); - buf.append(m00) - .append(' ') - .append(m10) - .append(' ') - .append(m20) - .append(' ') - .append('\n'); - buf.append(m01) - .append(' ') - .append(m11) - .append(' ') - .append(m21) - .append(' ') - .append('\n'); - buf.append(m02) - .append(' ') - .append(m12) - .append(' ') - .append(m22) - .append(' ') - .append('\n'); + buf.append(m00).append(' ').append(m10).append(' ').append(m20).append(' ').append('\n'); + buf.append(m01).append(' ').append(m11).append(' ').append(m21).append(' ').append('\n'); + buf.append(m02).append(' ').append(m12).append(' ').append(m22).append(' ').append('\n'); return buf.toString(); } /** * Invert this matrix + * * @return this if successful, null otherwise */ public Matrix invert() { @@ -362,7 +334,8 @@ public class Matrix3f extends Matrix implements Serializable { /** * Invert the source matrix and put the result into the destination matrix - * @param src The source matrix to be inverted + * + * @param src The source matrix to be inverted * @param dest The destination matrix, or null if a new one is to be created * @return The inverted matrix if successful, null otherwise */ @@ -371,13 +344,9 @@ public class Matrix3f extends Matrix implements Serializable { if (determinant != 0) { if (dest == null) dest = new Matrix3f(); - /* do it the ordinary way - * - * inv(A) = 1/det(A) * adj(T), where adj(T) = transpose(Conjugate Matrix) - * - * m00 m01 m02 - * m10 m11 m12 - * m20 m21 m22 + /* + * do it the ordinary way inv(A) = 1/det(A) * adj(T), where adj(T) = transpose(Conjugate Matrix) m00 m01 m02 + * m10 m11 m12 m20 m21 m22 */ float determinant_inv = 1f / determinant; @@ -407,6 +376,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Negate this matrix + * * @return this */ public Matrix negate() { @@ -415,6 +385,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Negate this matrix and place the result in a destination matrix. + * * @param dest The destination matrix, or null if a new matrix is to be created * @return the negated matrix */ @@ -424,7 +395,8 @@ public class Matrix3f extends Matrix implements Serializable { /** * Negate the source matrix and place the result in the destination matrix. - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null if a new matrix is to be created * @return the negated matrix */ @@ -445,6 +417,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Set this matrix to be the identity matrix. + * * @return this */ public Matrix setIdentity() { @@ -453,6 +426,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Set the matrix to be the identity matrix. + * * @param m The matrix to be set to the identity * @return m */ @@ -471,6 +445,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Set this matrix to 0. + * * @return this */ public Matrix setZero() { @@ -479,6 +454,7 @@ public class Matrix3f extends Matrix implements Serializable { /** * Set the matrix matrix to 0. + * * @param m The matrix to be set to 0 * @return m */ diff --git a/src/main/java/org/lwjglx/util/vector/Matrix4f.java b/src/main/java/org/lwjglx/util/vector/Matrix4f.java index c09ad5d..71acd89 100644 --- a/src/main/java/org/lwjglx/util/vector/Matrix4f.java +++ b/src/main/java/org/lwjglx/util/vector/Matrix4f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -40,6 +24,7 @@ import java.nio.FloatBuffer; * @author foo */ public class Matrix4f extends Matrix implements Serializable { + private static final long serialVersionUID = 1L; public float m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33; @@ -62,43 +47,16 @@ public class Matrix4f extends Matrix implements Serializable { */ public String toString() { StringBuilder buf = new StringBuilder(); - buf.append(m00) - .append(' ') - .append(m10) - .append(' ') - .append(m20) - .append(' ') - .append(m30) - .append('\n'); - buf.append(m01) - .append(' ') - .append(m11) - .append(' ') - .append(m21) - .append(' ') - .append(m31) - .append('\n'); - buf.append(m02) - .append(' ') - .append(m12) - .append(' ') - .append(m22) - .append(' ') - .append(m32) - .append('\n'); - buf.append(m03) - .append(' ') - .append(m13) - .append(' ') - .append(m23) - .append(' ') - .append(m33) - .append('\n'); + buf.append(m00).append(' ').append(m10).append(' ').append(m20).append(' ').append(m30).append('\n'); + buf.append(m01).append(' ').append(m11).append(' ').append(m21).append(' ').append(m31).append('\n'); + buf.append(m02).append(' ').append(m12).append(' ').append(m22).append(' ').append(m32).append('\n'); + buf.append(m03).append(' ').append(m13).append(' ').append(m23).append(' ').append(m33).append('\n'); return buf.toString(); } /** * Set this matrix to be the identity matrix. + * * @return this */ public Matrix setIdentity() { @@ -107,6 +65,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Set the given matrix to be the identity matrix. + * * @param m The matrix to set to the identity * @return m */ @@ -133,6 +92,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Set this matrix to 0. + * * @return this */ public Matrix setZero() { @@ -141,6 +101,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Set the given matrix to 0. + * * @param m The matrix to set to 0 * @return m */ @@ -167,6 +128,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Load from another matrix4f + * * @param src The source matrix * @return this */ @@ -176,7 +138,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Copy the source matrix to the destination matrix - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null of a new one is to be created * @return The copied matrix */ @@ -203,8 +166,7 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in column major - * (OpenGL) order. + * Load from a float buffer. The buffer stores the matrix in column major (OpenGL) order. * * @param buf A float buffer to read from * @return this @@ -232,8 +194,7 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Load from a float buffer. The buffer stores the matrix in row major - * (maths) order. + * Load from a float buffer. The buffer stores the matrix in row major (maths) order. * * @param buf A float buffer to read from * @return this @@ -261,8 +222,8 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in column - * major (openGL) order. + * Store this matrix in a float buffer. The matrix is stored in column major (openGL) order. + * * @param buf The buffer to store this matrix in */ public Matrix store(FloatBuffer buf) { @@ -286,8 +247,8 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Store this matrix in a float buffer. The matrix is stored in row - * major (maths) order. + * Store this matrix in a float buffer. The matrix is stored in row major (maths) order. + * * @param buf The buffer to store this matrix in */ public Matrix storeTranspose(FloatBuffer buf) { @@ -311,8 +272,8 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Store the rotation portion of this matrix in a float buffer. The matrix is stored in column - * major (openGL) order. + * Store the rotation portion of this matrix in a float buffer. The matrix is stored in column major (openGL) order. + * * @param buf The buffer to store this matrix in */ public Matrix store3f(FloatBuffer buf) { @@ -330,9 +291,10 @@ public class Matrix4f extends Matrix implements Serializable { /** * Add two matrices together and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix4f add(Matrix4f left, Matrix4f right, Matrix4f dest) { @@ -360,9 +322,10 @@ public class Matrix4f extends Matrix implements Serializable { /** * Subtract the right matrix from the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix4f sub(Matrix4f left, Matrix4f right, Matrix4f dest) { @@ -390,9 +353,10 @@ public class Matrix4f extends Matrix implements Serializable { /** * Multiply the right matrix by the left and place the result in a third matrix. - * @param left The left source matrix + * + * @param left The left source matrix * @param right The right source matrix - * @param dest The destination matrix, or null if a new one is to be created + * @param dest The destination matrix, or null if a new one is to be created * @return the destination matrix */ public static Matrix4f mul(Matrix4f left, Matrix4f right, Matrix4f dest) { @@ -436,11 +400,11 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Transform a Vector by a matrix and return the result in a destination - * vector. - * @param left The left matrix + * Transform a Vector by a matrix and return the result in a destination vector. + * + * @param left The left matrix * @param right The right vector - * @param dest The destination vector, or null if a new one is to be created + * @param dest The destination vector, or null if a new one is to be created * @return the destination vector */ public static Vector4f transform(Matrix4f left, Vector4f right, Vector4f dest) { @@ -461,6 +425,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Transpose this matrix + * * @return this */ public Matrix transpose() { @@ -469,6 +434,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate this matrix + * * @param vec The vector to translate by * @return this */ @@ -478,6 +444,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate this matrix + * * @param vec The vector to translate by * @return this */ @@ -487,6 +454,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Scales this matrix + * * @param vec The vector to scale by * @return this */ @@ -496,8 +464,9 @@ public class Matrix4f extends Matrix implements Serializable { /** * Scales the source matrix and put the result in the destination matrix - * @param vec The vector to scale by - * @param src The source matrix + * + * @param vec The vector to scale by + * @param src The source matrix * @param dest The destination matrix, or null if a new matrix is to be created * @return The scaled matrix */ @@ -520,8 +489,9 @@ public class Matrix4f extends Matrix implements Serializable { /** * Rotates the matrix around the given axis the specified angle + * * @param angle the angle, in radians. - * @param axis The vector representing the rotation axis. Must be normalized. + * @param axis The vector representing the rotation axis. Must be normalized. * @return this */ public Matrix4f rotate(float angle, Vector3f axis) { @@ -530,9 +500,10 @@ public class Matrix4f extends Matrix implements Serializable { /** * Rotates the matrix around the given axis the specified angle + * * @param angle the angle, in radians. - * @param axis The vector representing the rotation axis. Must be normalized. - * @param dest The matrix to put the result, or null if a new matrix is to be created + * @param axis The vector representing the rotation axis. Must be normalized. + * @param dest The matrix to put the result, or null if a new matrix is to be created * @return The rotated matrix */ public Matrix4f rotate(float angle, Vector3f axis, Matrix4f dest) { @@ -540,12 +511,12 @@ public class Matrix4f extends Matrix implements Serializable { } /** - * Rotates the source matrix around the given axis the specified angle and - * put the result in the destination matrix. + * Rotates the source matrix around the given axis the specified angle and put the result in the destination matrix. + * * @param angle the angle, in radians. - * @param axis The vector representing the rotation axis. Must be normalized. - * @param src The matrix to rotate - * @param dest The matrix to put the result, or null if a new matrix is to be created + * @param axis The vector representing the rotation axis. Must be normalized. + * @param src The matrix to rotate + * @param dest The matrix to put the result, or null if a new matrix is to be created * @return The rotated matrix */ public static Matrix4f rotate(float angle, Vector3f axis, Matrix4f src, Matrix4f dest) { @@ -597,7 +568,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate this matrix and stash the result in another matrix - * @param vec The vector to translate by + * + * @param vec The vector to translate by * @param dest The destination matrix or null if a new matrix is to be created * @return the translated matrix */ @@ -607,8 +579,9 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate the source matrix and stash the result in the destination matrix - * @param vec The vector to translate by - * @param src The source matrix + * + * @param vec The vector to translate by + * @param src The source matrix * @param dest The destination matrix or null if a new matrix is to be created * @return The translated matrix */ @@ -625,7 +598,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate this matrix and stash the result in another matrix - * @param vec The vector to translate by + * + * @param vec The vector to translate by * @param dest The destination matrix or null if a new matrix is to be created * @return the translated matrix */ @@ -635,8 +609,9 @@ public class Matrix4f extends Matrix implements Serializable { /** * Translate the source matrix and stash the result in the destination matrix - * @param vec The vector to translate by - * @param src The source matrix + * + * @param vec The vector to translate by + * @param src The source matrix * @param dest The destination matrix or null if a new matrix is to be created * @return The translated matrix */ @@ -653,6 +628,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Transpose this matrix and place the result in another matrix + * * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -662,7 +638,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Transpose the source matrix and place the result in the destination matrix - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix or null if a new matrix is to be created * @return the transposed matrix */ @@ -709,40 +686,34 @@ public class Matrix4f extends Matrix implements Serializable { * @return the determinant of the matrix */ public float determinant() { - float f = m00 - * ((m11 * m22 * m33 + m12 * m23 * m31 + m13 * m21 * m32) - - m13 * m22 * m31 - - m11 * m23 * m32 - - m12 * m21 * m33); - f -= m01 - * ((m10 * m22 * m33 + m12 * m23 * m30 + m13 * m20 * m32) - - m13 * m22 * m30 - - m10 * m23 * m32 - - m12 * m20 * m33); - f += m02 - * ((m10 * m21 * m33 + m11 * m23 * m30 + m13 * m20 * m31) - - m13 * m21 * m30 - - m10 * m23 * m31 - - m11 * m20 * m33); - f -= m03 - * ((m10 * m21 * m32 + m11 * m22 * m30 + m12 * m20 * m31) - - m12 * m21 * m30 - - m10 * m22 * m31 - - m11 * m20 * m32); + float f = m00 * ((m11 * m22 * m33 + m12 * m23 * m31 + m13 * m21 * m32) - m13 * m22 * m31 + - m11 * m23 * m32 + - m12 * m21 * m33); + f -= m01 * ((m10 * m22 * m33 + m12 * m23 * m30 + m13 * m20 * m32) - m13 * m22 * m30 + - m10 * m23 * m32 + - m12 * m20 * m33); + f += m02 * ((m10 * m21 * m33 + m11 * m23 * m30 + m13 * m20 * m31) - m13 * m21 * m30 + - m10 * m23 * m31 + - m11 * m20 * m33); + f -= m03 * ((m10 * m21 * m32 + m11 * m22 * m30 + m12 * m20 * m31) - m12 * m21 * m30 + - m10 * m22 * m31 + - m11 * m20 * m32); return f; } /** * Calculate the determinant of a 3x3 matrix + * * @return result */ - private static float determinant3x3( - float t00, float t01, float t02, float t10, float t11, float t12, float t20, float t21, float t22) { + private static float determinant3x3(float t00, float t01, float t02, float t10, float t11, float t12, float t20, + float t21, float t22) { return t00 * (t11 * t22 - t12 * t21) + t01 * (t12 * t20 - t10 * t22) + t02 * (t10 * t21 - t11 * t20); } /** * Invert this matrix + * * @return this if successful, null otherwise */ public Matrix invert() { @@ -751,7 +722,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Invert the source matrix and put the result in the destination - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null if a new matrix is to be created * @return The inverted matrix if successful, null otherwise */ @@ -760,41 +732,102 @@ public class Matrix4f extends Matrix implements Serializable { if (determinant != 0) { /* - * m00 m01 m02 m03 - * m10 m11 m12 m13 - * m20 m21 m22 m23 - * m30 m31 m32 m33 + * m00 m01 m02 m03 m10 m11 m12 m13 m20 m21 m22 m23 m30 m31 m32 m33 */ if (dest == null) dest = new Matrix4f(); float determinant_inv = 1f / determinant; // first row float t00 = determinant3x3(src.m11, src.m12, src.m13, src.m21, src.m22, src.m23, src.m31, src.m32, src.m33); - float t01 = - -determinant3x3(src.m10, src.m12, src.m13, src.m20, src.m22, src.m23, src.m30, src.m32, src.m33); + float t01 = -determinant3x3( + src.m10, + src.m12, + src.m13, + src.m20, + src.m22, + src.m23, + src.m30, + src.m32, + src.m33); float t02 = determinant3x3(src.m10, src.m11, src.m13, src.m20, src.m21, src.m23, src.m30, src.m31, src.m33); - float t03 = - -determinant3x3(src.m10, src.m11, src.m12, src.m20, src.m21, src.m22, src.m30, src.m31, src.m32); + float t03 = -determinant3x3( + src.m10, + src.m11, + src.m12, + src.m20, + src.m21, + src.m22, + src.m30, + src.m31, + src.m32); // second row - float t10 = - -determinant3x3(src.m01, src.m02, src.m03, src.m21, src.m22, src.m23, src.m31, src.m32, src.m33); + float t10 = -determinant3x3( + src.m01, + src.m02, + src.m03, + src.m21, + src.m22, + src.m23, + src.m31, + src.m32, + src.m33); float t11 = determinant3x3(src.m00, src.m02, src.m03, src.m20, src.m22, src.m23, src.m30, src.m32, src.m33); - float t12 = - -determinant3x3(src.m00, src.m01, src.m03, src.m20, src.m21, src.m23, src.m30, src.m31, src.m33); + float t12 = -determinant3x3( + src.m00, + src.m01, + src.m03, + src.m20, + src.m21, + src.m23, + src.m30, + src.m31, + src.m33); float t13 = determinant3x3(src.m00, src.m01, src.m02, src.m20, src.m21, src.m22, src.m30, src.m31, src.m32); // third row float t20 = determinant3x3(src.m01, src.m02, src.m03, src.m11, src.m12, src.m13, src.m31, src.m32, src.m33); - float t21 = - -determinant3x3(src.m00, src.m02, src.m03, src.m10, src.m12, src.m13, src.m30, src.m32, src.m33); + float t21 = -determinant3x3( + src.m00, + src.m02, + src.m03, + src.m10, + src.m12, + src.m13, + src.m30, + src.m32, + src.m33); float t22 = determinant3x3(src.m00, src.m01, src.m03, src.m10, src.m11, src.m13, src.m30, src.m31, src.m33); - float t23 = - -determinant3x3(src.m00, src.m01, src.m02, src.m10, src.m11, src.m12, src.m30, src.m31, src.m32); + float t23 = -determinant3x3( + src.m00, + src.m01, + src.m02, + src.m10, + src.m11, + src.m12, + src.m30, + src.m31, + src.m32); // fourth row - float t30 = - -determinant3x3(src.m01, src.m02, src.m03, src.m11, src.m12, src.m13, src.m21, src.m22, src.m23); + float t30 = -determinant3x3( + src.m01, + src.m02, + src.m03, + src.m11, + src.m12, + src.m13, + src.m21, + src.m22, + src.m23); float t31 = determinant3x3(src.m00, src.m02, src.m03, src.m10, src.m12, src.m13, src.m20, src.m22, src.m23); - float t32 = - -determinant3x3(src.m00, src.m01, src.m03, src.m10, src.m11, src.m13, src.m20, src.m21, src.m23); + float t32 = -determinant3x3( + src.m00, + src.m01, + src.m03, + src.m10, + src.m11, + src.m13, + src.m20, + src.m21, + src.m23); float t33 = determinant3x3(src.m00, src.m01, src.m02, src.m10, src.m11, src.m12, src.m20, src.m21, src.m22); // transpose and divide by the determinant @@ -820,6 +853,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Negate this matrix + * * @return this */ public Matrix negate() { @@ -828,6 +862,7 @@ public class Matrix4f extends Matrix implements Serializable { /** * Negate this matrix and place the result in a destination matrix. + * * @param dest The destination matrix, or null if a new matrix is to be created * @return the negated matrix */ @@ -837,7 +872,8 @@ public class Matrix4f extends Matrix implements Serializable { /** * Negate this matrix and place the result in a destination matrix. - * @param src The source matrix + * + * @param src The source matrix * @param dest The destination matrix, or null if a new matrix is to be created * @return The negated matrix */ diff --git a/src/main/java/org/lwjglx/util/vector/Quaternion.java b/src/main/java/org/lwjglx/util/vector/Quaternion.java index 6379dee..18073e4 100644 --- a/src/main/java/org/lwjglx/util/vector/Quaternion.java +++ b/src/main/java/org/lwjglx/util/vector/Quaternion.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -36,12 +20,12 @@ package org.lwjglx.util.vector; * Quaternions for LWJGL! * * @author fbi - * @version $Revision: 3418 $ - * $Id: Quaternion.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Quaternion.java 3418 2010-09-28 21:11:35Z spasi $ */ import java.nio.FloatBuffer; public class Quaternion extends Vector implements ReadableVector4f { + private static final long serialVersionUID = 1L; public float x, y, z, w; @@ -73,7 +57,6 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (non-Javadoc) - * * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) */ public void set(float x, float y) { @@ -83,7 +66,6 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (non-Javadoc) - * * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) */ public void set(float x, float y, float z) { @@ -94,9 +76,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (non-Javadoc) - * - * @see org.lwjgl.util.vector.WritableVector4f#set(float, float, float, - * float) + * @see org.lwjgl.util.vector.WritableVector4f#set(float, float, float, float) */ public void set(float x, float y, float z, float w) { this.x = x; @@ -108,8 +88,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Load from another Vector4f * - * @param src - * The source vector + * @param src The source vector * @return this */ public Quaternion set(ReadableVector4f src) { @@ -122,6 +101,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Set this quaternion to the multiplication identity. + * * @return this */ public Quaternion setIdentity() { @@ -130,6 +110,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Set the given quaternion to the multiplication identity. + * * @param q The quaternion * @return q */ @@ -151,11 +132,8 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Normalise the source quaternion and place the result in another quaternion. * - * @param src - * The source quaternion - * @param dest - * The destination quaternion, or null if a new quaternion is to be - * created + * @param src The source quaternion + * @param dest The destination quaternion, or null if a new quaternion is to be created * @return The normalised quaternion */ public static Quaternion normalise(Quaternion src, Quaternion dest) { @@ -171,9 +149,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Normalise this quaternion and place the result in another quaternion. * - * @param dest - * The destination quaternion, or null if a new quaternion is to be - * created + * @param dest The destination quaternion, or null if a new quaternion is to be created * @return the normalised quaternion */ public Quaternion normalise(Quaternion dest) { @@ -183,10 +159,8 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * The dot product of two quaternions * - * @param left - * The LHS quat - * @param right - * The RHS quat + * @param left The LHS quat + * @param right The RHS quat * @return left dot right */ public static float dot(Quaternion left, Quaternion right) { @@ -196,9 +170,7 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Calculate the conjugate of this quaternion and put it into the given one * - * @param dest - * The quaternion which should be set to the conjugate of this - * quaternion + * @param dest The quaternion which should be set to the conjugate of this quaternion */ public Quaternion negate(Quaternion dest) { return negate(this, dest); @@ -207,11 +179,8 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Calculate the conjugate of this quaternion and put it into the given one * - * @param src - * The source quaternion - * @param dest - * The quaternion which should be set to the conjugate of this - * quaternion + * @param src The source quaternion + * @param dest The quaternion which should be set to the conjugate of this quaternion */ public static Quaternion negate(Quaternion src, Quaternion dest) { if (dest == null) dest = new Quaternion(); @@ -231,7 +200,8 @@ public class Quaternion extends Vector implements ReadableVector4f { return negate(this, this); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.Vector#load(java.nio.FloatBuffer) */ public Vector load(FloatBuffer buf) { @@ -244,7 +214,6 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (non-Javadoc) - * * @see org.lwjgl.vector.Vector#scale(float) */ public Vector scale(float scale) { @@ -253,9 +222,10 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Scale the source quaternion by scale and put the result in the destination + * * @param scale The amount to scale by - * @param src The source quaternion - * @param dest The destination quaternion, or null if a new quaternion is to be created + * @param src The source quaternion + * @param dest The destination quaternion, or null if a new quaternion is to be created * @return The scaled quaternion */ public static Quaternion scale(float scale, Quaternion src, Quaternion dest) { @@ -267,7 +237,8 @@ public class Quaternion extends Vector implements ReadableVector4f { return dest; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.ReadableVector#store(java.nio.FloatBuffer) */ public Vector store(FloatBuffer buf) { @@ -322,7 +293,6 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (Overrides) - * * @see org.lwjgl.vector.ReadableVector3f#getZ() */ public float getZ() { @@ -340,7 +310,6 @@ public class Quaternion extends Vector implements ReadableVector4f { /* * (Overrides) - * * @see org.lwjgl.vector.ReadableVector3f#getW() */ public float getW() { @@ -352,14 +321,11 @@ public class Quaternion extends Vector implements ReadableVector4f { } /** - * Sets the value of this quaternion to the quaternion product of - * quaternions left and right (this = left * right). Note that this is safe - * for aliasing (e.g. this can be left or right). + * Sets the value of this quaternion to the quaternion product of quaternions left and right (this = left * right). + * Note that this is safe for aliasing (e.g. this can be left or right). * - * @param left - * the first quaternion - * @param right - * the second quaternion + * @param left the first quaternion + * @param right the second quaternion */ public static Quaternion mul(Quaternion left, Quaternion right, Quaternion dest) { if (dest == null) dest = new Quaternion(); @@ -373,14 +339,11 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * - * Multiplies quaternion left by the inverse of quaternion right and places - * the value into this quaternion. The value of both argument quaternions is - * preservered (this = left * right^-1). + * Multiplies quaternion left by the inverse of quaternion right and places the value into this quaternion. The + * value of both argument quaternions is preservered (this = left * right^-1). * - * @param left - * the left quaternion - * @param right - * the right quaternion + * @param left the left quaternion + * @param right the right quaternion */ public static Quaternion mulInverse(Quaternion left, Quaternion right, Quaternion dest) { float n = right.lengthSquared(); @@ -398,11 +361,9 @@ public class Quaternion extends Vector implements ReadableVector4f { } /** - * Sets the value of this quaternion to the equivalent rotation of the - * Axis-Angle argument. + * Sets the value of this quaternion to the equivalent rotation of the Axis-Angle argument. * - * @param a1 - * the axis-angle: (x,y,z) is the axis and w is the angle + * @param a1 the axis-angle: (x,y,z) is the axis and w is the angle */ public final void setFromAxisAngle(Vector4f a1) { x = a1.x; @@ -418,11 +379,9 @@ public class Quaternion extends Vector implements ReadableVector4f { } /** - * Sets the value of this quaternion using the rotational component of the - * passed matrix. + * Sets the value of this quaternion using the rotational component of the passed matrix. * - * @param m - * The matrix + * @param m The matrix * @return this */ public final Quaternion setFromMatrix(Matrix4f m) { @@ -430,13 +389,10 @@ public class Quaternion extends Vector implements ReadableVector4f { } /** - * Sets the value of the source quaternion using the rotational component of the - * passed matrix. + * Sets the value of the source quaternion using the rotational component of the passed matrix. * - * @param m - * The source matrix - * @param q - * The destination quaternion, or null if a new quaternion is to be created + * @param m The source matrix + * @param q The destination quaternion, or null if a new quaternion is to be created * @return q */ public static Quaternion setFromMatrix(Matrix4f m, Quaternion q) { @@ -444,24 +400,19 @@ public class Quaternion extends Vector implements ReadableVector4f { } /** - * Sets the value of this quaternion using the rotational component of the - * passed matrix. + * Sets the value of this quaternion using the rotational component of the passed matrix. * - * @param m - * The source matrix + * @param m The source matrix */ public final Quaternion setFromMatrix(Matrix3f m) { return setFromMatrix(m, this); } /** - * Sets the value of the source quaternion using the rotational component of the - * passed matrix. + * Sets the value of the source quaternion using the rotational component of the passed matrix. * - * @param m - * The source matrix - * @param q - * The destination quaternion, or null if a new quaternion is to be created + * @param m The source matrix + * @param q The destination quaternion, or null if a new quaternion is to be created * @return q */ public static Quaternion setFromMatrix(Matrix3f m, Quaternion q) { @@ -471,8 +422,8 @@ public class Quaternion extends Vector implements ReadableVector4f { /** * Private method to perform the matrix-to-quaternion conversion */ - private Quaternion setFromMat( - float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) { + private Quaternion setFromMat(float m00, float m01, float m02, float m10, float m11, float m12, float m20, + float m21, float m22) { float s; float tr = m00 + m11 + m22; diff --git a/src/main/java/org/lwjglx/util/vector/ReadableVector.java b/src/main/java/org/lwjglx/util/vector/ReadableVector.java index f64e8cf..ff7d7d7 100644 --- a/src/main/java/org/lwjglx/util/vector/ReadableVector.java +++ b/src/main/java/org/lwjglx/util/vector/ReadableVector.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -37,16 +21,20 @@ import java.nio.FloatBuffer; * @author foo */ public interface ReadableVector { + /** * @return the length of the vector */ float length(); + /** * @return the length squared of the vector */ float lengthSquared(); + /** * Store this vector in a FloatBuffer + * * @param buf The buffer to store it in, at the current position * @return this */ diff --git a/src/main/java/org/lwjglx/util/vector/ReadableVector2f.java b/src/main/java/org/lwjglx/util/vector/ReadableVector2f.java index eaf6da2..f64f37c 100644 --- a/src/main/java/org/lwjglx/util/vector/ReadableVector2f.java +++ b/src/main/java/org/lwjglx/util/vector/ReadableVector2f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -35,10 +19,12 @@ package org.lwjglx.util.vector; * @author foo */ public interface ReadableVector2f extends ReadableVector { + /** * @return x */ float getX(); + /** * @return y */ diff --git a/src/main/java/org/lwjglx/util/vector/ReadableVector3f.java b/src/main/java/org/lwjglx/util/vector/ReadableVector3f.java index b93b49c..ca4db21 100644 --- a/src/main/java/org/lwjglx/util/vector/ReadableVector3f.java +++ b/src/main/java/org/lwjglx/util/vector/ReadableVector3f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -35,6 +19,7 @@ package org.lwjglx.util.vector; * @author foo */ public interface ReadableVector3f extends ReadableVector2f { + /** * @return z */ diff --git a/src/main/java/org/lwjglx/util/vector/ReadableVector4f.java b/src/main/java/org/lwjglx/util/vector/ReadableVector4f.java index 82ed678..888013f 100644 --- a/src/main/java/org/lwjglx/util/vector/ReadableVector4f.java +++ b/src/main/java/org/lwjglx/util/vector/ReadableVector4f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; diff --git a/src/main/java/org/lwjglx/util/vector/Vector.java b/src/main/java/org/lwjglx/util/vector/Vector.java index 6bd0eaa..318959d 100644 --- a/src/main/java/org/lwjglx/util/vector/Vector.java +++ b/src/main/java/org/lwjglx/util/vector/Vector.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Base class for vectors. * * @author cix_foo - * @version $Revision: 3418 $ - * $Id: Vector.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Vector.java 3418 2010-09-28 21:11:35Z spasi $ */ public abstract class Vector implements Serializable, ReadableVector { @@ -65,6 +48,7 @@ public abstract class Vector implements Serializable, ReadableVector { /** * Load this vector from a FloatBuffer + * * @param buf The buffer to load it from, at the current position * @return this */ @@ -72,12 +56,14 @@ public abstract class Vector implements Serializable, ReadableVector { /** * Negate a vector + * * @return this */ public abstract Vector negate(); /** * Normalise this vector + * * @return this */ public final Vector normalise() { @@ -90,6 +76,7 @@ public abstract class Vector implements Serializable, ReadableVector { /** * Store this vector in a FloatBuffer + * * @param buf The buffer to store it in, at the current position * @return this */ @@ -97,6 +84,7 @@ public abstract class Vector implements Serializable, ReadableVector { /** * Scale this vector + * * @param scale The scale factor * @return this */ diff --git a/src/main/java/org/lwjglx/util/vector/Vector2f.java b/src/main/java/org/lwjglx/util/vector/Vector2f.java index ade21c8..8850572 100644 --- a/src/main/java/org/lwjglx/util/vector/Vector2f.java +++ b/src/main/java/org/lwjglx/util/vector/Vector2f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Holds a 2-tuple vector. * * @author cix_foo - * @version $Revision: 3418 $ - * $Id: Vector2f.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Vector2f.java 3418 2010-09-28 21:11:35Z spasi $ */ public class Vector2f extends Vector implements Serializable, ReadableVector2f, WritableVector2f { @@ -69,7 +52,8 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, set(x, y); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) */ public void set(float x, float y) { @@ -79,6 +63,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Load from another Vector2f + * * @param src The source vector * @return this */ @@ -97,6 +82,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Translate a vector + * * @param x The translation in x * @param y the translation in y * @return this @@ -109,6 +95,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Negate a vector + * * @return this */ public Vector negate() { @@ -119,6 +106,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Negate a vector and place the result in a destination vector. + * * @param dest The destination vector or null if a new vector is to be created * @return the negated vector */ @@ -131,6 +119,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Normalise this vector and place the result in another vector. + * * @param dest The destination vector, or null if a new vector is to be created * @return the normalised vector */ @@ -144,9 +133,9 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, } /** - * The dot product of two vectors is calculated as - * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z - * @param left The LHS vector + * The dot product of two vectors is calculated as v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + * + * @param left The LHS vector * @param right The RHS vector * @return left dot right */ @@ -156,6 +145,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Calculate the angle between two vectors, in radians + * * @param a A vector * @param b The other vector * @return the angle between the two vectors, in radians @@ -168,11 +158,11 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, } /** - * Add a vector to another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Add a vector to another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return the sum of left and right in dest */ public static Vector2f add(Vector2f left, Vector2f right, Vector2f dest) { @@ -184,11 +174,11 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, } /** - * Subtract a vector from another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Subtract a vector from another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return left minus right in dest */ public static Vector2f sub(Vector2f left, Vector2f right, Vector2f dest) { @@ -201,6 +191,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Store this vector in a FloatBuffer + * * @param buf The buffer to store it in, at the current position * @return this */ @@ -212,6 +203,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Load this vector from a FloatBuffer + * * @param buf The buffer to load it from, at the current position * @return this */ @@ -221,7 +213,8 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#scale(float) */ public Vector scale(float scale) { @@ -232,7 +225,8 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see java.lang.Object#toString() */ public String toString() { @@ -262,6 +256,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Set X + * * @param x */ public final void setX(float x) { @@ -270,6 +265,7 @@ public class Vector2f extends Vector implements Serializable, ReadableVector2f, /** * Set Y + * * @param y */ public final void setY(float y) { diff --git a/src/main/java/org/lwjglx/util/vector/Vector3f.java b/src/main/java/org/lwjglx/util/vector/Vector3f.java index 1c7ca9f..f12e44b 100644 --- a/src/main/java/org/lwjglx/util/vector/Vector3f.java +++ b/src/main/java/org/lwjglx/util/vector/Vector3f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Holds a 3-tuple vector. * * @author cix_foo - * @version $Revision: 3418 $ - * $Id: Vector3f.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $Revision: 3418 $ $Id: Vector3f.java 3418 2010-09-28 21:11:35Z spasi $ */ public class Vector3f extends Vector implements Serializable, ReadableVector3f, WritableVector3f { @@ -69,7 +52,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, set(x, y, z); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) */ public void set(float x, float y) { @@ -77,7 +61,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, this.y = y; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) */ public void set(float x, float y, float z) { @@ -88,6 +73,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Load from another Vector3f + * * @param src The source vector * @return this */ @@ -107,6 +93,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Translate a vector + * * @param x The translation in x * @param y the translation in y * @return this @@ -119,11 +106,11 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, } /** - * Add a vector to another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Add a vector to another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return the sum of left and right in dest */ public static Vector3f add(Vector3f left, Vector3f right, Vector3f dest) { @@ -135,11 +122,11 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, } /** - * Subtract a vector from another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Subtract a vector from another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return left minus right in dest */ public static Vector3f sub(Vector3f left, Vector3f right, Vector3f dest) { @@ -153,9 +140,9 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * The cross product of two vectors. * - * @param left The LHS vector + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination result, or null if a new vector is to be created + * @param dest The destination result, or null if a new vector is to be created * @return left cross right */ public static Vector3f cross(Vector3f left, Vector3f right, Vector3f dest) { @@ -172,6 +159,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Negate a vector + * * @return this */ public Vector negate() { @@ -183,6 +171,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Negate a vector and place the result in a destination vector. + * * @param dest The destination vector or null if a new vector is to be created * @return the negated vector */ @@ -196,6 +185,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Normalise this vector and place the result in another vector. + * * @param dest The destination vector, or null if a new vector is to be created * @return the normalised vector */ @@ -209,9 +199,9 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, } /** - * The dot product of two vectors is calculated as - * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z - * @param left The LHS vector + * The dot product of two vectors is calculated as v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + * + * @param left The LHS vector * @param right The RHS vector * @return left dot right */ @@ -221,6 +211,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Calculate the angle between two vectors, in radians + * * @param a A vector * @param b The other vector * @return the angle between the two vectors, in radians @@ -232,7 +223,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, return (float) Math.acos(dls); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#load(FloatBuffer) */ public Vector load(FloatBuffer buf) { @@ -242,7 +234,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#scale(float) */ public Vector scale(float scale) { @@ -254,7 +247,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#store(FloatBuffer) */ public Vector store(FloatBuffer buf) { @@ -266,7 +260,8 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see java.lang.Object#toString() */ public String toString() { @@ -298,6 +293,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Set X + * * @param x */ public final void setX(float x) { @@ -306,6 +302,7 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Set Y + * * @param y */ public final void setY(float y) { @@ -314,13 +311,15 @@ public class Vector3f extends Vector implements Serializable, ReadableVector3f, /** * Set Z + * * @param z */ public void setZ(float z) { this.z = z; } - /* (Overrides) + /* + * (Overrides) * @see org.lwjgl.vector.ReadableVector3f#getZ() */ public float getZ() { diff --git a/src/main/java/org/lwjglx/util/vector/Vector4f.java b/src/main/java/org/lwjglx/util/vector/Vector4f.java index 11cb37d..e500d0c 100644 --- a/src/main/java/org/lwjglx/util/vector/Vector4f.java +++ b/src/main/java/org/lwjglx/util/vector/Vector4f.java @@ -1,33 +1,17 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; @@ -39,8 +23,7 @@ import java.nio.FloatBuffer; * Holds a 4-tuple vector. * * @author cix_foo - * @version $Revision: 2983 $ - * $Id: Vector4f.java 2983 2008-04-07 18:36:09Z matzon $ + * @version $Revision: 2983 $ $Id: Vector4f.java 2983 2008-04-07 18:36:09Z matzon $ */ public class Vector4f extends Vector implements Serializable, ReadableVector4f, WritableVector4f { @@ -69,7 +52,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, set(x, y, z, w); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) */ public void set(float x, float y) { @@ -77,7 +61,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, this.y = y; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) */ public void set(float x, float y, float z) { @@ -86,7 +71,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, this.z = z; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.util.vector.WritableVector4f#set(float, float, float, float) */ public void set(float x, float y, float z, float w) { @@ -98,6 +84,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Load from another Vector4f + * * @param src The source vector * @return this */ @@ -118,6 +105,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Translate a vector + * * @param x The translation in x * @param y the translation in y * @return this @@ -131,11 +119,11 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, } /** - * Add a vector to another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Add a vector to another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return the sum of left and right in dest */ public static Vector4f add(Vector4f left, Vector4f right, Vector4f dest) { @@ -147,11 +135,11 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, } /** - * Subtract a vector from another vector and place the result in a destination - * vector. - * @param left The LHS vector + * Subtract a vector from another vector and place the result in a destination vector. + * + * @param left The LHS vector * @param right The RHS vector - * @param dest The destination vector, or null if a new vector is to be created + * @param dest The destination vector, or null if a new vector is to be created * @return left minus right in dest */ public static Vector4f sub(Vector4f left, Vector4f right, Vector4f dest) { @@ -164,6 +152,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Negate a vector + * * @return this */ public Vector negate() { @@ -176,6 +165,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Negate a vector and place the result in a destination vector. + * * @param dest The destination vector or null if a new vector is to be created * @return the negated vector */ @@ -190,6 +180,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Normalise this vector and place the result in another vector. + * * @param dest The destination vector, or null if a new vector is to be created * @return the normalised vector */ @@ -203,9 +194,9 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, } /** - * The dot product of two vectors is calculated as - * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + v1.w * v2.w - * @param left The LHS vector + * The dot product of two vectors is calculated as v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + v1.w * v2.w + * + * @param left The LHS vector * @param right The RHS vector * @return left dot right */ @@ -215,6 +206,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Calculate the angle between two vectors, in radians + * * @param a A vector * @param b The other vector * @return the angle between the two vectors, in radians @@ -226,7 +218,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, return (float) Math.acos(dls); } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#load(FloatBuffer) */ public Vector load(FloatBuffer buf) { @@ -237,7 +230,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#scale(float) */ public Vector scale(float scale) { @@ -248,7 +242,8 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, return this; } - /* (non-Javadoc) + /* + * (non-Javadoc) * @see org.lwjgl.vector.Vector#store(FloatBuffer) */ public Vector store(FloatBuffer buf) { @@ -281,6 +276,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Set X + * * @param x */ public final void setX(float x) { @@ -289,6 +285,7 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Set Y + * * @param y */ public final void setY(float y) { @@ -297,13 +294,15 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Set Z + * * @param z */ public void setZ(float z) { this.z = z; } - /* (Overrides) + /* + * (Overrides) * @see org.lwjgl.vector.ReadableVector3f#getZ() */ public float getZ() { @@ -312,13 +311,15 @@ public class Vector4f extends Vector implements Serializable, ReadableVector4f, /** * Set W + * * @param w */ public void setW(float w) { this.w = w; } - /* (Overrides) + /* + * (Overrides) * @see org.lwjgl.vector.ReadableVector3f#getZ() */ public float getW() { diff --git a/src/main/java/org/lwjglx/util/vector/WritableVector2f.java b/src/main/java/org/lwjglx/util/vector/WritableVector2f.java index 3157244..4d5847c 100644 --- a/src/main/java/org/lwjglx/util/vector/WritableVector2f.java +++ b/src/main/java/org/lwjglx/util/vector/WritableVector2f.java @@ -1,58 +1,45 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; /** * Writable interface to Vector2fs + * * @author $author$ - * @version $revision$ - * $Id: WritableVector2f.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $revision$ $Id: WritableVector2f.java 3418 2010-09-28 21:11:35Z spasi $ */ public interface WritableVector2f { /** * Set the X value + * * @param x */ void setX(float x); /** * Set the Y value + * * @param y */ void setY(float y); /** * Set the X,Y values + * * @param x * @param y */ diff --git a/src/main/java/org/lwjglx/util/vector/WritableVector3f.java b/src/main/java/org/lwjglx/util/vector/WritableVector3f.java index 5a83c57..51b5f42 100644 --- a/src/main/java/org/lwjglx/util/vector/WritableVector3f.java +++ b/src/main/java/org/lwjglx/util/vector/WritableVector3f.java @@ -1,52 +1,38 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; /** * Writable interface to Vector3fs + * * @author $author$ - * @version $revision$ - * $Id: WritableVector3f.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $revision$ $Id: WritableVector3f.java 3418 2010-09-28 21:11:35Z spasi $ */ public interface WritableVector3f extends WritableVector2f { /** * Set the Z value + * * @param z */ void setZ(float z); /** * Set the X,Y,Z values + * * @param x * @param y * @param z diff --git a/src/main/java/org/lwjglx/util/vector/WritableVector4f.java b/src/main/java/org/lwjglx/util/vector/WritableVector4f.java index 4f68bb0..c8dd56c 100644 --- a/src/main/java/org/lwjglx/util/vector/WritableVector4f.java +++ b/src/main/java/org/lwjglx/util/vector/WritableVector4f.java @@ -1,52 +1,38 @@ /* - * Copyright (c) 2002-2008 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. + * Copyright (c) 2002-2008 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.lwjglx.util.vector; /** * Writable interface to Vector4fs + * * @author $author$ - * @version $revision$ - * $Id: WritableVector4f.java 3418 2010-09-28 21:11:35Z spasi $ + * @version $revision$ $Id: WritableVector4f.java 3418 2010-09-28 21:11:35Z spasi $ */ public interface WritableVector4f extends WritableVector3f { /** * Set the W value + * * @param w */ void setW(float w); /** * Set the X,Y,Z,W values + * * @param x * @param y * @param z diff --git a/src/util/java/me/eigenraven/lwjgl3ify/ComparisonTool.java b/src/util/java/me/eigenraven/lwjgl3ify/ComparisonTool.java index 7449be3..5274b60 100644 --- a/src/util/java/me/eigenraven/lwjgl3ify/ComparisonTool.java +++ b/src/util/java/me/eigenraven/lwjgl3ify/ComparisonTool.java @@ -1,6 +1,5 @@ package me.eigenraven.lwjgl3ify; -import com.google.common.collect.Streams; import java.io.File; import java.io.IOException; import java.io.PrintWriter; @@ -10,6 +9,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.util.stream.IntStream; + import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; @@ -18,10 +18,12 @@ import org.objectweb.asm.Type; import org.objectweb.asm.tree.FieldNode; import org.objectweb.asm.tree.MethodNode; +import com.google.common.collect.Streams; + public class ComparisonTool { - final String[] EXCLUDES = new String[] { - "AWTGLCanvas", "FastIntMap", "FastIntMap$Entry", "FastIntMap$EntryIterator", "MappedObjectClassLoader" - }; + + final String[] EXCLUDES = new String[] { "AWTGLCanvas", "FastIntMap", "FastIntMap$Entry", + "FastIntMap$EntryIterator", "MappedObjectClassLoader" }; public static void main(String[] args) { new ComparisonTool().run(args); @@ -61,8 +63,7 @@ public class ComparisonTool { final JarApiSet.ClassApi gl2Class = gl2Entry.getValue(); final JarApiSet.ClassApi gl3Class = gl3.classes.get(gl2Entry.getKey()); final JarApiSet.ClassApi modClass = mod.classes.get(gl2Entry.getKey()); - if (gl2Class.className.contains("CL") - || gl2Class.className.contains("opencl") + if (gl2Class.className.contains("CL") || gl2Class.className.contains("opencl") || gl2Class.className.contains("opengles")) { continue; } @@ -83,8 +84,8 @@ public class ComparisonTool { final StringWriter proxyClass = new StringWriter(); final PrintWriter proxyClassP = new PrintWriter(proxyClass); final String javaName = gl2Class.className.replace('/', '.'); - final String transformedClassName = - existsInGl3 ? gl2Class.className.replace("/lwjgl/", "/lwjglx/") : gl2Class.className; + final String transformedClassName = existsInGl3 ? gl2Class.className.replace("/lwjgl/", "/lwjglx/") + : gl2Class.className; final File javaFile = new File(outputRoot, transformedClassName + ".java"); final int lastDot = javaName.lastIndexOf('.'); final String packageName = javaName.substring(0, lastDot); @@ -99,11 +100,14 @@ public class ComparisonTool { classType = "abstract class"; } final String superName = gl2Class.asmNode.superName.replace('/', '.'); - final String extendSpec = (superName == null || "java.lang.Object".equals(superName)) - ? "" + final String extendSpec = (superName == null || "java.lang.Object".equals(superName)) ? "" : " extends " + (existsInGl3 ? superName.replace(".lwjgl.", ".lwjglx.") : superName); proxyClassP.printf( - "package %s;%n%npublic %s %s%s {%n", transformedPackageName, classType, className, extendSpec); + "package %s;%n%npublic %s %s%s {%n", + transformedPackageName, + classType, + className, + extendSpec); for (FieldNode gl2Field : gl2Class.fields.values()) { if (gl2Field.name.contains("<")) { @@ -191,18 +195,16 @@ public class ComparisonTool { } final Type mType = Type.getMethodType(gl2Method.desc); final String retType = mType.getReturnType().getClassName(); - final String[] argTypes = Arrays.stream(mType.getArgumentTypes()) - .map(Type::getClassName) + final String[] argTypes = Arrays.stream(mType.getArgumentTypes()).map(Type::getClassName) .toArray(String[]::new); - final String[] argNames = IntStream.range(0, argTypes.length) - .mapToObj(i -> "arg" + i) + final String[] argNames = IntStream.range(0, argTypes.length).mapToObj(i -> "arg" + i) .toArray(String[]::new); final String argDefs = StringUtils.join( Streams.zip(Arrays.stream(argTypes), Arrays.stream(argNames), (t, n) -> t + " " + n) .toArray(String[]::new), ", "); - proxyClassP.printf( - " public%s %s %s(%s)%s%n", protKws, retType, gl2Method.name, argDefs, body); + proxyClassP + .printf(" public%s %s %s(%s)%s%n", protKws, retType, gl2Method.name, argDefs, body); } proxyClassP.printf("%n}%n"); diff --git a/src/util/java/me/eigenraven/lwjgl3ify/JarApiSet.java b/src/util/java/me/eigenraven/lwjgl3ify/JarApiSet.java index c8f2255..c82cc2b 100644 --- a/src/util/java/me/eigenraven/lwjgl3ify/JarApiSet.java +++ b/src/util/java/me/eigenraven/lwjgl3ify/JarApiSet.java @@ -8,6 +8,7 @@ import java.util.Map; import java.util.TreeMap; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; + import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.io.input.CloseShieldInputStream; @@ -19,6 +20,7 @@ import org.objectweb.asm.tree.FieldNode; import org.objectweb.asm.tree.MethodNode; public class JarApiSet { + public final TreeMap classes = new TreeMap<>(); public void addJar(File jarFile) { @@ -62,6 +64,7 @@ public class JarApiSet { } public static class ClassApi { + public final ClassNode asmNode; public final String className; public final TreeMap methods = new TreeMap<>(); diff --git a/src/util/java/me/eigenraven/lwjgl3ify/MethodMatcher.java b/src/util/java/me/eigenraven/lwjgl3ify/MethodMatcher.java index 878507b..1ee69eb 100644 --- a/src/util/java/me/eigenraven/lwjgl3ify/MethodMatcher.java +++ b/src/util/java/me/eigenraven/lwjgl3ify/MethodMatcher.java @@ -3,6 +3,7 @@ package me.eigenraven.lwjgl3ify; import java.util.Arrays; import java.util.List; import java.util.Map; + import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.objectweb.asm.Type; @@ -13,6 +14,7 @@ import org.objectweb.asm.tree.MethodInsnNode; import org.objectweb.asm.tree.MethodNode; public class MethodMatcher { + public final JarApiSet oldApi, newApi; public final Map.Entry oldClassNode; public final Map.Entry newClassNode; @@ -39,12 +41,8 @@ public class MethodMatcher { return argNames; } - public MethodMatcher( - JarApiSet oldApi, - JarApiSet newApi, - Map.Entry oldClassNode, - Map.Entry newClassNode, - Map.Entry oldMethodNode) { + public MethodMatcher(JarApiSet oldApi, JarApiSet newApi, Map.Entry oldClassNode, + Map.Entry newClassNode, Map.Entry oldMethodNode) { this.oldApi = oldApi; this.newApi = newApi; this.oldClassNode = oldClassNode; @@ -90,10 +88,7 @@ public class MethodMatcher { } } } - final String bufferArg = Arrays.stream(argTypes) - .filter(a -> a.contains("Buffer")) - .findFirst() - .orElse(null); + final String bufferArg = Arrays.stream(argTypes).filter(a -> a.contains("Buffer")).findFirst().orElse(null); final int bufferArgIdx = ArrayUtils.indexOf(argTypes, bufferArg); // Check if adding a type is enough if (nativeCallName != null) { @@ -125,7 +120,8 @@ public class MethodMatcher { case "java.nio.DoubleBuffer": glType = "org.lwjgl.opengl.GL11.GL_DOUBLE"; changedArgs[bufferArgIdx] = "me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(" - + changedArgs[bufferArgIdx] + ")"; + + changedArgs[bufferArgIdx] + + ")"; break; default: throw new IllegalStateException(bufferArg); @@ -139,12 +135,10 @@ public class MethodMatcher { // Remap argument types because lwjgl2's generator was not very smart if (nativeCallName != null) { final String newKey = nativeCallName.substring(1) + ":"; - final Map.Entry fuzzyMatch = - newClassNode.getValue().methods.ceilingEntry(newKey); + final Map.Entry fuzzyMatch = newClassNode.getValue().methods.ceilingEntry(newKey); if (fuzzyMatch.getValue().name.equals(nativeCallName.substring(1))) { final Type newType = Type.getMethodType(fuzzyMatch.getValue().desc); - final String[] newArgTypes = Arrays.stream(newType.getArgumentTypes()) - .map(Type::getClassName) + final String[] newArgTypes = Arrays.stream(newType.getArgumentTypes()).map(Type::getClassName) .toArray(String[]::new); boolean success = true; if (newArgTypes.length == argTypes.length) { @@ -160,14 +154,12 @@ public class MethodMatcher { if (paramAnnotations != null && paramAnnotations.length > i && !paramAnnotations[i].isEmpty()) { for (AnnotationNode annotation : paramAnnotations[i]) { if (annotation.desc.equals("Lorg/lwjgl/system/NativeType;")) { - newNativeType = - annotation.values.get(1).toString().trim(); + newNativeType = annotation.values.get(1).toString().trim(); } } } if (!oldArgType.equals(newArgType)) { - if (newArgType.startsWith("java.nio.") - && newArgType.endsWith("Buffer") + if (newArgType.startsWith("java.nio.") && newArgType.endsWith("Buffer") && oldArgType.startsWith("java.nio.") && oldArgType.endsWith("Buffer")) { final String oldBufferType = StringUtils.removeStart(oldArgType, "java.nio."); @@ -193,69 +185,79 @@ public class MethodMatcher { changedArgs[i] = argNames[i] + ".device"; } else if (newArgType.equals("java.lang.CharSequence") && oldArgType.equals("java.lang.String")) { - // no-op - } else if ((newArgType.equals("java.nio.IntBuffer") || newArgType.equals("int[]")) - && oldArgType.equals("int")) { - changedArgs[i] = "new int[]{" + argNames[i] + "}"; - } else if ((newArgType.equals("java.nio.LongBuffer") || newArgType.equals("long[]")) - && oldArgType.equals("long")) { - changedArgs[i] = "new long[]{" + argNames[i] + "}"; - } else if (newArgType.equals("long") - && newNativeType.endsWith("*") - && oldArgType.startsWith("java.nio.") - && oldArgType.endsWith("Buffer")) { - changedArgs[i] = "org.lwjglx.MemoryUtil.getAddress(" + argNames[i] + ")"; - } else if (newArgType.equals("java.lang.CharSequence") - && oldArgType.equals("java.nio.ByteBuffer")) { - changedArgs[i] = - "me.eigenraven.lwjgl3ify.BufferCasts.bufferToCharSeq(" + argNames[i] + ")"; - } else if (newArgType.equals("int") - && oldArgType.equals("boolean") - && argNames[i].equals("unsigned") - && newArgNames[i].equals("type")) { - final String newArg; - switch (bufferArg) { - case "java.nio.ByteBuffer": - newArg = - "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_BYTE : org.lwjgl.opengl.GL11.GL_BYTE)"; - break; - case "java.nio.ShortBuffer": - newArg = - "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_SHORT : org.lwjgl.opengl.GL11.GL_SHORT)"; - break; - case "java.nio.IntBuffer": - newArg = - "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_INT : org.lwjgl.opengl.GL11.GL_INT)"; - break; - case "java.nio.LongBuffer": - newArg = - "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_LONG : org.lwjgl.opengl.GL11.GL_LONG)"; - break; - case "java.nio.FloatBuffer": - newArg = - "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_FLOAT : org.lwjgl.opengl.GL11.GL_FLOAT)"; - break; - case "java.nio.DoubleBuffer": - newArg = - "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_DOUBLE : org.lwjgl.opengl.GL11.GL_DOUBLE)"; - changedArgs[bufferArgIdx] = "me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(" - + changedArgs[bufferArgIdx] + ")"; - break; - default: - throw new IllegalStateException(bufferArg); - } - changedArgs[i] = newArg; - } else { - success = false; - System.out.println(new UnsupportedOperationException(oldArgType + " -> " + newArgType - + " in " + oldClassNode.getKey() + " : " + oldMethodNode.getKey()) - .toString()); - } + // no-op + } else + if ((newArgType.equals("java.nio.IntBuffer") || newArgType.equals("int[]")) + && oldArgType.equals("int")) { + changedArgs[i] = "new int[]{" + argNames[i] + "}"; + } else + if ((newArgType.equals("java.nio.LongBuffer") || newArgType.equals("long[]")) + && oldArgType.equals("long")) { + changedArgs[i] = "new long[]{" + argNames[i] + "}"; + } else + if (newArgType.equals("long") && newNativeType.endsWith("*") + && oldArgType.startsWith("java.nio.") + && oldArgType.endsWith("Buffer")) { + changedArgs[i] = "org.lwjglx.MemoryUtil.getAddress(" + argNames[i] + + ")"; + } else + if (newArgType.equals("java.lang.CharSequence") + && oldArgType.equals("java.nio.ByteBuffer")) { + changedArgs[i] = "me.eigenraven.lwjgl3ify.BufferCasts.bufferToCharSeq(" + + argNames[i] + + ")"; + } else + if (newArgType.equals("int") && oldArgType.equals("boolean") + && argNames[i].equals("unsigned") + && newArgNames[i].equals("type")) { + final String newArg; + switch (bufferArg) { + case "java.nio.ByteBuffer": + newArg = "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_BYTE : org.lwjgl.opengl.GL11.GL_BYTE)"; + break; + case "java.nio.ShortBuffer": + newArg = "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_SHORT : org.lwjgl.opengl.GL11.GL_SHORT)"; + break; + case "java.nio.IntBuffer": + newArg = "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_INT : org.lwjgl.opengl.GL11.GL_INT)"; + break; + case "java.nio.LongBuffer": + newArg = "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_LONG : org.lwjgl.opengl.GL11.GL_LONG)"; + break; + case "java.nio.FloatBuffer": + newArg = "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_FLOAT : org.lwjgl.opengl.GL11.GL_FLOAT)"; + break; + case "java.nio.DoubleBuffer": + newArg = "(unsigned ? org.lwjgl.opengl.GL11.GL_UNSIGNED_DOUBLE : org.lwjgl.opengl.GL11.GL_DOUBLE)"; + changedArgs[bufferArgIdx] = "me.eigenraven.lwjgl3ify.BufferCasts.toByteBuffer(" + + changedArgs[bufferArgIdx] + + ")"; + break; + default: + throw new IllegalStateException(bufferArg); + } + changedArgs[i] = newArg; + } else { + success = false; + System.out.println( + new UnsupportedOperationException( + oldArgType + " -> " + + newArgType + + " in " + + oldClassNode.getKey() + + " : " + + oldMethodNode.getKey()) + .toString()); + } } } if (success) { return new MethodRedirector.TransformingRedirector( - this, fuzzyMatch.getValue(), preCode.toString(), postCode.toString(), changedArgs); + this, + fuzzyMatch.getValue(), + preCode.toString(), + postCode.toString(), + changedArgs); } } } diff --git a/src/util/java/me/eigenraven/lwjgl3ify/MethodRedirector.java b/src/util/java/me/eigenraven/lwjgl3ify/MethodRedirector.java index 5de3cb7..08b4117 100644 --- a/src/util/java/me/eigenraven/lwjgl3ify/MethodRedirector.java +++ b/src/util/java/me/eigenraven/lwjgl3ify/MethodRedirector.java @@ -1,14 +1,17 @@ package me.eigenraven.lwjgl3ify; -import com.google.common.collect.Streams; import java.io.PrintWriter; import java.util.Arrays; + import org.apache.commons.lang3.StringUtils; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import org.objectweb.asm.tree.MethodNode; +import com.google.common.collect.Streams; + public abstract class MethodRedirector { + public final MethodMatcher matcher; public final String javaClassName; @@ -25,16 +28,15 @@ public abstract class MethodRedirector { access = access + " static"; } this.access = access; - this.javaClassName = - matcher.oldClassNode.getValue().className.replace('/', '.').replace(".lwjglx.", ".lwjgl."); + this.javaClassName = matcher.oldClassNode.getValue().className.replace('/', '.').replace(".lwjglx.", ".lwjgl."); final int lastDot = javaClassName.lastIndexOf('.'); this.packageName = javaClassName.substring(0, lastDot); this.className = javaClassName.substring(lastDot + 1); } public void outputRedirector(final PrintWriter writer) { - final String[] argDefs = Streams.zip( - Arrays.stream(matcher.argTypes), Arrays.stream(matcher.argNames), ((t, n) -> t + " " + n)) + final String[] argDefs = Streams + .zip(Arrays.stream(matcher.argTypes), Arrays.stream(matcher.argNames), ((t, n) -> t + " " + n)) .toArray(String[]::new); final String argDef = StringUtils.join(argDefs, ", "); writer.printf( @@ -71,14 +73,11 @@ public abstract class MethodRedirector { } public static class TransformingRedirector extends DirectMethodRedirector { + public final String preCode, postCode; public final String[] argumentReplacements; - public TransformingRedirector( - MethodMatcher matcher, - MethodNode newMethod, - String preCode, - String postCode, + public TransformingRedirector(MethodMatcher matcher, MethodNode newMethod, String preCode, String postCode, String[] argumentReplacements) { super(matcher, newMethod); this.preCode = preCode; @@ -88,8 +87,8 @@ public abstract class MethodRedirector { @Override protected void writeBody(PrintWriter writer) { - final String[] transformedArgNames = - Arrays.copyOf(matcher.argNames, Math.max(matcher.argNames.length, argumentReplacements.length)); + final String[] transformedArgNames = Arrays + .copyOf(matcher.argNames, Math.max(matcher.argNames.length, argumentReplacements.length)); for (int i = 0; i < transformedArgNames.length; i++) { if (i < argumentReplacements.length && argumentReplacements[i] != null) { transformedArgNames[i] = argumentReplacements[i]; @@ -102,8 +101,7 @@ public abstract class MethodRedirector { if (matcher.methodType.getReturnType().equals(Type.VOID_TYPE)) { writer.printf(" %s.%s(%s);%n", this.javaClassName, newMethod.name, argCall); } else { - final String retType = - matcher.methodType.getReturnType().getClassName().replace(".lwjgl.", ".lwjglx."); + final String retType = matcher.methodType.getReturnType().getClassName().replace(".lwjgl.", ".lwjglx."); String preRet = "", postRet = ""; if (retType.endsWith("ALCdevice")) { preRet = "new org.lwjglx.openal.ALCdevice("; @@ -115,7 +113,12 @@ public abstract class MethodRedirector { } writer.printf( " %s returnValue = %s%s.%s(%s)%s;%n", - retType, preRet, this.javaClassName, newMethod.name, argCall, postRet); + retType, + preRet, + this.javaClassName, + newMethod.name, + argCall, + postRet); } if (postCode != null) { writer.println(postCode);